Forward an inbound ZAP call to an outbound SIP trunk

I need to allow someone to call into our PBX (ZAP) and then allow them to type and extension, then route that call out through another trunk (IAX) to another PBX we have in a second location.

We have already set up the IAX trunk to trunk between the servers and it’s working fine, just can’t get the above process to workout in my head :slight_smile:

How would I do this?



Yep, DISA would do it. The caller will dial into the line handled by the ZAP channel and then (after entering a PIN number hopefully) be given a PBX dial tone and then be able to dial the extension required.

Yeah, that would work but i don’t want the caller to know the transfer is happening.

  1. Outside caller needs to be able to dial into PBX A and be transferred to B after typing in extension

  2. Internal caller needs to be able to dial the same extension and be routed to PBX B.

Then don’t use a pin but make sure the DISA context you use can only dial extensions. Perhaps from-pstn or from-internal-custom (which you will write) depending on how you defined your tie-line to B

Okay, so I set up DISA on the box, but how do I get someone to dial an extension and automatically be trnasferred (without audio prompts) to the other PBX as if they had dialed a normal extension. How do I get it to work internally?

Disclaimer: I have only used DISA to dial into IVR, select an option, get a dialtone, and dial out.

Just create an outbound route with the digit pattern you want setting the destination as the IAX trunk

But that won’t work for external calls correct? Ie. I have an IAX trunk that forwards internal calls to the extension to the outbound route to the other PBX, however, it does not seem to work if someone calls in from an external line.

That is all about contexts and what is “included” in them, if the caller calls in with the context from-internal it will work, but they can also call China, it is up to you to define a set of contexts that are included in your base context that DISA uses that allows what you want yet disallows what you don’t want.

A simple view of the Astwerisk CLI as you place an internal call to Box B will give you a clue.

So if I have:


as my IAX trunk peer details, I would add from-pstn to the context and it transfer a call from the outside as well? What’s the syntax for two contexts?

no, it’s the context of the DISA call that you need to define to be restrictive.

Okay, so there are two purposed solutions as I am getting feedback:

  1. Use DISA
  2. Use the outbound route

I was asking the “two contexts” question about the outbound route solution. I see that these were getting confused…

I don’t understand how DISA would solve my problem without using a DID. Our POTS lines are in a hunt group so I would still have to have someone key into the DISA from the IVR and then select an extension. Correct? If so, this is not what I am looking for.

Again, I want to have someone dial our number, hit the IVR, type the extension, and be seamlessly sent to the other PBX. No audio cues. No extra typing.

Does this make sense?

I now see what you neglected to asy before, you are using an IVR,your IVR can only call local extensions, you will need to define as “custom extensions” all the “foreign” extensions individually for them to be considered local.

custom extension 1234 has

custom dial = IAX2/yourtrunk/1234

for example

That worked! I have been looking for that answer online for a year. Thank-you so much!

You are welcome, perhaps if you had properly asked the question with full details from the start, you would have had the answer sooner :slight_smile:

Dicko. :slight_smile: