Dialing from outside

I want to call from outside, dial a “code” and then dial whatever number and phone to that number.

I have done it when you know the number you are calling, for example. I dial 1234 and then 200 is called.


exten => 1234,2,Dial(Local/200@from-internal,20)

Where 200 is a cell number.

The question is… how can i change that so after 1234 i can dial ANY number… basicly, converting 200 it in a “variable” i can “dial”.

exten => _X.,2,Dial(Local/${EXTEN}@from-internal,20)
_X. should match everything pressed on the phone.

It should, but it is not…

exten => 098776.,2,Dial(Local/${EXTEN}@from-internal,20)

Works, dialing 098776, but

exten => 0XXXX.,2,Dial(Local/${EXTEN}@from-internal,20)

does not…


post full
[from-outside] context
try _
exten => _0XXXX.,2,…
mayby this _ matter more that we think

i think you should look at the DISA application : voip-info.org/wiki/index.php … k+cmd+DISA

to authenticate the caller first. you can write your own equivalent using basic dialplan functions, but DISA is pretty useful.

when i use DISA, i put an IVR in front of this with the DISA option “hidden”, i.e. not mentioned in the IVR background message.

once you’re authenticated then you have access to the context specified and can call internally/externally/whatever is available to that context.