我想使用来自文件系统的调用。
file.call 看起来像这样:
;------------------------------------
Channel: Dongle/dongle0/07xxxxxxxx
MaxRetries: 2
RetryTime: 60
WaitTime: 30
Context: testing
Extension: 07xxxxxxxx
CallerID: 07xxxxxxxy
Priority: 1
;------------------------------------
extension.cof 像这样:
;--------------------------------------------------------------------------
[testing]
exten => s,1,Answer()
exten => s,n(lbl_testing_0),Set(TIMEOUT(response)=10)
exten => s,n,Set(TIMEOUT(digit)=1)
exten => s,n,Background(custom/nice_sound)
exten => s,n,WaitExten(10,m())
exten => s,n,Hangup()
exten => 1,1,SayDigits(1)
exten => 1,n,Playback(tts/sound1)
;exten => 1,n,System(/bin/echo "peresed key 1 and save in txt and mysql after" >> /var/spool/asterisk/key1.txt)
exten => 1,n,MYSQL(Connect connid 127.0.0.1 asterisk password asterisk)
exten => 1,n,MYSQL(Query resultid ${connid} INSERT INTO `keys` (`key`,`number`,`date`) VALUES (${EXTEN},${CALLERID(num)},now()))
exten => 1,n,MYSQL(Disconnect ${connid})
exten => 1,n(lbl_testing_1),Hangup()
exten => 2,1,SayDigits(3)
exten => 2,n,Playback(tts/sound2)
exten => 2,n,Goto(1,lbl_testing_1)
exten => 3,1,SayDigits(3)
exten => 3,n,Playback(tts/sound3)
exten => 3,n,Goto(1,lbl_testing_1)
exten => 4,1,Playback(tts/sound4)
exten => 4,n,Goto(s,lbl_testing_0)
exten => i,1,Playback(invalidValue)
exten => i,n,Goto(s,lbl_testing_0)
exten => t,1,Playback(timeout)
exten => t,n,Goto(s,lbl_testing_0)
exten => 111,1,Dial(PJSIP/111)
exten => 111,n,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL"]?lbl_testing_3:)
exten => 111,n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?lbl_testing_3:)
exten => 111,n,GotoIf($["${DIALSTATUS}" = "BUSY"]?lbl_testing_3:)
exten => 111,n(lbl_testing_2),Hangup()
exten => 111,n(lbl_testing_3),VoiceMail(testing@111,s)
exten => 111,n,Goto(lbl_testing_2)
;--------------------------------------------------------------------------
它以某种方式起作用。
问题是:我如何把这个拨号计划只放在 file.call 中,不再使用 extension.conf 中的 [testing] 和所有设置来使它在我自动移动到 /var/spool/asterisk 的那个 file.call 中/传出
我试过这样:
;------------------------------------
Channel: Dongle/dongle0/07xxxxxxxx
MaxRetries: 2
RetryTime: 60
WaitTime: 30
Extension: 07xxxxxxxx
CallerID: 07xxxxxxxy
Application: Playback
Data: custom/nice_sound
;------------------------------------
但我找不到如何添加其余的拨号方案设置并保存在 mysql 中
有人知道怎么做吗?可以这样工作还是我太梦幻了?
非常感谢!