<h1>Project "FreeSWITCH Source" received a push.</h1>

<h2>branch: master updated</h2>
<pre>
       via: e7acd4d138e0faa6b4a3cec1667015c430e8f3f6 (commit)
      from: 079f3f73ed63733b5642ae3b49ec5cf66db2d6dc (commit)


</pre>= COMMIT LOG ===========================================================
<div class="highlight"><pre>committer: Anthony Minessale
comments: 
FS-3054 re-open if this does not fix it.

<span style="color: #000080; font-weight: bold">diff --git a/src/mod/endpoints/mod_dingaling/mod_dingaling.c b/src/mod/endpoints/mod_dingaling/mod_dingaling.c</span>
<span style="color: #000080; font-weight: bold">index 9fb1f39..f9f0788 100644</span>
<span style="color: #A00000">--- a/src/mod/endpoints/mod_dingaling/mod_dingaling.c</span>
<span style="color: #00A000">+++ b/src/mod/endpoints/mod_dingaling/mod_dingaling.c</span>
<span style="color: #800080; font-weight: bold">@@ -596,9 +596,9 @@ static void ipchanged_event_handler(switch_event_t *event)</span>
 
         switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, &quot;EVENT_TRAP: IP change detected\n&quot;);
 
<span style="color: #A00000">-        if (cond &amp;&amp; !strcmp(cond, &quot;network-address-change&quot;)) {</span>
<span style="color: #A00000">-                const char *old_ip4 = switch_event_get_header_nil(event, &quot;network-address-previous-v4&quot;);</span>
<span style="color: #A00000">-                const char *new_ip4 = switch_event_get_header_nil(event, &quot;network-address-change-v4&quot;);</span>
<span style="color: #00A000">+        if (cond &amp;&amp; !strcmp(cond, &quot;network-external-address-change&quot;)) {</span>
<span style="color: #00A000">+                const char *old_ip4 = switch_event_get_header_nil(event, &quot;network-external-address-previous-v4&quot;);</span>
<span style="color: #00A000">+                const char *new_ip4 = switch_event_get_header_nil(event, &quot;network-external-address-change-v4&quot;);</span>
                 switch_hash_index_t *hi;
                 void *val;
                 char *tmp;
<span style="color: #000080; font-weight: bold">diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c</span>
<span style="color: #000080; font-weight: bold">index 7125bce..dff33ee 100644</span>
<span style="color: #A00000">--- a/src/mod/endpoints/mod_sofia/mod_sofia.c</span>
<span style="color: #00A000">+++ b/src/mod/endpoints/mod_sofia/mod_sofia.c</span>
<span style="color: #800080; font-weight: bold">@@ -4587,17 +4587,42 @@ static void general_event_handler(switch_event_t *event)</span>
         case SWITCH_EVENT_TRAP:
                 {
                         const char *cond = switch_event_get_header(event, &quot;condition&quot;);
<span style="color: #00A000">+                        switch_hash_index_t *hi;</span>
<span style="color: #00A000">+                        const void *var;</span>
<span style="color: #00A000">+                        void *val;</span>
<span style="color: #00A000">+                        sofia_profile_t *profile;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                        if (zstr(cond)) {</span>
<span style="color: #00A000">+                                cond = &quot;&quot;;</span>
<span style="color: #00A000">+                        }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                        if (!strcmp(cond, &quot;network-external-address-change&quot;) &amp;&amp; mod_sofia_globals.auto_restart) {</span>
<span style="color: #00A000">+                                const char *old_ip4 = switch_event_get_header_nil(event, &quot;network-external-address-previous-v4&quot;);</span>
<span style="color: #00A000">+                                const char *new_ip4 = switch_event_get_header_nil(event, &quot;network-external-address-change-v4&quot;);</span>
<span style="color: #00A000">+                                </span>
<span style="color: #00A000">+                                switch_mutex_lock(mod_sofia_globals.hash_mutex);</span>
<span style="color: #00A000">+                                if (mod_sofia_globals.profile_hash) {</span>
<span style="color: #00A000">+                                        for (hi = switch_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {</span>
<span style="color: #00A000">+                                                switch_hash_this(hi, &amp;var, NULL, &amp;val);</span>
 
<span style="color: #00A000">+                                                if ((profile = (sofia_profile_t *) val)) {</span>
<span style="color: #00A000">+                                                        if (!strcmp(profile-&gt;extsipip, old_ip4)) {</span>
<span style="color: #00A000">+                                                                profile-&gt;extsipip = switch_core_strdup(profile-&gt;pool, new_ip4);</span>
<span style="color: #00A000">+                                                        }</span>
 
<span style="color: #A00000">-                        if (cond &amp;&amp; !strcmp(cond, &quot;network-address-change&quot;) &amp;&amp; mod_sofia_globals.auto_restart) {</span>
<span style="color: #00A000">+                                                        if (!strcmp(profile-&gt;extrtpip, old_ip4)) {</span>
<span style="color: #00A000">+                                                                profile-&gt;extrtpip = switch_core_strdup(profile-&gt;pool, new_ip4);</span>
<span style="color: #00A000">+                                                        }</span>
<span style="color: #00A000">+                                                }</span>
<span style="color: #00A000">+                                        }</span>
<span style="color: #00A000">+                                }</span>
<span style="color: #00A000">+                                switch_mutex_unlock(mod_sofia_globals.hash_mutex);</span>
<span style="color: #00A000">+                                sofia_glue_restart_all_profiles();                                </span>
<span style="color: #00A000">+                        } else if (!strcmp(cond, &quot;network-address-change&quot;) &amp;&amp; mod_sofia_globals.auto_restart) {</span>
                                 const char *old_ip4 = switch_event_get_header_nil(event, &quot;network-address-previous-v4&quot;);
                                 const char *new_ip4 = switch_event_get_header_nil(event, &quot;network-address-change-v4&quot;);
                                 const char *old_ip6 = switch_event_get_header_nil(event, &quot;network-address-previous-v6&quot;);
                                 const char *new_ip6 = switch_event_get_header_nil(event, &quot;network-address-change-v6&quot;);
<span style="color: #A00000">-                                switch_hash_index_t *hi;</span>
<span style="color: #A00000">-                                const void *var;</span>
<span style="color: #A00000">-                                void *val;</span>
<span style="color: #A00000">-                                sofia_profile_t *profile;</span>
 
                                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, &quot;EVENT_TRAP: IP change detected\n&quot;);
                                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, &quot;IP change detected [%s]-&gt;[%s] [%s]-&gt;[%s]\n&quot;, old_ip4, new_ip4, old_ip6, new_ip6);
<span style="color: #000080; font-weight: bold">diff --git a/src/switch_nat.c b/src/switch_nat.c</span>
<span style="color: #000080; font-weight: bold">index 85b0247..d9110ef 100644</span>
<span style="color: #A00000">--- a/src/switch_nat.c</span>
<span style="color: #00A000">+++ b/src/switch_nat.c</span>
<span style="color: #800080; font-weight: bold">@@ -325,9 +325,9 @@ static void *SWITCH_THREAD_FUNC switch_nat_multicast_runtime(switch_thread_t * t</span>
                         do_repub = SWITCH_TRUE;
 
                         switch_event_create(&amp;event, SWITCH_EVENT_TRAP);
<span style="color: #A00000">-                        switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, &quot;condition&quot;, &quot;network-address-change&quot;);</span>
<span style="color: #A00000">-                        switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, &quot;network-address-previous-v4&quot;, nat_globals.pub_addr);</span>
<span style="color: #A00000">-                        switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, &quot;network-address-change-v4&quot;, newip);</span>
<span style="color: #00A000">+                        switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, &quot;condition&quot;, &quot;network-external-address-change&quot;);</span>
<span style="color: #00A000">+                        switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, &quot;network-external-address-previous-v4&quot;, nat_globals.pub_addr);</span>
<span style="color: #00A000">+                        switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, &quot;network-external-address-change-v4&quot;, newip);</span>
                         switch_event_fire(&amp;event);
 
                         switch_set_string(nat_globals.pub_addr, newip);
</pre></div>
========================================================================<pre>

Summary of changes:
 src/mod/endpoints/mod_dingaling/mod_dingaling.c |    6 ++--
 src/mod/endpoints/mod_sofia/mod_sofia.c         |   35 +++++++++++++++++++---
 src/switch_nat.c                                |    6 ++--
 3 files changed, 36 insertions(+), 11 deletions(-)
</pre>
<p>this email was generated because of /git/your-repo.git/hooks/post-receive by the file /git-core/contrib/hooks/post-receive-email<br />
For more info, see <a href="http://blog.chomperstomp.com/?p=630">http://blog.chomperstomp.com/?p=630</a>
-- <br />
FreeSWITCH Source</p>