开发者

Asterisk incoming call DID question (number dialed)

开发者 https://www.devze.com 2023-02-01 09:21 出处:网络
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:

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]

开发者_Go百科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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号