Support / Voice / SBC / Asterisk

Asterisk SIP trunk to VoiceTel.

Asterisk's PJSIP stack uses object-oriented config: Endpoint, AOR, Auth, Identify, and Registration. The pjsip.conf snippet below handles a VoiceTel trunk with Digest or IP authentication.

pjsip.conf — Digest authentication

[voicetel-auth]
type = auth
auth_type = userpass
username = <sip-username>
password = <sip-password>

[voicetel-aor]
type = aor
contact = sip:<sip-host-from-portal>
qualify_frequency = 30

[voicetel-identify]
type = identify
endpoint = voicetel
match = <sip-host-from-portal>

[voicetel-registration]
type = registration
outbound_auth = voicetel-auth
server_uri = sip:<sip-host-from-portal>
client_uri = sip:<sip-username>@<sip-host-from-portal>
expiration = 360
retry_interval = 60

[voicetel]
type = endpoint
context = from-voicetel
disallow = all
allow = ulaw,alaw,g729
outbound_auth = voicetel-auth
aors = voicetel-aor
from_domain = <sip-host-from-portal>
direct_media = no
trust_id_inbound = yes
send_pai = yes
rtp_symmetric = yes
force_rport = yes
rewrite_contact = yes
dtmf_mode = rfc4733

pjsip.conf — IP authentication

For IP-auth trunks, omit the Auth and Registration objects and add the VoiceTel source IP to the Identify match list:

[voicetel-aor]
type = aor
contact = sip:<sip-host-from-portal>
qualify_frequency = 30

[voicetel-identify]
type = identify
endpoint = voicetel
match = <sip-source-ip-from-portal>
match = <sip-host-from-portal>

[voicetel]
type = endpoint
context = from-voicetel
disallow = all
allow = ulaw,alaw,g729
aors = voicetel-aor
from_domain = <sip-host-from-portal>
direct_media = no
trust_id_inbound = yes
send_pai = yes
rtp_symmetric = yes
force_rport = yes
rewrite_contact = yes
dtmf_mode = rfc4733

extensions.conf — outbound bridge

[from-internal]
exten => _NXXNXXXXXX,1,NoOp(Outbound to VoiceTel)
 same => n,Set(CALLERID(num)=${YOUR_DID})
 same => n,Dial(PJSIP/${EXTEN}@voicetel,60)
 same => n,Hangup()

extensions.conf — inbound landing context

[from-voicetel]
exten => _.,1,NoOp(Inbound from VoiceTel)
 same => n,Goto(internal,${EXTEN},1)
 same => n,Hangup()

Verify

# Asterisk CLI
*CLI> pjsip reload
*CLI> pjsip show registrations
*CLI> pjsip show endpoints
*CLI> pjsip set logger on    # SIP trace