HELP AAH 2.8 and external PBX problem

Hi all.
I´m having a problem that is probably trivial for you (not for me) :smiley:

I´ve just installed an Asterisk@home 2.8 with 3 extensions (200 to 202) and connected via three FXO ports to extension lines coming from an old PBX.
These lines are the 142X form.
When an extenal call comes from the PBX via the FXO ports I can answer with no problem
Then, I want to transfer this call to a PBX extension, press “#” but then asterisk waits for an internal extension, so “1425” is a non-existent extension.
How can I signal that this is a PBX extension and not a AAH one ?
Thanks for your help.


You can use pattern matching and route the 142X call to PBX:

You can put it into extensions_custom.conf, create [ext-local-custom] context:

exten => _142X,1,Dial(Zap/g1/${EXTEN})

where g1 is your group of lines connecting into PABX.

Hi mirceahuh
Thanks for your help !
Only one more question.

Adding this line, we´d indicate that all numbers dialled in the form 142X would be routed to the g1 trunk.
So, we´d proceed the same way: answer the call, push “#” and then, the extension number, either 2XX or 142X form ?

Thanks again !

Yes, you are correct. You can transfer calls to 2XX or 142X extensions.

Please let me know if it is working.

Hi again.
I´ve just tried your solution but I didn´t manage to solve the problem.
I added these lines at the bottom of the file:

exten => _142X,1,Dial(Zap/g2/${EXTEN})
exten => _142X,1,Dial(Zap/g3/${EXTEN})

(g2 and g3 are the trunks connected to the old PBX)

Restarted asterisk but no luck. Perhaps I had to include this context in some other configuration file. Sorry but I don´t really understand all the tricks.

Thanks again !

do you really have these trunk groups ? your zapata.conf file will show you how your trunks are arranged into groups. there will be no need to have muliple dial statements if you’re using a group as Asterisk will find the first unused trunk in the group to dial with.

if you’re still having problems, post the log file entries that correspond to the attempted call.

if the trunks are there, it should work. I would suggest if you are using AAH/freepbx though, that you do what you are doing as an outbound route. Use the same type of pattern matching and create a route to that trunk in the outbound routes section, and then make sure you create a trunk there.