4. SIP trunks¶
4.1. Configuration¶
4.1.1. Overview¶
From the dropdown menu select Connectivity > Trunks.
click to enlarge
Click on the Add SIP Trunk link.
click to enlarge
Add the details from the providers instructions or from Provider examples as necessary. The following screenshot shows a typical example for one particular SIP trunk provider. Some things to note. You only have to enter information for Trunk Name, Outgoing Settings, and Registration String. Everything else can be left as is. This is fairly typical for most SIP trunk providers.
click on the image twice to fully enlarge
4.1.2. Provider examples¶
This is a constantly evolving list of various SIP trunk provider configurations. This is provided only as a reference. For support please contact your SIP trunk provider.
We make no guarantees the examples provided here are the most current or the most correct. We also cannot guarantee they work in all situations with all versions of Asterisk. What we can say is that at the time we documented the configuration it was working correctly on our servers using Asterisk v13 and/or v11. Please check the trunk provider website for the most current configuration examples.
Note
There are 2 types of authentication for SIP trunks. Classic username/password authentication and IP authentication.
PowerPBX recommends IP authentication if your SIP trunk provider supports that feature. It simplifies things and is considered more secure. The main difference between the 2 configurations is that IP authentication does not require a username, password, or registration string.
Attention
You may not be able to use a SIP trunk listening on port 5061 + IP authentication for inbound calling since trunk providers assume port 5060. Use user/pass authentication for that scenario.
To change SIP port go to Settings > Asterisk SIP Settings > Chan SIP
. This port cannot be the same as the PJSIP port setting at Settings > Asterisk SIP Settings > Chan PJSIP
. You will need to reboot the server or restart Asterisk for these changes to take effect.
4.1.2.1. voip.ms¶
Trunk Name: voipms-seattle
PEER Details:
nat=yes type=peer username=someusername secret=password context=from-trunk host=seattle2.voip.ms disallow=all allow=ulaw insecure=port,invite requirecalltoken=no qualify=yesRegister String:
someusername:password@seattle.voip.ms:5060
4.1.2.2. ipcomms.net¶
Trunk Name: ipcomms-trunk
PEER Details:
username=someusername type=friend secret=password nat=yes insecure=port,invite host=2way.ipcomms.net/username dtmfmode=rfc2833 context=from-pstn directmedia=no allow=ulaw trustpid=yesRegister String:
someusername:password@2way.ipcomms.net/username
4.1.2.3. vitelity.com¶
Trunk Name: vitelity-out
PEER Details:
type=friend host=outbound.vitelity.net dtmfmode=auto context=from-trunk canreinvite=noUSER Context: vitelity-in
USER Details:
type=friend insecure=port,invite host=inbound24.vitelity.net dtmfmode=auto context=from-trunk canreinvite=no
4.1.2.4. vonage.com¶
Trunk Name: vonage-out
Peer Details:
allow=all auth=md5 canreinvite=yes defaultexpirey=120 dtmfmode=rfc2833 fromdomain=sphone.vopr.vonage.net fromuser=someusername host=sphone.vopr.vonage.net insecure=port,invite nat=yes port=5061 secret=password type=friend username=someusername context=from-trunkUser Context: vonage-in
User Details:
auth=md5 canreinvite=no context=from-pstn dtmfmode=inband fromdomain=sphone.vopr.vonage.net fromuser=someusername host=sphone.vopr.vonage.net insecure=port,invite nat=yes port=5061 secret=somepassword type=friend username=someusernameRegister String:
someusername:password@sphone.vopr.vonage.net:5061
4.1.2.5. voicenetwork.ca¶
Trunk Name: voicenetwork-out
Peer Details:
host=sip.voicenetwork.ca context=from-trunk type=friend sendrpid=yes qualify=yes canreinvite=yes insecure=port,inviteUser Context: voicenetwork-in
User Details:
type=peer host=sip.voicenetwork.ca qualify=yes canreinvite=yes context=from-trunk
4.1.2.6. skyetel.com¶
Trunk Name: Skyetel_[Region] (If this trunk is in NW region you’d name it Skyetel_NW)
Peer Details:
type=friend insecure=very host=[SKYETEL IP] dtmfmode=rfc2833 disallow=all context=from-trunk allow=g722&ulaw qualify=yes #tcpenable=yes
4.1.2.7. skype.com¶
Trunk Name: skype-out
Peer Details:
disallow=all host=sip.skype.com username=someusername secret=password fromdomain=sip.skype.com fromuser=someusername type=friend context=from-trunk qualify=5000 nat=no insecure=invite,port dtmfmode=rfc2833 canreinvite=no allow=ulawUser Context: from-trunk
User Details:
context=from-trunk type=user insecure=port,invite canreinvite=no nat=noRegister String:
someusername:password@sip.skype.com:5060
4.1.2.8. flowroute.com¶
Trunk Name: flowroute-out
Peer Details:
type=friend secret=password username=someusername host=sip.flowroute.com dtmfmode=rfc2833 context=from-trunk canreinvite=no allow=ulaw insecure=port,invite fromdomain=sip.flowroute.comRegister String:
someusername:password@sip.flowroute.com
4.1.2.9. voiptalk.org¶
Trunk Name: voiptalk-out
Peer Details:
host=voiptalk.org insecure=port,invite secret=password type=peer username=someusername context=from-trunkRegister String:
someusername:password@voiptalk.org/username
4.1.2.10. birch.com¶
Trunk Name: SomeTrunkName
Peer Details:
disallow=all allow=ulaw canreinvite=no context=from-pstn dtmfmode=auto fromdomain=sipconnect.atl0.cbeyond.net ;substitute "atl0" with whatever market you're in host=sipconnect.atl0.cbeyond.net insecure=very nat=never outboundproxy=sip-proxy.atl0.cbeyond.net qualify=no secret=XXXXXXXX type=peer username=XXXXXXXX trustrpid=yes sendrpid=yesUser Context: SomeTrunkName_in
USER details:
type=peer host=sip-proxy.atl0.cbeyond.net dtmfmode=auto context=from-pstnRegister string:
someusername:password@SomeTrunkName/someusername ;("SomeTrunkName" MUST match whatever you've named this trunk)