Asterisk incoming call DID question (number dialed)

北慕城南 提交于 2019-12-13 04:20:04

问题


I am setting up a new Asterisk system at a hosted Asterisk provider using 1.4.38, moving from a self-hosted version 1.2. Whereas before I could do: [incoming]
exten => _1NXXNXXXXXX,1,DoSomething

Now, it appears the incoming context will only get properly called if it is:
[incoming]
exten => s,1,DoSomething

How do I determine what number was dialed in this scenario? We have dozens of numbers and I need to be able to know which was called to route correctly...

Thanks,
Ben


回答1:


You can use a pattern. I have this line in a running asterisk instance:

exten => 5858876463,1,Set(__FROM_DID=${EXTEN})

However, to answer your question, you can use the ${EXTEN} variable to decide what number was called. E.g.

exten => s,1,SomeScript(${EXTEN})



来源:https://stackoverflow.com/questions/4515410/asterisk-incoming-call-did-question-number-dialed

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