/etc/asterisk# cat sip.conf
[general]
context=default 4 MAYO” ; Default context for incoming calls
bindport=5060 wholesale jerseys ; UDP Port to bind to (SIP standard port is move 5060)
bindaddr=0.0.0.0 wholesale mlb jerseys ; IP address to bind to (0.0.0.0 binds to all)
srvlookup=yes wholesale nfl jerseys ; Enable DNS SRV lookups on outbound calls
register=login_na_sipnet:password_na_sipnet@sipnet.ru/sipnet_ID
[200] ; xlite phone
type=friend
host=dynamic
username=200
secret=123321
nat=no
canreinvite=no
context=office
callerid=»User1″
allow=gsm
allow=ulaw
allow=alaw
disallow=all
[201] ; xlite phone
type=friend
host=dynamic
username=201
secret=333333
nat=no
canreinvite=no
context=office
callerid=»User2″
allow=gsm
allow=ulaw
allow=alaw
disallow=all
[202] ; xlite phone
type=friend
host=dynamic
username=202
secret=3232323
nat=no
canreinvite=no
context=office
callerid=»User3″
allow=gsm
allow=ulaw
allow=alaw
disallow=all
[sipnet]
dtmfmode=rfc2833
type=peer
host=sipnet.ru
;fromuser=ID
fromdomain=sipnet.ru
secret=password_na_sipnet
username=login_na_sipnet
canreinvite=no
;insecure=very
context=local
disallow=all
allow=g729
allow=g723
allow=g723.1
allow=gsm
allow=ulaw
extensions.conf часть )
———————————————————————————
[office]
exten => 200,1, Macro(stdexten,200,SIP/200)
exten => user1, 1, Goto(200|1)
exten => 201,1, Macro(stdexten,201,SIP/201)
exten => user2, 1, Goto(201|1)
exten => 202,1, Macro(stdexten,202,SIP/202)
exten => user3, 1, Goto(202|1)
exten => 201,1, Dial(SIP/201,40)
exten => 201,2, Playback(vm-nobodyavail)
exten => 201,3, Voicemail(202@default)
exten => 201,4, Hangup
exten => ) _8./201,1,Dial(SIP/${EXTEN}@sipnet,40)
include => demo
[macro-stdexten]
exten => s, 1, Dial (${ARG2},20,t [4] )
exten => s, 2, Goto(s-$(DIALSTATUS),1)
exten => s-NOANSWER, 1, Voicemail(u${ARG1})
exten => s-NOANSWER, 2, (Goto(default,s,1))
exten => s-BUSY, 1, Voicemail(b,${ARG1})
exten => s-BUSY, 2, (Goto(default,s,1))
exten => _s-., 1, Goto(s-NOANSWER)
exten => a, 1, VoiceMailMain(${ARG1})
[Moscow]
exten => _7495XXXXXXX,1,Set(CALLERID(all)=”SipPhone” )
exten => _7495XXXXXXX,2,Dial(SIP/sipnet/${EXTEN},120)
exten => _7495XXXXXXX,3,PlayBack(noanswer)
exten => _7495XXXXXXX,4,HangUp
exten => для _7495XXXXXXX,305,PlayBack(busy)
exten => _7495XXXXXXX,306,HangUp
exten => _7952XXXXXXX,1,Set(CALLERID(all)=”SipPhone” )
exten Already => _7952XXXXXXX,2,Dial(SIP/sipnet/${EXTEN},120)
exten => _7952XXXXXXX,3,PlayBack(noanswer)
exten => _7952XXXXXXX,4,HangUp
exten => _7952XXXXXXX,305,PlayBack(busy)
exten => _7952XXXXXXX,306,HangUp