Inbound route to Trunk

I have a hosted PBX with trunks back to an on premise unit with trunks distributed across multiple lines for resilience and bandwidth management.

To make this work on the hosted unit I’m setting up a misc destination for each DDI I need to pass through to the on premise unit and using that in an inbound rule matching the DDI. Is there anyway I can create a catch all and pass the incoming DDI on as the destination?

It sounds like you are mis-using FreePBX. I think you actually want something like Kamillo (Kamillio?) to route your SIP around (since that’s what it’s designed to do) instead of using a Back to Back User Agent system like FreePBX. The system is pretty much designed to deliberately not do what you are trying to do.

But then I’d need two boxes to do the same job I have 1 doing currently.

It does what I want to do out of the box, I just thought there might be an easier way to do it.

Kamailio sounds like something more suited to a service provider, plus I’m using IAX to conserve bandwidth.

Would setting the caller ID to the DNID before you send it to the misc. dest work?

How would I set that up, from an inbound route? can I pass over the DNID as a variable to the misc destination somehow?

Use the “Set Caller ID” Application/Module to adjust your callerID(dnid) as desired. For the next step send it to the correct Misc. Dest.

Workflow:
Inbound Route>Set Caller ID> Misc. Dest.

Here is some helpful reading:
https://wiki.freepbx.org/display/FPG/Set+CallerID+User+Guide

I don’t really want to change the CallerID, but if I could pass the DNID to the Misc dest as a variable that would work?
Is there any reference material on available variables?

Thanks for your help so far

You would need to use write some custom code to accomplish this. You can put pretty much put anything into a variable, and build off of it (display, if, etc.).

https://www.voip-info.org/wiki/view/Asterisk+variables
http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/asterisk-CHP-6-SECT-1.html
https://www.voip-info.org/wiki/view/Asterisk+cmd+GotoIf

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