简体   繁体   English

呼叫挂断需要时间-星号拨号计划

[英]Call hangup take time - asterisk dialplan

I wrote dialplan for my Asterisk system. 我为Asterisk系统编写了Dialplan。 The extension.conf is : extension.conf是:

extensions.conf extensions.conf

[from-pstn]
exten =>s,1,Verbose(1, Caller ${CALLERID(all)} has entered the paf IVR)
    same=>n,Answer()
    same=>n,Wait(3)
    same=>n,Playback(welcome)
    same=>n,GoSub(post,ss,1)
    same=>n,Playback(thanks)
    same=>n,Hangup()

[post]
include => default_cont
exten => ss,1,Background(gud/post)
    same=>n,WaitExten(5)
exten => 1,1,Set(CDR(aa)=136)
    same=>n,Return()
exten => 2,1,Set(CDR(aa)=137)
    same=>n,Return()

[default_cont]
exten => i,1,Playback(invalid)
    same=> n,Hangup()
exten => t,1,Playback(timeout)
    same=> n,Hangup()
exten => h,1,DeadAGI(convert_recordings.sh)
    same=>n,DeadAGI(my_uploader.php,${var1},${CALLERID(num)},${CDR(var2)},${CDR(aa)})`

When i call to my asterisk system. 当我致电我的星号系统时。 it takes time to hangup after playing thanks audio file. 播放感谢音频文件后,挂断电话需要一些时间。 Actually, call hangup after all AGI execution are completed and my_uploader.php execution takes time. 实际上,在完成所有AGI执行并且my_uploader.php执行需要时间后,调用hangup。 But i need instant hangup after playing thanks message. 但是我在播放感谢消息后需要立即挂断电话。 System only executes AGI files after the call is completely hangup. 呼叫完全挂断后,系统才执行AGI文件。 How can i solve this problem ? 我怎么解决这个问题 ?

Thats becuase you have h extensions in your dialplan 那是因为您的拨号方案中有h个分机号

So it will take time while you agi on h-extension ends. 因此,当您进行h扩展的agi结束时,将需要一些时间。

You can use cdr info and run external script based on that. 您可以使用cdr info并基于此运行外部脚本。 You can write dialplan on hexten(not agi). 您可以在hexten(而非agi)上编写Dialplan。 You can write faster(not blocking) agi. 您可以编写更快(不阻止)的agi。

Very likly your uploaded or conversion task take time. 很高兴您的上传或转换任务需要时间。 You have only notate somewhere in db what you have to do and do that in external thread, not in asterisk. 您只需在db中的某处注释您必须执行的操作,并在外部线程中执行此操作,而不是在星号中执行。

That way you will not block asterisk thread. 这样,您将不会阻止星号线程。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM