Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
858 views
in Technique[技术] by (71.8m points)

call - 文件中的星号调用(asterisk call from file)

i want to use the call from file system.

(我想使用来自文件系统的呼叫。)

the file.call looks like this:

(file.call看起来像这样:)

;------------------------------------

Channel: Dongle/dongle0/07xxxxxxxx

MaxRetries: 2

RetryTime: 60

WaitTime: 30

Context: testing

Extension: 07xxxxxxxx

CallerID: 07xxxxxxxy

Priority: 1

;------------------------------------

extension.cof like this:

(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)

;--------------------------------------------------------------------------

Somehow it works.

(它以某种方式起作用。)

The question is: how do i put this dialplan only in the file.call and no longer use [testing] from extension.conf and all the settings to make it in that file.call that i automatically move to /var/spool/asterisk/outgoing

(问题是:如何将这个拨号计划仅放在file.call中,而不再使用来自extension.conf的[测试]及其在该file.call中的所有设置。我自动移至/ var / spool / asterisk /去向)

I tried like this:

(我这样尝试过:)

;------------------------------------

Channel: Dongle/dongle0/07xxxxxxxx

MaxRetries: 2

RetryTime: 60

WaitTime: 30

Extension: 07xxxxxxxx

CallerID: 07xxxxxxxy

Application: Playback

Data: custom/nice_sound

;------------------------------------

but i can't find how to add the rest of the dialplan settings and save in mysql

(但我找不到如何添加其余的Dialplan设置并保存在mysql中)

does anyone know how?

(有人知道吗?)

is it possible to work like this or i'm too dreamy?

(是否可以像这样工作,或者我太梦想了?)

thank you very much!

(非常感谢你!)

  ask by cfg translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...