From: Automerge script Date: Mon, 29 Oct 2012 21:24:55 +0000 (+0000) Subject: Merged revisions 375417 via svnmerge from X-Git-Tag: 10.11.0-digiumphones-rc1~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d106b3edf04ae7ce5f6929dcd69f41e7547c3872;p=thirdparty%2Fasterisk.git Merged revisions 375417 via svnmerge from file:///srv/subversion/repos/asterisk/branches/10 ................ r375417 | mmichelson | 2012-10-29 16:09:18 -0500 (Mon, 29 Oct 2012) | 23 lines Prevent resetting of NATted realtime peer address on reload. If a "sip reload" is issued for a SIP peer, then his IP address will be cleared, thus resulting in forgetting the public IP address. Asterisk will then attempt to route SIP traffic to the private IP address. The fix here is to make "sip reload" ignore realtime peers when "host = dynamic" is spotted. Realtime peers can now only have their IP address reset if they have gone from being not dynamic to being dynamic. (closes issue ASTERISK-18203) reported by daren ferreira (closes issue ASTERISK-20572) reported by JoshE Patches: fix_nat_realtime.diff uploaded by JoshE (license #6075) ........ Merged revisions 375415 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@375441 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 9de9c4fa77..501e437c5a 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -29045,7 +29045,7 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str } else if (!strcasecmp(v->name, "host")) { if (!strcasecmp(v->value, "dynamic")) { /* They'll register with us */ - if (!found || !peer->host_dynamic) { + if ((!found && !realtime) || !peer->host_dynamic) { /* Initialize stuff if this is a new peer, or if it used to * not be dynamic before the reload. */ ast_sockaddr_setnull(&peer->addr);