FreePBX | Register | Issues | Wiki | Portal | Support

Manipulate dialplan to call other extension?

(Art) #1

we have an old Sip provider (for the company’s extensions) here and we also installed a Freepbx server, that we are messing around with, a configured FxO Gateway (extension 000281) and a 217 extension on my desk, so when call my FXO (000281) then type my desk extension (217) it would dial here.

What i’m trying to do is, if I can make a dialplan on the FreePBX or the gateway, which when someone calls dials 217 it would call 000281 + 217 = (the fxo gateway then my extension) which would reach me directly… is it possible?


Yes, this is very possible, with a lot of was to solve. You can make a custom context, here are some leads to get you in the right direction:

(Art) #3

Hmm, alright i think that’s the way, but i’m still a bit confused… let’s see what i’m doing wrong:

i made a custom ext like this

exten => 2XX,1,Dial(Local/000281@from-internal,30,D(www2XX))
exten => 2XX,1,Hangup

2XX being the extension behind the FXO I still dont have access, but is acessible by the FXO (if i call 000281 and then type the 2XX ext I can reach someones phone)

000281 being the extension registered on the FXO, which is able to reach the companies extensions 2XX

i’d also need a “custom dialplan” as lorne said in the other post, so a created a Custom Destination:


that’s correct?

do i also need to create the 2xx range extensions even they are not from my pbx?

(Art) #4

I created a Misc Application with an extension 218, and set its destination to the FXO extension (000281) with this, it calls fxo with another number still not what i need
i need to call a number 2XX it would call the FXO extension and dial another extension, thus dialing here

(Daniel Friedman) #5

Hello @sxarthur,

Add your custom dialing to the from-internal-custom context like that:

exten => _2XX,1,Dial(Local/000281@from-internal,30,D(www${EXTEN}))
exten => _2XX,n,Hangup 

Add these lines to the extensions_custom.conf file and reload the dialplan from the linux console like that:
rasterisk -x'dialplan reload'

Thank you,

Daniel Friedman
Trixton LTD.

(Art) #6

wow thanks! it kinda worked! for some reason asterisk doesnt recognize the 2XX only the full number, i did one with my extension here 217 and it worked! do you have any idea why it doesnt read with the 2xx?

exten => _2XX,1,Dial(Local/000281@from-internal,30,D(www${EXTEN}))
exten => _2XX,n,Hangup 

(Art) #8

thanks man, both were great help, it’s working! @Stewart1 @danielf

(Daniel Friedman) #9

Hi @sxarthur,

I missed the underscore that indicates a pattern in the dial plan. This is what happens when you are in a hurry for a family dinner… I fixed my example in my answer. Good catch @Stewart1.

Thank you,

Daniel Friedman
Trixton LTD.

(Art) #10

yeah no problem, you were of great help. I had just figured out the minute Stewart replied lol, thanks!

(system) closed #11

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.