Determining DDI number dialed by caller

Hi,

We use BT isdn in the UK for our companies phone system.

We have multiple ddi numbers and we want to determine which number has been called by someone so we can direct them to the correct team in our office

We’ve entered a few verbose lines into extension.conf to echo some variables that we thought might spit out what we need but when we view the result on the asterisk cli nothing shows up

This is what we have entered into extensions.conf

same => n,Verbose(2,callerid is ${EXTEN})
same => n,Verbose(2,callerid is ${CALLERID(name)})
same => n,Verbose(2,callerid is ${CALLERIDNAME})
same => n,Verbose(2,callerid is ${DNID})
same => n,Verbose(2,callerid is ${RDNIS})

Could someone help me to find a way of identifying the number dialled by the caller?

Hope this makes sense. I’m very new to asterisk

Thanks! :smiley:

Hi,

You’re probably getting the last four digits of your DDI number from BT, you could try the following as the first line of your context for inbound ISDN calls, it should show the digits received in the CLI hopefully.

This should probably be in Asterisk Support.

Regards

This _X. will capture any DID.

exten=>_x.,1,Answer()
same=>n,NoOp(Incomming call from ${EXTEN})