This guide will show you how to setup a Basic SIP Trunk on your FreePBX, Elastics or Issabel Switchboard. 


The guide screenshots are base don ISsabel but will be the same for the other Switchboards mentioned above. 



Under the PBX tab, select PBX Configuration and then on Basic/Trunks:



We will create a new Trunk, add a Name for your reference (e.g Megacall) and add the following settings:





The Dialing plan show above allows the agents to dial Spanish destinations with local dialling and it will automatically add the country code (34) before routignt he call out throguh Megacall's SIP Trunk. 


Remeber that all calls must include the CallerID (Origin) and the Destination number with international format 

(e.g Country Code + Destination)




Example of Peer Details: 


username={VoIP Username}

secret={VoIP Password}

host=185.106.240.227
type=friend
nat=force_rport,comedia
insecure=invite,port
dtmfmode=rfc2833
disallow=all
allow=alaw&ulaw&g729
sendrpid=yes
trustrpid=yes
canreinvite=no (this can be changed to "yes" if you allow bypassing RTP traffic, you must allow RTP from ANY IP Address)
allowguest=no
alwaysauthreject=yes

(canreinvite= was renamed to directmedia= in Asterisk 1.6.2 to more accurately describe what this setting does. See also the closely related setting directrtpsetup)


There's no need to add a Registretion string as we authenticate calsl based on your Pubic IP Address, Registration is not enabled.



Finally click "Submit Changes" at the very bottom of the page. And then at the top of the same page you must press "Apply Changes to complete the task. 







Next step is to create an Outbound route.


Go to PBX tab, select PBX Configuration and then on Basic/Outbound Routes:





Add a Route Name (e.g: Megacall-Outbound)





You must also add the Dialplan rules to match the numbers your agents are dialling to use this Outgoing rule. In my example I will use this Outgoing rule when the numbers starts with 00, 34 (Spain), 44 (UK) or any Spansih number with local format whcih will add the coutrny code 34 before the call is routed. 



Then select Megacall's SIP Trunk that we created previously: 



Finally click "Submit Changes" at the very bottom of the page. And then at the top of the same page you must press "Apply Changes to complete the task.






Now your SIP Trunk is ready and your agents can start calling out. 




Should you have any questions or experience any issues please contact our Technical Support team at "support@megacall.es" for further assistance.