Asterisk SIP - VoIP.ms Wiki

Asterisk SIP

From VoIP.ms Wiki

(Difference between revisions)
Jump to: navigation, search
[checked revision][quality revision]
(Asterisk TLS/SRTP (SIP))
 
(11 intermediate revisions not shown)
Line 10: Line 10:
canreinvite=no
canreinvite=no
context=mycontext
context=mycontext
-
host=atlanta.voip.ms (one of our multiple servers, you can choose the one closer to your location)
+
host=atlanta.voip.ms ;(one of our multiple servers, you can choose the one closer to your location)
secret=johnspassword ;your password
secret=johnspassword ;your password
type=peer
type=peer
-
username=100000 (Replace with your 6 digit Main SIP Account User ID or Sub Account username, i.e. 123456 or 123456_sub)
+
username=100000 ;(Replace with your 6 digit Main SIP Account User ID or Sub Account username, i.e. 123456 or 123456_sub)
disallow=all
disallow=all
allow=ulaw
allow=ulaw
; allow=g729 ; Uncomment if you support G729
; allow=g729 ; Uncomment if you support G729
-
fromuser=100000 (Replace with your 6 digit Main SIP Account User ID or Sub Account username, i.e. 123456 or 123456_sub)
+
fromuser=100000 ;(Replace with your 6 digit Main SIP Account User ID or Sub Account username, i.e. 123456 or 123456_sub)
trustrpid=yes
trustrpid=yes
sendrpid=yes
sendrpid=yes
Line 24: Line 24:
</nowiki>
</nowiki>
-
==Asterisk IP Auth. (SIP)==
+
*Note: As of FreePBX/Asterisk version 2.9.0.7 if ;comments are placed after the config entries as above it may prevent outgoing call's with the end points getting "All circuits are busy". Remove the ;comments and the trunk will send the calls with no errors.
-
 
+
-
===sip.conf===
+
-
 
+
-
Note: You'll need to create a sub account to use IP Auth
+
-
 
+
-
<nowiki>
+
-
[voipms]
+
-
canreinvite=nonat
+
-
context=mycontext
+
-
host=atlanta.voip.ms (one of our multiple servers, you can choose the one closer to your location)
+
-
type=peer
+
-
disallow=all
+
-
allow=ulaw
+
-
; allow=g729 ; uncomment if you support g729
+
-
nat=yes
+
-
</nowiki>
+
-
 
+
===extensions.conf===
===extensions.conf===
Line 65: Line 48:
exten => 7863643011,1,Answer() ;your DID
exten => 7863643011,1,Answer() ;your DID
</nowiki>
</nowiki>
-
<br><br><br><br><br>
+
<br>
 +
 
 +
==Asterisk TLS/SRTP (SIP)==
 +
 
 +
 
 +
1. In order to use these devices with encryption, besides having to [[Call Encryption - TLS/SRTP | enable the SIP account in your VoIP.ms customer portal]], there are some settings you will have to modify in your device's configuration.
 +
 
 +
2. Once your account/sub-account has Encrypted traffic enabled, the system has to be configured use/send the traffic through TLS and SRTP.
 +
 
 +
 
 +
For the registration over TLS, you need to define the protocol the PBX will use in the general config.
 +
 
 +
[general]               
 +
register => tls://100000:johnspassword@atlanta1.voip.ms:5061
 +
 
 +
 
 +
For the outbound part, add the following lines to the peer details.
 +
 
 +
encryption=yes
 +
transport=tls
 +
 
 +
See example below:
 +
 
 +
<nowiki>
 +
[voipms]
 +
encryption=yes
 +
transport=tls
 +
canreinvite=no
 +
context=mycontext
 +
host=atlanta1.voip.ms ;(one of our multiple servers, you can choose the one closer to your location)
 +
secret=johnspassword ;your password
 +
type=peer
 +
username=100000 ;(Replace with your 6 digit Main SIP Account User ID or Sub Account username, i.e. 123456 or 123456_sub)
 +
disallow=all
 +
allow=ulaw
 +
; allow=g729 ; Uncomment if you support G729
 +
fromuser=100000 ;(Replace with your 6 digit Main SIP Account User ID or Sub Account username, i.e. 123456 or 123456_sub)
 +
trustrpid=yes
 +
sendrpid=yes
 +
insecure=invite
 +
nat=yes
 +
</nowiki>
 +
 
 +
'''Note:''' When using TLS is very important to specify the number of the server, in case the name you have chosen doesn't use the number 1 you need to add it.
 +
 
 +
==Asterisk IP Auth. (SIP)==
 +
 
 +
===sip.conf===
 +
 
 +
Note: You'll need to create a sub account to use IP Auth
 +
 
 +
<nowiki>
 +
[voipms]
 +
canreinvite=nonat
 +
context=mycontext
 +
host=atlanta.voip.ms ;(one of our multiple servers, you can choose the one closer to your location)
 +
