Summary:ASTERISK-19309: [patch] DUNDi message routing bug
Reporter:Peter Racz (pracz)Labels:
Date Opened:2012-02-08 02:29:45.000-0600Date Closed:2012-09-05 21:53:07
Versions:Frequency of
Environment:Attachments:( 0) dundi_routing.patch
Description:There is a bug in the creation of the EID list in DUNDi DPDISCOVER messages. This bug breaks the message routing of DUNDi and it stops the message forwarding although not all nodes have received the message. The problem happens if a node is in the peer list but it is not reachable temporarily. The current implementation of DUNDi includes also peers into the EID list that are temporarily unreachable and therefore, these nodes (and possibly others as well) won't receive the message even if they could be reached over an indirect path.

The following figure shows an example. The connection between PBX1 and PBX3 is temporarily broken in the example. Now, if PBX1 sends a DPDISCOVER message, the message sent to PBX2 will include the EID of PBX3 in the EID list, although PBX1 cannot send the message to PBX3. Since PBX2 sees the EID of PBX3 in the message, it assumes that PBX3 has already received this message and will stop forwarding it. Thus, PBX3 and PBX4 will not receive the message at all.

                       |      |
     +-----------------| PBX2 |
     |                 |      |
     |                 +------+
     |                    |
     |                    |
 +------+              +------+         +------+
 |      |              |      |         |      |
 | PBX1 |------X-------| PBX3 |---------| PBX4 |
 |      |    broken    |      |         |      |
 +------+  connection  +------+         +------+

Additionally, the current implementation includes the EID 00:00:00:00:00:00 in DPDISCOVER messages when dynamic peers with [*] are configured in dundi.conf and it also tries to send NULL messages (qualify) to the peer with EID 00:00:00:00:00:00.

The attached patch resolves both these issues.
Comments:By: Matt Jordan (mjordan) 2012-02-20 12:10:59.229-0600

Peter - as DUNDI is an extended support module, support for it usually comes from the Asterisk developer community.  The next step for a patch like this is usually to put it on a reviewboard, have it reviewed, and have an Asterisk developer with commit access commit the patch.  If you don't have reviewboard access or commit access, you may want to either contact a developer on asterisk-dev or in #asterisk-dev to see if someone can do this for you.  Alternatively, I can set you up a reviewboard account if you'd like, and you can at least get the review process going.

More information on module support states can be found here: