23 августа 2012 г.

Проброс входящего звонка - asterisk

SIP.CONF:

[general]
context=office

register => login:passw@ip_server_voip/202

[202]
type=friend
host=dynamic
username=202
secret=<passwd>
nat=no
canreinvite=no
context=office
callerid=user2 <202>
allow=gsm
allow=ulaw
allow=alaw

[overlink_sip]
dtmfmode=rfc2833
type=peer
host=sip.overlink.su
fromuser=ID
fromdomain=sip.overlink.su
secret=<PASSW>
username=<LOGIN>
canreinvite=no
context=local
disallow=all
allow=g729
allow=g723
allow=g723.1
allow=gsm
allow=ulaw
allow=alaw


extensions.conf:

[office]
; Обычный SIP пользователь 201
exten => 201,1, Dial(SIP/201,40)
exten => 201,2, Playback(vm-nobodyavail)
exten => 201,3, Voicemail(201@default)
exten => 201,n, Hangup

exten => 200,1,Wait(1)
exten => 200,n,Answer()
exten => 200,n,Agi(/usr/isp/weather/weather.pl)
exten => 200,n,Hangup()

; Пользователь 202 с sip
exten => 202,1, Dial(SIP/202,40)
exten => 202,2, Playback(vm-nobodyavail)
exten => 202,3, Voicemail(202@default)
exten => 202,4, Hangup
exten => _8./202,1,Dial(SIP/${EXTEN}@overlink_sip,40)