type=peer
 +
disallow=all
 +
allow=ulaw
 +
; allow=g729 ; uncomment if you support g729
 +
nat=yes
 +
</nowiki>
-
*Note: As of FreePBX/Asterisk version 2.9.0.7 if ;comments are placed after the config entries as above it may prevent outgoing call's with the end points getting "All circuits are busy".  Remove the ;comments and the trunk will send the calls with no errors.
 
===extensions.conf===
===extensions.conf===
Line 91: Line 134:
exten => 7863643011,1,Answer() ;your DID
exten => 7863643011,1,Answer() ;your DID
</nowiki>
</nowiki>
 +
 +
==Known Issues==
 +
 +
===Getting Message Waiting Indicator to Work with VoIP.ms Voicemail===
 +
 +
VoIP.ms sends MWI notifications unsolicited. Please make the following changes in your configurations.
 +
 +
Remove this Line please.
 +
 +
[general] Section
 +
 +
mwi => 123456:mypassword@losangeles.voip.ms/65000
 +
 +
Add this Line please.
 +
 +
[voipms] Section
 +
 +
unsolicited_mailbox=65000
 +
 +
 +
== Local extension calling ==
 +
 +
(User submitted) In order for this to work, you must fill out "User Context and User Details"
 +
 +
 +
 +
User Context Name: 100000 (your account)
 +
 +
[100000] your account
 +
type=user
 +
auth=md5
 +
notransfer=yes
 +
disallow=all
 +
allow=gsm&ulaw
 +
trunk=yes
 +
secret=****
 +
context=from-trunk
 +
 +
<br><br><br><br><br>
<br><br><br><br><br>

Latest revision as of 16:13, 19 November 2019

Contents

Asterisk (SIP)

sip.conf

[general]                
register => 100000:johnspassword@atlanta.voip.ms:5060

[voipms]
canreinvite=no
context=mycontext
host=atlanta.voip.ms ;(one of our multiple servers, you can choose the one closer to your location)
secret=johnspassword ;your password
type=peer
username=100000 ;(Replace with your 6 digit Main SIP Account User ID or Sub Account username, i.e. 123456 or 123456_sub)
disallow=all
allow=ulaw
; allow=g729 ; Uncomment if you support G729
fromuser=100000 ;(Replace with your 6 digit Main SIP Account User ID or Sub Account username, i.e. 123456 or 123456_sub)
trustrpid=yes
sendrpid=yes
insecure=invite
nat=yes

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 TLS/SRTP (SIP)

1. In order to use these devices with encryption, besides having to enable the SIP account in your VoIP.ms customer portal, there are some settings you will have to modify in your device's configuration.

2. Once your account/sub-account has Encrypted traffic enabled, the system has to be configured use/send the traffic through TLS and SRTP.


For the registration over TLS, you need to define the protocol the PBX will use in the general config.

[general]                
register => tls://100000:johnspassword@atlanta1.voip.ms:5061


For the outbound part, add the following lines to the peer details.

encryption=yes
transport=tls

See example below:

[voipms]
encryption=yes
transport=tls
canreinvite=no
context=mycontext
host=atlanta1.voip.ms ;(one of our multiple servers, you can choose the one closer to your location)
secret=johnspassword ;your password
type=peer
username=100000 ;(Replace with your 6 digit Main SIP Account User ID or Sub Account username, i.e. 123456 or 123456_sub)
disallow=all
allow=ulaw
; allow=g729 ; Uncomment if you support G729
fromuser=100000 ;(Replace with your 6 digit Main SIP Account User ID or Sub Account username, i.e. 123456 or 123456_sub)
trustrpid=yes
sendrpid=yes
insecure=invite
nat=yes

Note: When using TLS is very important to specify the number of the server, in case the name you have chosen doesn't use the number 1 you need to add it.

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 ;(one of our multiple servers, you can choose the one closer to your location)
type=peer
disallow=all
allow=ulaw
; allow=g729 ; uncomment if you support g729
nat=yes


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

Known Issues

Getting Message Waiting Indicator to Work with VoIP.ms Voicemail

VoIP.ms sends MWI notifications unsolicited. Please make the following changes in your configurations.

Remove this Line please.

[general] Section

mwi => 123456:mypassword@losangeles.voip.ms/65000

Add this Line please.

[voipms] Section

unsolicited_mailbox=65000


Local extension calling

(User submitted) In order for this to work, you must fill out "User Context and User Details"


User Context Name: 100000 (your account)

[100000] your account
type=user
auth=md5
notransfer=yes
disallow=all
allow=gsm&ulaw
trunk=yes
secret=****
context=from-trunk







Personal tools
Namespaces
Variants
Actions
VoIP.ms Wiki
VoIP.ms Blog
Configuration
Guides (English)
Guides (Français)
Guías (Español)
Toolbox