How to get Incoming Dialed Number on PRI (HELP)

Hi Guys… My asterisk has a PRI card conected to my provider PSTN network and i want to redirect an incoming call entering from the PSTN to an especific ip extension registered in my asterisk depending on the phone number dialed by someone in the PSTN. My PSTN provider has assigned various DID to my PRI.

Hi

you need to speak to the supplier and check what they are sending you.

for example is the are sending 691000 to 691999 and your extensions are 200 to 299

then

exten => _691XXX,1,Dial(SIP/2${EXTEN:4})

would do what you want.

Ian

Hi… You’re right… Thank You!!! :smile:

[quote=“ianplain”]Hi

you need to speak to the supplier and check what they are sending you.

for example is the are sending 691000 to 691999 and your extensions are 200 to 299

then

exten => _691XXX,1,Dial(SIP/2${EXTEN:4})

would do what you want.

Ian[/quote]

Just to add to what Ian said. In general when I don’t know what is being sent to me I create a “catch all” extension that tells me what “extension” was called.

[code]
Exten => _X.,1,Noop(THE EXTENSION DIALED IS ${EXTEN})