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

<h2>branch: master updated</h2>
<pre>
       via: d46ea5d346817ba373bb67612f500c2b7bc134aa (commit)
       via: 28242f871ac338876ffafa79dd677485d2ce0f5e (commit)
       via: b36a7c0ba6381699cc9dbbc096aef90bea1ad4d3 (commit)
       via: 4b62ff799e00a30fb898ddea2633d928d0d24eeb (commit)
      from: 0f8fb4b1fdb7f9256f21f55ab8c28afa280e7884 (commit)


</pre>= COMMIT LOG ===========================================================
<div class="highlight"><pre>committer: Raymond Chandler
comments: 
Merge branch &#39;master&#39; of fs-git:freeswitch
</pre></div>
<div class="highlight"><pre>committer: Anthony Minessale
comments: 
add multiple-registrations flag to the core similar to mod_sofia

<span style="color: #000080; font-weight: bold">diff --git a/conf/autoload_configs/switch.conf.xml b/conf/autoload_configs/switch.conf.xml</span>
<span style="color: #000080; font-weight: bold">index 95c4333..4f72c6a 100644</span>
<span style="color: #A00000">--- a/conf/autoload_configs/switch.conf.xml</span>
<span style="color: #00A000">+++ b/conf/autoload_configs/switch.conf.xml</span>
<span style="color: #800080; font-weight: bold">@@ -98,7 +98,9 @@</span>
     &lt;!-- &lt;param name=&quot;core-db-name&quot; value=&quot;/dev/shm/core.db&quot; /&gt; --&gt;
     &lt;!-- The system will create all the db schemas automatically, set this to false to avoid this behaviour--&gt;
     &lt;!--&lt;param name=&quot;auto-create-schemas&quot; value=&quot;true&quot;/&gt;--&gt;
<span style="color: #A00000">-         &lt;!-- &lt;param name=&quot;core-dbtype&quot; value=&quot;MSSQL&quot;/&gt; --&gt;</span>
<span style="color: #00A000">+    &lt;!-- &lt;param name=&quot;core-dbtype&quot; value=&quot;MSSQL&quot;/&gt; --&gt;</span>
<span style="color: #00A000">+    &lt;!-- Allow multiple registrations to the same account in the central registration table --&gt;</span>
<span style="color: #00A000">+    &lt;!-- &lt;param name=&quot;multiple-registrations&quot; value=&quot;true&quot;/&gt; --&gt;</span>
   &lt;/settings&gt;
 
 &lt;/configuration&gt;
</pre></div>
<div class="highlight"><pre>committer: Anthony Minessale
comments: 
add multiple-registrations flag to the core similar to mod_sofia

<span style="color: #000080; font-weight: bold">diff --git a/src/include/private/switch_core_pvt.h b/src/include/private/switch_core_pvt.h</span>
<span style="color: #000080; font-weight: bold">index f8c6a79..ab0777e 100644</span>
<span style="color: #A00000">--- a/src/include/private/switch_core_pvt.h</span>
<span style="color: #00A000">+++ b/src/include/private/switch_core_pvt.h</span>
<span style="color: #800080; font-weight: bold">@@ -248,6 +248,7 @@ struct switch_runtime {</span>
         int max_sql_buffer_len;
         switch_dbtype_t odbc_dbtype;
         char hostname[256];
<span style="color: #00A000">+        int multiple_registrations;</span>
 };
 
 extern struct switch_runtime runtime;
<span style="color: #000080; font-weight: bold">diff --git a/src/switch_core.c b/src/switch_core.c</span>
<span style="color: #000080; font-weight: bold">index 66731b6..5479229 100644</span>
<span style="color: #A00000">--- a/src/switch_core.c</span>
<span style="color: #00A000">+++ b/src/switch_core.c</span>
<span style="color: #800080; font-weight: bold">@@ -1549,6 +1549,8 @@ static void switch_load_core_config(const char *file)</span>
                                         if (tmp &gt; -1 &amp;&amp; tmp &lt; 11) {
                                                 switch_core_session_ctl(SCSC_DEBUG_LEVEL, &amp;tmp);
                                         }
