简体   繁体   中英

${CALLERID(RDNIS)} not able to get redirected dialled number in asterisk

I have this situation where I have 2 numbers say A and B which is forwarded to same DID number so the issue is that I want to identify if the call is forwarded from A or B when the caller calls in to specific number.

I have researched a bit and found about ${CALLERID(rdnis)} in asterisk but when am trying to use it gives a blank output. I also tried the DumpChan() command it also gave a (N/A) for rdnis.

Is there any way I can get to know in my dialplan that call is forwarded from A or B ?

I dont have sip my line is normal PSTN. The problem is that the number mentioned in the question A and B are mobile number which are forwarded to DID number and I can only control the code after the DID is called but I cannot identify through which number A or B the call is forwarded on DID.

If your number is sip, you can do

asterisk -r
sip set debug on

After that call in. If you see forwarded number in packet, you can try get it using SIP_HEADER function. If there is no any difference in two calls, you can't recognize did and better use cheap voip did for second number.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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