asterisk 对接外线呼入

 编辑 sip.conf 

[Trunksip]

type=friend
qualify=yes
insecure=port,invite
port=5060
host=对接IP
fromdomain=对接IP
disallow=all
allow=g729
allow=ulaw
dtmfmode=rfc2833
nat=yes
context=trunkinbound ;呼入转到的context
 
extensions.conf
[trunkinbound]
exten => _X.,1,Background(语音文件)
exten => _X.,n,WaitExten(1)
exten => 0,1,Queue(B,t,,,15) ;按0转到Queue列队 B
exten => 1,1,AGI(agi2)  ;按1转到AGI2
exten => 2,1,Goto(phone,1000,1) ;按2转到 拨打分机1000
exten => i,1,Playback(error)
 
 
[phone]
 
exten => 1000,1,Dial(SIP/${EXTEN})
exten => 1000,n,Hangup()

 

你可能感兴趣的:(asterisk,对接外线呼入)