External call to internal extension


I have E1-dahdi trunk. Through this trunk i receiving calls, some of this calls has 6-digits did number some of 3 digits digit number.

i want to get this one: When pbx receive call with 3 digit did number i should transfer this call to extension.

For example: I receive call with did 204. Then phone with numbered 204 should ringing.

Can you try using inbound routes?

DID: 204

Dest: Extension | 204

Yes i can do that in theory, but i have about two hundred extensions and i don’t want create two hundred inbound routes.

You will need to create inbound DIDs for each one. Go look at using the Bulk DID import module should save you alot of time.

Alternatively, you can write your own context, then use it, something like this

exten => _20X,1,NoOp(firing to internal, lets see…)
exten => _20X.n,Goto(from-did-direct,${EXTEN},1)
exten => _20X.n,Hangup()


exten => _20X,1,NoOp(firing to internal, lets see…)
exten => _20X.n,Goto(from-internal,${EXTEN},1)
exten => _20X.n,Hangup()

Then in your chan_dahdi.conf, set the context to from-pstn-funky or funkier…

There could be privacy issues tho, so make sure to limit your dialplan to nothing like . or .X… :smiley:

Still yet, as tony says, do it one at a time or Bulk DID…