Feature Codes over IAX2

Hello all,

I have two Freepbx systems running and linked together over a VPN and IAX2:

Extensions [100-120 ] ===> PBX(A) -------- [ VPN ] -------- PBX(B) <=== Extensions [200-220]

Each one has their own extensions (pjsip and regular sip) and everything works perfectly. Extensions are able to call each others and both systems are sharing their trunks. However Is there any way to call the feature codes of the other PBX??? For example: from extension 100 to call any feature code of PBX(B). Ideally, I would like to know if there is a way to do it out of an outbound route.

Till now, I am able to do this by registering an extension of one side to the other. And this because I am inside a vpn and a common subnet. But I want to know if I can do it natively from an extension 1xx to PBX(B) or from 2xx to PBX(A).

All I want (as example) is… when extension 101 is calling *43, you should listen the echo test of PBX(B).

Thanks for your time

In what context is the ‘tie-trunk’ ? (it probably should be ‘from-internal’ )

Yes. IAX2 trunks are using “from-internal” context

However, I may have to create a custom context for use in extension 101… Any suggestion is welcomed.

Asterisk Trunk Dial Options:

D(called:calling) Send the specified digits after the called party has answered, but before the call gets bridged. The ‘called’ digits are sent to the called party, and the ‘calling’ digits are sent to the calling party. Both arguments can be used alone.
h Allow the called party to hang up by using the In-Call Asterisk Disconnect code (default value is **)
H Allow the calling party to hang up by using the In-Call Asterisk Disconnect code (default value is **)
i Any forwarding requests that may be received on this dial attempt will be ignored.
I Any connected line update requests or any redirecting party update requests that may be received on this dial attempt will be ignored.
r Generate ringing to the calling party, even if the called party is not actually ringing. Pass no audio to the calling party until the called channel has answered.
S(x) Hang up the call x seconds after the called party has answered the call.
t Allow the called party to transfer the calling party by using the In-Call Asterisk Blind Transfer code (default value is ##)
T Allow the calling party to transfer the called party by using the In-Call Asterisk Blind Transfer code (default value is ##)
w Allow the called party to enable recording of the call by using the In-Call Asterisk Toggle Call Recording code (default value is *1)
W Allow the calling party to enable recording of the call by using the In-Call Asterisk Toggle Call Recording code (default value is *1)

Hi @comtech ,

Do you think that I have to turn my “Asterisk Trunk Dial Options” to Override and specify TD?? Can you please be more specific???

Thanks for your time

Which feature code(s) are you trying to invoke?

Actually I want to be able to use every feature code but lets say *32 as an example.

That doesn’t make sense. There are certain feature codes that would only make sense to be performed on the local box that hosts the extension, right?

In the example of *32, you want to call someone on PBX A and then you want them blacklisted from calling anyone on PBX B ever again?

Can you share more details on what specific functionality, other than everything, you are trying to achieve?

From the asterisk CLI

dialplan show *32@
dialplan show @from-internal
so put them together

dialplan show *32@from-internal

I’ve not tested this, but would assume that if you have an Outbound Route that matches some way of specifying the feature code and that goes over the intracompany trunk with context from-internal, the feature code will execute on the remote system. For example, the PBX A route has
prepend: (blank)
prefix: 0
match pattern: *XX

then if you dial 0*32 from PBX A, it will run *32 on PBX B.

Alternatively, if you disable *32 on PBX A and have an Outbound Route with
prepend: (blank)
prefix: (blank)
match pattern: *XX

then you could dial *32 on PBX A and it would run on PBX B.

Hi @Stewart1

This is exactly what Im currently doing. I am assigning a prefix and setting up a pattern in the intra-company outgoing route. But I am wondering if this could be done by using a custom context in the specific extension you want to be able to use the other end’s feature codes. In that case, you don’t need any prefix for the other end’s codes. As I wrote before, lets say that whenever you type *43 from extension 101 you are taking echo test from PBX(B). And of course in this case, extension 101 could not have access to local feature codes (A).

Thanks for your time

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