Asterisk, keys don't work on background command,just after background

你离开我真会死。 提交于 2019-12-20 05:49:26

问题


[out]
exten=>_X.,1,Answer()
exten=>_X.,n,Background(hello)
exten=>_X.,n,WaitExten(5)

exten=>1,1,Goto(check,s,1)

Audio menu are playing, but when I press 1, sound stop and after few second check command run. How to quickly respond to a user request?


回答1:


You are doing begginer error which described in almost any asterisk book for beginer.

I recommend you read "Asterisk The Future of Telephony" by O'Relly.

This exact error is simple:

  • in your dialplan you have extension _X., which mean "any number starting with digit.
  • you ask asterisk waitfor extension selected in this context.
  • you are pressing digit, but acordinly to context you may want enter 1111(also fit you context). So asterisk wait upto TIMEOUT(digits) until you enter next digit.
  • your timeout is 5 second, so it go ext 1 in 5 second.

[Syntax]

BackGround(filename1[&filename2[&...]][,options[,langoverride[,context]]])

You can use other context for matching.



来源:https://stackoverflow.com/questions/54944814/asterisk-keys-dont-work-on-background-command-just-after-background

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!