By following the steps below you will be able to make and receive calls using your Irish VoIP number from your FreePBX (CHAN_SIP) server with automatic failover from our Primary to Secondary server in case of an outage.
Add a CHAN_SIP trunk called IrishVoIP-Outbound-Primary.?
In SIP Settings -> Outgoing tab set Trunk Name to IrishVoIP-Outbound-Primary with Peer Details as below replacing your YOURNUMBER and YOURPASSWORD.?
YOURNUMBER is in format similar to 35311234567 as received on signup
type=peer qualify=4000 username=YOURNUMBER fromuser=YOURNUMBER secret=YOURPASSWORD host=primary.irishvoip.com port=5099 disallow=all allow=ulaw&alaw
In SIP Settings -> Incoming tab set Register String as below (User Details and User Context should be blank)
Add another CHAN_SIP trunk called IrishVoIP-Outbound-Secondary.??
In SIP Settings -> Outgoing tab set Trunk Name to IrishVoIP-Outbound-Secondary with Peer Details as
type=peer qualify=4000 username=YOURNUMBER fromuser=YOURNUMBER secret=YOURPASSWORD host=secondary.irishvoip.com port=5099 disallow=all allow=ulaw&alaw
In SIP Settings -> Incoming tab set Register String as below?(User Details and User Context should be blank)
Create an Inbound Route with no settings except a name, DID = YOURNUMBER and destination (your chosen extension, ring group, IVR etc).?
Ensure Allow SIP Guests is Disabled in Asterisk SIP settings to avoid abuse of the inbound route.
Create an Outbound Route with the settings you wish to access for outbound calls?
To make people dial 9 for outbound include 9 in prefix and X. in dial pattern. This will route everything entered after 9 over Irish Voip e.g 9011234567 will ring 011234567 over Irish VoIP.
Choose both Irish VoIP trunks with the IrishVoIP-Primary first, name the route and save.
Log into the server terminal using Putty or similar tool and edit the file /etc/asterisk/sip_custom.conf using vi or nano and add the text below to allow inbound traffic to reach your server.
[IrishVoIP-Inbound-Primary] host=primary.irishvoip.com port=5099 type=peer context=from-sip-external allow=all qualify=4000 [IrishVoIP-Inbound-Secondary] host=secondary.irishvoip.com port=5099 type=peer context=from-sip-external allow=all qualify=4000
Save the file and reload the configuration by typing fwconsole restart and hit return.
You can check all is OK by going to Reports->Asterisk Info->Chan_Sip Info on the Freepbx GUI. You should see the two registrations for inbound under Registry (will say registered if OK), the two trunks for outbound and the two trunk for inbound under Peers
You can now make and receive calls from your PBX using your Irish VoIP PAYG number
NOTE: Caller ID will always be your registered number when using this route and trunk even if changed in Freepbx.
Remember to keep your account topped up. Check your balance at any time by dialing 172