How do I get an incoming DID passthrough to DUNDi

Here is what I have,
I have a number that belongs to someone in my DUNDi cloud. I have one server that is brining in all the DID’s for this cloud.

I am trying to find a way to get a path that will allow an incoming DID to be passed to the DUNDi cloud.

My goal was originally to just put the DID number into the DUNDi trunk and have it pass it on. It seems that the incoming path (from-trunk), as expected, does not have any knowledge of this. My next thought was to get the path known to incoming trunk.

I have tried different ways, one was to create a custom app that would useng the macro dialout-dundi, I would then put the DID as an incoming route and point the DID to this app, this does not work.

I am really am lost as to what I can do, can I get some direction or path as to what might make this work?

Thanks

provide a step by step example of what you mean and I’m sure a straight forward answer can be supplied. I’m a little confused form your description.

I have one asterisk server that is setup with DID’s from different providers.

I have a number of locations that are setup as a part of a DUNDi cloud. None of them are attached to internet except over a WAN connection that comes into the same location as the primary Asterisk server.

What I then have done is on each of the locations created an incoming route for each of the DIDs that are for that location.
DUNDi lookup finds the DID’s at the proper server as expected.

At the primary server I have a DUNDI trunk that I put the extensions as well as the DID’s that will be routed to each of the other DUNDi servers.
If I dial the numbers anywhere within the DUNDi cloud (each server knows to dial out the DUNDi trunk for numbers that are not at it’s location, as the DUNDi trunk is the outgoing for all calls)

What I want is to have the DID be put through the DUNDI trunk when a call arrives from outside, no matter how it is to be done.

What would be nice is the ability to have a choice in incoming routes to point to a DUNDi trunk for DID’s

Please let me know if I need to supply more information.

Thanks

OK, here is an example that might help.

I have purchased an 1800XXXXXXX number that one of my locations will need to use. I provide all of there phone services over DUNDi.

When I get this number I go to the locations asterisk server configure the inbound route with the number in the incoming DID.

I save the configuration and then go to asterisk cli and do a
"dundi lookup 1800XXXXXXX@priv" . It responds with

  1. 0 IAX2/priv:[email protected]/1800XXXXXXX(EXISTS)
    

So, everything is good there.

I go to my asterisk server and and in freepbx in the outbound routes for DUNDi. I add the number 1800XXXXXXX, this step lets asterisk dialplan know how to get to this number, instead of going out the default. This route sits at the top of all the other routes.

So I then go to one of my phones within the DUNDi cloud. I dial the 1800XXXXXXX and it rings (all of the locations are configured to go via the DUNDi for non local extensions and numbers)

So now what I want to do is expose this number to the actual incoming call from the ITSP.

So with the way that FreePBX does things you have to have some outbound route can be pointed to from within an inbound route. Being able to do this would allow calls that come in that are not destined for my server but for another to be told to go via the DUNDi cloud.

Please let me know if I can fill in more details if needed.

I have been trying a number of ways using custom destinations but it seems that this is not going not work.

Thanks

P.S. If needed I can configure my FreePBX for access via the internet. If what I have stated here does not make sense.

Here is what I have done, in extensions_custom.conf

[from-pstn-custom]
include => outrt-001-DUNDI

With this as long as I put the numbers that are on the DUNDi cloud, it will work.

I had to create a separate DUNDi context for internal extensions, for security.

I know this is not the best way to handle this but I will need to learn more before I can create something complicated.