<span style="color: #00A000">+                                } else if (!strcasecmp(var, &quot;multiple-registrations&quot;)) {</span>
<span style="color: #00A000">+                                        runtime.multiple_registrations = switch_true(val);</span>
                                 } else if (!strcasecmp(var, &quot;sql-buffer-len&quot;)) {
                                         int tmp = atoi(val);
 
<span style="color: #000080; font-weight: bold">diff --git a/src/switch_core_sqldb.c b/src/switch_core_sqldb.c</span>
<span style="color: #000080; font-weight: bold">index f135e95..1274213 100644</span>
<span style="color: #A00000">--- a/src/switch_core_sqldb.c</span>
<span style="color: #00A000">+++ b/src/switch_core_sqldb.c</span>
<span style="color: #800080; font-weight: bold">@@ -1653,7 +1653,14 @@ SWITCH_DECLARE(switch_status_t) switch_core_add_registration(const char *user, c</span>
                 return SWITCH_STATUS_FALSE;
         }
 
<span style="color: #A00000">-        sql = switch_mprintf(&quot;delete from registrations where hostname=&#39;%q&#39; and (url=&#39;%q&#39; or token=&#39;%q&#39;)&quot;, switch_core_get_hostname(), url, switch_str_nil(token));</span>
<span style="color: #00A000">+        if (runtime.multiple_registrations) {</span>
<span style="color: #00A000">+                sql = switch_mprintf(&quot;delete from registrations where hostname=&#39;%q&#39; and (url=&#39;%q&#39; or token=&#39;%q&#39;)&quot;, </span>
<span style="color: #00A000">+                                                         switch_core_get_hostname(), url, switch_str_nil(token));</span>
<span style="color: #00A000">+        } else {</span>
<span style="color: #00A000">+                sql = switch_mprintf(&quot;delete from registrations where reg_user=&#39;%q&#39; and realm=&#39;%q&#39; and hostname=&#39;%q&#39;&quot;, </span>
<span style="color: #00A000">+                                                         user, realm, switch_core_get_hostname());</span>
<span style="color: #00A000">+        }</span>
<span style="color: #00A000">+</span>
         switch_cache_db_execute_sql(dbh, sql, NULL);
         free(sql);
 
</pre></div>
<div class="highlight"><pre>committer: Anthony Minessale
comments: 
put transport in the request uri on outbound registers if register_transport is set and proxy does not already contain a transport param

<span style="color: #000080; font-weight: bold">diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c</span>
<span style="color: #000080; font-weight: bold">index 825d1bf..e9d2cad 100644</span>
<span style="color: #A00000">--- a/src/mod/endpoints/mod_sofia/sofia.c</span>
<span style="color: #00A000">+++ b/src/mod/endpoints/mod_sofia/sofia.c</span>
<span style="color: #800080; font-weight: bold">@@ -2148,8 +2148,13 @@ static void parse_gateways(sofia_profile_t *profile, switch_xml_t gateways_tag)</span>
                         if (!zstr(from_domain)) {
                                 gateway-&gt;from_domain = switch_core_strdup(gateway-&gt;pool, from_domain);
                         }
<span style="color: #00A000">+                        </span>
<span style="color: #00A000">+                        if (!zstr(register_transport) &amp;&amp; !switch_stristr(&quot;transport=&quot;, proxy)) {</span>
<span style="color: #00A000">+                                gateway-&gt;register_url = switch_core_sprintf(gateway-&gt;pool, &quot;sip:%s;transport=%s&quot;, proxy, register_transport);</span>
<span style="color: #00A000">+                        } else {</span>
<span style="color: #00A000">+                                gateway-&gt;register_url = switch_core_sprintf(gateway-&gt;pool, &quot;sip:%s&quot;, proxy);</span>
<span style="color: #00A000">+                        }</span>
 
<span style="color: #A00000">-                        gateway-&gt;register_url = switch_core_sprintf(gateway-&gt;pool, &quot;sip:%s&quot;, proxy);</span>
                         gateway-&gt;register_from = switch_core_sprintf(gateway-&gt;pool, &quot;&lt;sip:%s@%s;transport=%s&gt;&quot;,
                                                                                                                  from_user, !zstr(from_domain) ? from_domain : proxy, register_transport);
 
</pre></div>
========================================================================<pre>

Summary of changes:
 conf/autoload_configs/switch.conf.xml |    4 +++-
 src/include/private/switch_core_pvt.h |    1 +
 src/mod/endpoints/mod_sofia/sofia.c   |    7 ++++++-
 src/switch_core.c                     |    2 ++
 src/switch_core_sqldb.c               |    9 ++++++++-
 5 files changed, 20 insertions(+), 3 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>