Review Board 1.7.16


Patch for issue 12312 (DNS SRV lookups causing re-registration problems)

Review Request #132 - Created Jan. 26, 2009 and submitted

Mark Michelson
1.4
Reviewers
asterisk-dev
Asterisk
This patch is to address issue 12312 on the Asterisk bugtracker.

The short version of what this patch does is to only do an SRV lookup on a hostname if we have encountered some sort of error condition (e.g. REGISTER sent with no reply, error when calling sendto() function. For simple cases like re-registration, we do not need to do another SRV lookup. While this patch has received some testing from Leif Madsen, I would like to have at least one other developer take a look at this code change to make sure there is not anything I am overlooking here.

This review request may sound similar to review request 124 (http://reviewboard.digium.com/r/124/). Essentially, this patch I am providing does the same thing, with a couple of exceptions:
1. Instead of using a patch already attached to an issue, I have written this patch myself, so I am more aware of what is intended.
2. Instead of posting a patch for trunk, this patch is for Asterisk 1.4. It turns out that the dnsmgr work in trunk already has fixed this specific problem there.
As such, I am removing request #124 since it is no longer relevant.
Leif Madsen has tested this patch with a provider that has multiple SRV records for its hostname. Leif has confirmed that when sending a re-registration, another DNS lookup is not performed and the request is sent to the same IP address as was used in the original registration.

https://reviewboard.asterisk.org/ runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to asteriskteam@digium.com.