Asterisk 'sip.zadarma.com' PJSIP trunk

local_net - локальная сеть (например 192.168.0.0/24)
external_media_address = внешний IP
external_signaling_address = внешний IP
SIP_USER - SIP логин
SIP_PASSWORD - SIP пароль

/etc/asterisk/pjsip.conf

Global PJSIP Settings

[global]
type=global
user_agent=Asterisk 13.8.2

Transport PJSIP

[0.0.0.0-udp]
type = transport
protocol = udp
bind = 0.0.0.0:5066
; NAT settings
local_net = 10.0.0.0/8
external_media_address =  123.123.123.123
external_signaling_address =  123.123.123.123

AOR

[zadarma]
type=aor
qualify_frequency=400
contact=sip:SIP_USER@sip.zadarma.com:5060

AUTH

[zadarma]
type=auth
auth_type=userpass
password=SIP_PASSWORD
username=SIP_USER

ENDPOINT

[zadarma]
type=endpoint
transport=0.0.0.0-udp
context=from-zadarma
from_user=SIP_USER
from_domain=sip.zadarma.com
disallow=all
allow=alaw,ulaw
outbound_auth=zadarma
aors=zadarma

IDENTIFY

[zadarma]
type=identify
endpoint=zadarma
match=sip.zadarma.com

REGISTRATION

[zadarma]
type=registration
transport=0.0.0.0-udp
outbound_auth=zadarma
retry_interval=120
max_retries=10
expiration=3600
auth_rejection_permanent=yes
contact_user=SIP_USER
server_uri=sip:sip.zadarma.com:5060
client_uri=sip:SIP_USER@sip.zadarma.com:5060

~~socialite~~

  • asterisk/zadarma_pjsip_trunk.txt
  • Последние изменения: 2016/12/17