pjSIP is always recommended, but you may also use IAX.
As before, please obtain YourData by login -> MyServices.
[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0
[ezvoip]
type = registration
transport = transport-udp
outbound_auth = ezvoip
client_uri = sip:YourUserID@YourDomain:5060 ; (e.g., toronto5.ezvoip.co is one of our multiple servers, you can choose the one closer to your location)
server_uri = sip:YourDomain:5060 ; (e.g., toronto5.ezvoip.co is one of our multiple servers, you can choose the one closer to your location)
[ezvoip]
type = auth
auth_type = userpass
username = YourUserID ; (Replace with your Sub Account username, i.e. 123456_###)
password = YourPassword ; your password
[ezvoip]
type = aor
contact = sip:YourUserID@YourDomain ; (e.g., toronto5.ezvoip.co is one of our multiple servers, you can choose the one closer to your location)
[ezvoip]
type = endpoint
transport = transport-udp
context = mycontext
disallow = all
allow = ulaw
; allow=g729 ; uncomment if you support g729
from_user = YourUserID ; (Replace with your 6 digit Main SIP Account User ID or Sub Account username, i.e. 123456 or 123456_sub)
auth = ezvoip
outbound_auth = ezvoip
aors = ezvoip
; NAT parameters:
rtp_symmetric = yes
rewrite_contact = yes
send_rpid = yes
[ezvoip]
type = identify
endpoint = ezvoip
match = YourDomain ; (e.g., toronto5.ezvoip.co is one of our multiple servers, you can choose the one closer to your location)
[mycontext]
; Make sure to include inbound prior to outbound because the _NXXNXXXXXX handler will match the incoming call and create a loop
include => ezvoip-inbound
include => ezvoip-outbound
[ezvoip-outbound]
exten => _1NXXNXXXXXX,1,Dial(PJSIP/${EXTEN}@ezvoip)
exten => _1NXXNXXXXXX,n,Hangup()
exten => _NXXNXXXXXX,1,Dial(PJSIP/1${EXTEN}@ezvoip)
exten => _NXXNXXXXXX,n,Hangup()
exten => _011.,1,Dial(PJSIP/${EXTEN}@ezvoip)
exten => _011.,n,Hangup()
exten => _00.,1,Dial(PJSIP/${EXTEN}@ezvoip)
exten => _00.,n,Hangup()
; inbound context example for your DID numbers, do not add the number 1 in front
[ezvoip-inbound]
exten => Your10digitPhoneNumber,1,Answer() ;your DID
Note: You'll need to create a sub account to use IP Auth
[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0
[ezvoip]
type = aor
contact = sip:YourUserID@YourDomain ; (e.g., toronto5.ezvoip.co is one of our multiple servers, you can choose the one closer to your location)
[ezvoip]
type = endpoint
transport = transport-udp
context = mycontext
disallow = all
allow = ulaw
; allow=g729 ; uncomment if you support g729
from_user = YourUserID ; (Replace with your Sub Account username, i.e. 123456_###)
aors = ezvoip
; NAT parameters:
rtp_symmetric = yes
rewrite_contact = yes
send_rpid = yes
[ezvoip]
type = identify
endpoint = ezvoip
match = YourDomain ; (e.g., toronto5.ezvoip.co is one of our multiple servers, you can choose the one closer to your location)
[mycontext]
; Make sure to include inbound prior to outbound because the _NXXNXXXXXX handler will match the incoming call and create a loop
include => ezvoip-inbound
include => ezvoip-outbound
[ezvoip-outbound]
exten => _1NXXNXXXXXX,1,Dial(PJSIP/${EXTEN}@ezvoip)
exten => _1NXXNXXXXXX,n,Hangup()
exten => _NXXNXXXXXX,1,Dial(PJSIP/1${EXTEN}@ezvoip)
exten => _NXXNXXXXXX,n,Hangup()
exten => _011.,1,Dial(PJSIP/${EXTEN}@ezvoip)
exten => _011.,n,Hangup()
exten => _00.,1,Dial(PJSIP/${EXTEN}@ezvoip)
exten => _00.,n,Hangup()
; inbound context example for your DID numbers, do not add the number 1 in front
[ezvoip-inbound]
exten => Your10digitPhoneNumber,1,Answer() ;your DID
We have marked the necessary substitutions in red.