DUNDi with FreePBX

Hello,

I can make and receive calls using DUNDi across multiple servers. I tried to do this in FreePBX as much as possible (like creating an IAX2 trunk in FreePBX instead of iax_custom.conf, no crazy macros in extension_custom or custom trunks and such). I’m using 2.9.07 and asterisk 1.6.2.20.

Anyway, I was hoping that someone could take a look at the below and let me know if I’m missing anything critical. Like I said, it does work. I will have to add DIDs (to avoid making outgoing calls when not required) and such but for the most part I think this is a working configuration.

I know that the connection between the two servers (keys and peering) is correct and because they can talk and lookup each others extensions. Lots of docs online about doing this so I haven’t included my configs on that below.

My mapping in /etc/asterisk/dundi.conf is:

priv => dundiextens,0,IAX2,priv:${SECRET}@192.168.1.123/${NUMBER},nopartial

I then created an IAX Trunk on both servers in FreePBX named privIAX with a trunk name ‘priv’ and the Peer details of:
type=friend
dbsecret=dundi/secret
context=dundiextens

I created a DUNDi Trunk on both servers named privDUNDi with an outgoing mapping of ‘priv’.

I then created an outbound route called DUNDi-Lookup that will match my current extension schemes (1xxx on box A and 2xxx on box B). I only have one trunk in each trunk sequence - since I’m only matching internal extensions at the moment, in the future when I add the DIDs we use I assume I will have it first search privDUNDI and then secondly an outbound route in case DUNDi returns no results).

The last file I edited is extensions_custom.conf and it has:
[lookupdundi]
switch => DUNDi/priv
[dundiextens]
include => ext-local

Please let me know if something obvious is missing, because I’d like to set this up in a production environment as soon as I’m comfortable with it.

Also, I’m trying to figure out a way to use DUNDi to do a universal company dial-by-name directory. I’ve thought of - and read online others had similar ideas - using different vm contexts on the different pbx’s and rsync’ing the voicemail.confs so that no matter what office is called you can search the whole company and get the person you are looking for and they get connected via DUNDi.

What others haven’t addressed - at least not in their online posts about this topic - and I can’t seem to think of a solution for is how to handle the case that you’ve just rsync’ed the voicemail.conf and for some reason the pbx’s can no longer talk to each other. DUNDi will fail and the customer will get a confusing error message.

I’ve thought of rsync’ing the whole vm dir, but asterisk still won’t be able to place the file there unless you setup the extensions in each box and that doesn’t make sense.

Any ideas on this topic would also be greatly appreciated.

Thanks!

Hi, I know you posted this a long time ago, but I was wondering if you ended up adding DIDs? If so how did you do it? I am asking as your configuration for extension calling/lookup in extensions_custom.conf is the only one that I have found that has been successful, out the many examples I have found on the Internet. And I love how simple it is.

I am now trying to get routing of external calling to and from the dundi peers to work, but I just can’t get it right.

Thanks for any assistance you can provide.