Application for Capturing Digits and Calling


I can’t find help anywhere, and I really need this.

I have Asterisk with a FXO device.

I want to read numbers from my user (in an asterisk application), I do this by using “Read” command, see:

exten => s,1,Answer
exten => s,n,Wait(1)
exten => s,n,Read(digit,vm-enter-num-to-call)
exten => s,n,Dial(SIP/${digit},1)
exten => s,n,HangUp

BUT, i can not use “Dial(SIP/…” because de number informed by the user could be an local or external call (like external IAX2 or local SIP)

How can I call a number in this application like the user is in a PSTN terminal?

Thanks in advance,

To dial on a SIP “trunk” you use:




or you can use an IP address or host name instead of the trunk name, but you will then get default options.

This is no different from a more conventional configuration, where the digit string is collected before the dialplan starts running.

You can use GoTo, to restart the dialplan as though the digits had been collected prior to it starting.

Also consider DISA.

Please make sure that outside lines cannot access your code without being further authenticated.