Asterisk/FreePBX Settings for DIDs purchased at Irish VoIP

Instructions if using your DID with Asterisk (or FreePBX)

Once your PBX destination is configured in the client area of irishvoip.com, you can configure your PBX to handle the number.

These instructions are for CHAN_SIP. Log into the server terminal as root an edit the configuration file /etc/asterisk/sip_custom.conf and add the lines below

[IrishVoIP-DID-Primary]
host=46.19.210.14
dtmfmode=rfc2833
dtmf=rfc2833
type=peer
context=from-iv-did
nat=never
allow=all
qualify=4000

[IrishVoIP-DID-Secondary]
host=46.19.209.14
dtmfmode=rfc2833
dtmf=rfc2833
type=peer
context=from-iv-did
nat=never
allow=all
qualify=4000

This makes your inbound traffic arrive through a trunk which can be monitored among your peers. If using FreePBX it will automatically whitelist the trunks on your FreePBX firewall

Now handle the traffic by adding the from-iv-did context as below in the /etc/asterisk/extensions_custom.conf file.

[from-iv-did]
exten => _.,1,GotoIf($["${CALLERID(num):0:4}"!="+353"]?5)
exten => _.,2,Log(notice,Inbound DID - ${CALLERID(num)}, Its Irish Change to Irish Format)
exten => _.,3,Set(CALLERID(all)="" <0${CALLERID(num):4}>)
exten => _.,4,Goto(17)
exten => _.,5,GotoIf($["${CALLERID(num):0:3}"!="353"]?9)
exten => _.,6,Log(notice,Inbound DID - ${CALLERID(num)}, Its Irish Change to Irish Format)
exten => _.,7,Set(CALLERID(all)="" <0${CALLERID(num):3}>)
exten => _.,8,Goto(17)
exten => _.,9,GotoIf($["${CALLERID(name):0:9}"="anonymous"]?11)
exten => _.,10,GotoIf($["${CALLERID(name):0:9}"!="Anonymous"]?13)
exten => _.,11,Set(CALLERID(all)="" <WITHHELD>)
exten => _.,12,Goto(17)
exten => _.,13,GotoIf($["${CALLERID(num):0:2}"!="00"]?16)
exten => _.,14,Set(CALLERID(all)="" <+${CALLERID(num):2}>)
exten => _.,15,Goto(17)
exten => _.,16,Set(CALLERID(all)="" <${CALLERID(num)}>)
exten => _.,17,Log(notice,Inbound DID - Caller ID from ${CALLERID(num)} to ${CALLERID(DNID)})
exten => _.,18,Goto(from-pstn,${EXTEN},1)

This changes the inbound caller ID to be more Irish friendly and then onward routes the call to be handled as a normal incoming call by your PBX as normal.

You could skip the custom context by simply making the context of the two sip_custom.conf entries from-pstn

If using FreePBX, you can now create Inbound Routes to decide where to route the calls, to extensions, ring groups, IVR, call parks etc. In Asterisk route via your dial plan.

Reload your PBX after making these two changes and you are all set

If you also purchased a SIP Trunk from us please see below as to how to configure

https://www.irishvoip.com/index.php/knowledgebase/41/How-to-use-an-Irish-VoIP-SIP-Trunk.html

 

  • 267 Users Found This Useful
Was this answer helpful?

Related Articles

FreePBX Feature List

  Caller ID Call Transfer Call Parking Call Forwarding Call Recording Call...

What is a SIP Proxy

A  SIP Proxy is a special node or piece of software that manages SIP communications between the...

DNS SRV in Asterisk and Freepbx

DNS SRV is only partially supported on Asterisk/Freepbx using the CHAN_SIP protocol and while it...

One Way Audio or no Audio? Try STUN server setting

If you are having issues with one way audio or no audio coming though this can often be as a...

Do you support TLS and SRTP on SIP Trunks

Yes we do. Your traffic can be encrypted from your servers to ours.