Help with DUNDI

I am resetting up my DUNDI trunks. I had this working previously, but reloaded one of the systems and didn’t have a backup. I have setup the dundi.conf file with information that should be correct, I have used the other machine that had been working to do this. I setup the keys and am using the same key on both boxes. I have setup the DUNDI trunk and the IAX2 trunk according to the settings used previously. I also have the extensions_custom.conf entry in. As far as I can see everything is identical (except the ip addresses in the proper places). However it is a no go. I can watch traffic between them and see dundi traffic originate from the box that had worked previously, hit the newly reinstalled box and go back, however, there is no dundi traffic leaving the newly setup box at all, to any destination. I have since changed the IAX2 trunks to a peer user setup so I can monitor them better and they are definitely connecting and I see iax2 traffic both ways there, however, still not dundi traffic at all. Please help. Is there another file I need to do something with or some other config somewhere? It seems that if I had something wrong I would still see traffic leaving on port 4520, it just wouldn’t work right, but I have not seen a single packet originate from this interface on that port. Also, the old machine shows 1 dundi peer, where as the reloaded machine does not show any. I will post configs if needed, I just want to see if there’s something I completely missed first.

If your newly rebuilt machine is PBX in a Flash, you will need to go into Webmin and open UDP port 4520 on the firewall. If that isn’t the issue, go ahead and post your configs.

[general]

department=Office
organization=ComputerWorks
locality=NorthBend
stateprov=OR
country=US
[email protected]
phone=+15412179026

bindaddr=0.0.0.0
port=4520

entityid=00:16:E6:D7:50:01

cachetime=3600

ttl=2

autokill=yes

;secretpath=dundi

;storehistory=yes

[mappings]
priv => ext-dundi,0,IAX2,priv:${SECRET}@192.168.103.5/${NUMBER},nopartial

[00:1C:C0:4C:51:1B] ;SmartTalk
model=symetric
host=10.9.0.1
inkey=priv ;SmartTalk.s public key
outkey=priv ;Office.s private key
include=priv
permit=priv
qualify=yes
order=primary

;[*]
;

[general]

department=SmartTalk
organization=ComputerWorks
locality=NorthBend
stateprov=OR
country=US
[email protected]
phone=+15412179026

bindaddr=0.0.0.0
port=4520

entityid=00:1C:C0:4C:51:1B

cachetime=3600

ttl=2

autokill=yes

;secretpath=dundi

;storehistory=yes

[mappings]
priv => ext-dundi,0,IAX2,priv:${SECRET}@10.9.0.1/${NUMBER},nopartial

;[00:16:EC:A2:8A:CD] ;home EID
;model = symmetric
;host = 192.168.104.1
;inkey = priv ;Home.s public key
;outkey = priv ;Office.s private key
;include = priv
;permit = priv
;qualify = yes
;order = primary

[00:16:E6:D7:50:01] ;Office
model=symmetric
host=192.168.103.5
inkey=priv ;Office.s public key
outkey=priv ;SmartTalk.s private key
include=priv
permit=priv
qualify=yes
order=primary

;[*]
;

Identical on both boxes:

type=friend
dbsecret=dundi/secret
context=from-internal
trunk=yes

Also extentions_custom.conf

[ext-dundi]
include => ext-local
include => ext-paging
include => ext-intercom-users
include => ext-group
include => ext-meetme

also created dundi trunk in FreePBX on both boxes using DUNDi Mapping priv

The boxes can talk to each other and iax2 show peers gives:
priv (Unspecified) (S) 0.0.0.0 4569 (T) Unmonitored
on both

In your IAX.conf, try changing the line:

context=from-internal

to

context=ext-dundi

If that doesn’t work, what happens when you do a dundi lookup from the CLI. Also, what response do you get when you do a dundi query from the command line.

The context change didn’t make any difference.

a dundi lookup from both returns:
DUNDi lookup returned no results.
DUNDi lookup completed in 0 ms

a dundi query from both returns:
DUNDi Query EID returned no results.
where I query the EID of the box I’m on or the other box

a dundi show peers on the old box does show:
EID Host Model AvgTime Status
00:16:e6:d7:50:01 192.168.103.5 (S) Symmetric Unavail OK (11 ms)
1 dundi peers [1 online, 0 offline, 0 unmonitored]

however on the new box it says 0 peers

Did you get this working? If not, about the only thing left is the keys. Are the keys in the /var/lib/asterisk/keys folder?

I haven’t gotten it working, the keys are in that folder. The thing that I keep coming back to is that the box I resetup isn’t even trying to connect. There are not any request packets on port 4520 originating from that box. There are only replies to the other box.

Jeff

Well, this is a little dumb, but I finally found something in a log that got me a little closer, when I did a reload pbx_dundi.so and tail -n 200 /var/log/asterisk/full, it showed that I had misspelled symmetric in the my dundi.conf file. As you will see looking back, I had only put in 1 m instead of 2. So now it sends a request on port 4520, and a dundi show peers shows the peer. However, dundi lookups are still not working and dialing extensions returns all circuits are busy now.

The odd thing to me is that I still can’t lookup extensions that are located on the box I’m doing the lookup on.

Also, when I do an iax2 show users, it says -no secret- for the Secret on the priv trunk. Is that correct?

Mine also shows no secret when I do an iax2 show users, so that is probably normal.

Make sure the two boxes are really talking to each other by running a dundi query on each machine. The format from the CLI is:

dundi query “entityID of other box”@priv

If you were querying SmartTalk from Office the command would be:

dundi query 00:1C:C0:4C:51:1B@priv

This should return:

department=SmartTalk
organization=ComputerWorks
locality=NorthBend
stateprov=OR
country=US
[email protected]
phone=+15412179026

yep, that’s what it says, I’m assuming that means the IAX trunk is up right?

However, aren’t I supposed to be able to query my own EID? That does not work with or without the @priv.

Very odd, so after giving up for a few hours, I decided to try dialing a number and it now works. The last things I changed were giving the systems each individual keys, and correcting the spelling on the symmetric. I kept working on them for the next half hour or so and things were not working, however, this evening, somehow they are.

Today, it went back to saying all circuits are busy. I found that I had to initialize the keys on one of the sides again and it is now working for extension to extension, however I am still getting all circuits are busy when trying to make outbound calls from the remote side (SmartTalk) through the office. I’m assuming this has something to do with contexts, or something in my routes.

I am leaving for the Install Fest. I will revisit you on Sunday with this.

Yesterday I came home from being gone, turned the remote system on, and had to initialize the keys on both sides again. After doing so, everything works, extensions both ways and calling out through the office trunk. I haven’t changed anything. So, now it works, the thing that I am still wondering about is initializing the keys. Is there a way to get that to be done automatically? They ask for the passwords when initializing.

I think you found it. You need to recreate the keys with the -n option.

ast-keygen -n key.name

The -n creates the keys without passwords.

Thank you for the help

Let me know if that works.

It does look like it worked. Thanks for the help.