[asterisk-dev] [Code Review] Patch for issue 12312 (DNS SRV lookups causing re-registration problems)

Mark Michelson mmichelson at digium.com
Mon Jan 26 12:48:59 CST 2009


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/132/
-----------------------------------------------------------

Review request for Asterisk Developers.


Summary
-------

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.


Diffs
-----

  /branches/1.4/channels/chan_sip.c 171438 

Diff: http://reviewboard.digium.com/r/132/diff


Testing
-------

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.


Thanks,

Mark




More information about the asterisk-dev mailing list