PBXs
From VoIP.ms Wiki
Contents |
FreePBX / Trixbox / PBX in a Flash (SIP)
|
canreinvite=nonat |
Register String
|
100000:[email protected]:5060 |
FreePBX / Trixbox / PBX in a Flash (IAX2)
|
type=friend |
Register String
|
100000:[email protected]:4569 |
Asterisk (SIP)
sip.conf
[general] register => 100000:[email protected]:5060 [voipms] canreinvite=no context=mycontext host=atlanta.voip.ms secret=johnspassword ;your password type=friend username=100000 ;your account disallow=all allow=ulaw ; allow=g729 ; Uncomment if you support G729 fromuser=100000 ;your account trustrpid=yes sendrpid=yes insecure=port,invite ; nat=yes ; Uncomment this if your box is behind a NAT
extensions.conf
[mycontext]
; Make sure to include inbound prior to outbound because the _NXXNXXXXXX handler will match the incoming call and create a loop
include => voipms-inbound
include => voipms-outbound
[voipms-outbound]
exten => _1NXXNXXXXXX,1,Dial(SIP/${EXTEN}@voipms)
exten => _1NXXNXXXXXX,n,Hangup()
exten => _NXXNXXXXXX,1,Dial(SIP/1${EXTEN}@voipms)
exten => _NXXNXXXXXX,n,Hangup()
exten => _011.,1,Dial(SIP/${EXTEN}@voipms)
exten => _011.,n,Hangup()
exten => _00.,1,Dial(SIP/${EXTEN}@voipms)
exten => _00.,n,Hangup()
; inbound context example for your DID numbers, do not add the number 1 in front
[voipms-inbound]
exten => 7863643011,1,Answer() ;your DID
Asterisk IP Auth. (SIP)
sip.conf
Note: You'll need to create a sub account to use IP Auth
[voipms] canreinvite=nonat context=mycontext host=atlanta.voip.ms type=friend disallow=all allow=ulaw ; allow=g729 ; uncomment if you support g729 insecure=port,invite ; nat=yes ; uncommment if behind a nat
extensions.conf
[mycontext]
; Make sure to include inbound prior to outbound because the _NXXNXXXXXX handler will match the incoming call and create a loop
include => voipms-inbound
include => voipms-outbound
[voipms-outbound]
exten => _1NXXNXXXXXX,1,Dial(SIP/${EXTEN}@voipms)
exten => _1NXXNXXXXXX,n,Hangup()
exten => _NXXNXXXXXX,1,Dial(SIP/1${EXTEN}@voipms)
exten => _NXXNXXXXXX,n,Hangup()
exten => _011.,1,Dial(SIP/${EXTEN}@voipms)
exten => _011.,n,Hangup()
exten => _00.,1,Dial(SIP/${EXTEN}@voipms)
exten => _00.,n,Hangup()
; inbound context example for your DID numbers, do not add the number 1 in front
[voipms-inbound]
exten => 7863643011,1,Answer() ;your DID
Asterisk (IAX2)
iax.conf
register => 100000:[email protected] [voipms] type=friend username=100000 ;your account secret=johnspassword ;your password context=mycontext host=atlanta.voip.ms disallow=all allow=ulaw ; allow=g729 ; uncomment if you support it insecure=port,invite requirecalltoken=no
extensions.conf
[mycontext]
; Make sure to include inbound prior to outbound because the _NXXNXXXXXX handler will match the incoming call and create a loop
include => voipms-inbound
include => voipms-outbound
[voipms-outbound]
exten => _1NXXNXXXXXX,1,Dial(SIP/${EXTEN}@voipms)
exten => _1NXXNXXXXXX,n,Hangup()
exten => _NXXNXXXXXX,1,Dial(SIP/1${EXTEN}@voipms)
exten => _NXXNXXXXXX,n,Hangup()
exten => _011.,1,Dial(SIP/${EXTEN}@voipms)
exten => _011.,n,Hangup()
exten => _00.,1,Dial(SIP/${EXTEN}@voipms)
exten => _00.,n,Hangup()
; inbound context example for your DID numbers, do not add the number 1 in front
[voipms-inbound]
exten => 7863643011,1,Answer() ;your DID
Cisco IOS
SIP Trunk (Username/Password Authentication)
For the configuration below to work, you must have DNS name lookups properly configured on your router. The example below is based on IOS 15.1(3)T. Minor adjustments may be necessary for ealier IOS revisions. Note that the dial plan shown below will allow you to dial anything and will pass those digits directly to voip.ms, but will take a few seconds to route the call unless you finish the number with a #.
configure terminal voice service voip gcid clid substitute name allow-connections sip to sip no supplementary-service sip moved-temporarily no supplementary-service sip refer sip e911 transport switch udp tcp asserted-id ppi localhost dns:dns.name.of.your.device midcall-signaling passthru no call service stop sip-ua credentials username your_account password 0 your_password realm voip.ms authentication username your_account password 0 your_password registrar 1 dns:newyork.voip.ms !Pick your preferred first server registrar 2 dns:montreal.voip.ms !Pick the next best here !You can configure up to 6 registrar servers for fault-tolerance !This dial peer will match all incoming calls for DIDs in the range (555)555-1000 to (555)555-1999 dial-peer voice 1 voip incoming called-number 5555551... voice-class sip asserted-id ppi no voice-class sip block 180 no voice-class sip block 181 no voice-class sip block 183 voice-class sip pass-thru headers unsupp voice-class sip pass-thru content unsupp voice-class sip pass-thru content sdp dtmf-relay rtp-nte !This dial peer is for outgoing calls and matches anything. !Finish dialing with a # to immediately route the call. dial-peer voice 2 voip destination-pattern T voice-class sip asserted-id ppi no voice-class sip block 180 no voice-class sip block 181 no voice-class sip block 183 voice-class sip pass-thru headers unsupp voice-class sip pass-thru content unsupp voice-class sip pass-thru content sdp dtmf-relay rtp-nte session protocol sipv2 session transport udp session target sip-server end copy run start
