<h1>Project "FreeSWITCH Source" received a push.</h1>
<h2>branch: master updated</h2>
<pre>
discards 642882727f015be345501f6f7c727ef23ec70c9f (commit)
discards d8add09a352cdfca64fa94688285ce6c96e6f6dc (commit)
discards c81bf01fc977fd1a12b521cf29abb5b466f1fda2 (commit)
via: 86884e52568eb7cdca89995fa82f407d4c4059c9 (commit)
via: c0e340b188f8899767e1e347cc011ee3c0a6e88a (commit)
via: 4f254ebe15c6c512570cd8968d36e936a07a25f2 (commit)
via: 145884c94ce9bcb25aa14d45e6d689b0d4af75ed (commit)
via: e6be62b0e14a1865f14617abde8eafdb667bbadb (commit)
via: edfb1e9943b12a085ebb90190c5119721bee8550 (commit)
via: 381738f70027fb4641f840d16597151eed8d7f67 (commit)
via: acd6333e33b9ff9e0f1a424cb7dc5e5b1d063b6a (commit)
via: d8b11ce63b908ae893feda5345ed712c9125623a (commit)
via: b8afa79b4446b80336285d1ce0bb4293cb9e04ed (commit)
via: 2582d71689191909fd8a62b5f5693ebd1b4dc8d1 (commit)
via: c17da69d6773e2ac37bc256ad0669ea901525bec (commit)
via: 3546654615f88058fb6769fe79e07162602fa4af (commit)
via: 46215605f42bf534ab040e63b9bd84a6c34c3e05 (commit)
via: 361178089943c14bb3f842d7ff5cd8950cbe2493 (commit)
via: 1ee94c11c7b2fd46508eebb463ffd9a1cf9b19ce (commit)
via: 6f9da9a070517ce30e9edec6a7d2536db0646c33 (commit)
via: eeac03ef5028b565b28364752ef5a48307ca17d4 (commit)
via: 8037b69f40413784631c59942b5d4fc856cff845 (commit)
via: 67edc7c3215f6476452f3ff7ee82ba559c39656f (commit)
via: 2adfc50af7958eea12c15e023bcf80b18a4c73f9 (commit)
via: 0cbac4ad25ed3921262a7676397206f824aade32 (commit)
via: 2401fec54b48d8dfb1ec5a2f33a092dac076c0f3 (commit)
via: 330d741853f4f7c548b61dbcb717266a2bf24107 (commit)
via: 93501b288b34a7d4f5287f7bc2b498a2321d73c5 (commit)
via: df4a18dcba1ad6a3ac20f67982642e8fe0e35471 (commit)
via: 0e841a5f14810514ee60562481c405d7fb560e72 (commit)
via: a93623618b83fb08f2a0a728800f431856b29f92 (commit)
via: 1e09a4d2dafdd9a5ffa2ab606d2caebf52baf25f (commit)
via: 92f51bd60332511c5689c0993cf561f4a5493297 (commit)
via: 23b387b7f5f4b13ca40c9d62ab06a04c66810e63 (commit)
This update added new revisions after undoing existing revisions. That is
to say, the old revision is not a strict subset of the new revision. This
situation occurs when you --force push a change and generate a repository
containing something like this:
* -- * -- B -- O -- O -- O (642882727f015be345501f6f7c727ef23ec70c9f)
\
N -- N -- N (86884e52568eb7cdca89995fa82f407d4c4059c9)
When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.
</pre>= COMMIT LOG ===========================================================
<div class="highlight"><pre>committer: Moises Silva
comments:
Merge branch 'master' into netborder
</pre></div>
<div class="highlight"><pre>committer: Konrad Hammel
comments:
freetdm: ss7 - update cli usuage print
<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_cli.c b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_cli.c</span>
<span style="color: #000080; font-weight: bold">index 0298429..280107a 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_cli.c</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_cli.c</span>
<span style="color: #800080; font-weight: bold">@@ -680,8 +680,8 @@ static ftdm_status_t handle_print_usuage(ftdm_stream_handle_t *stream)</span>
        stream->write_function(stream, "ftdm ss7 set mtrace X Y\n");
        stream->write_function(stream, "\n");
        stream->write_function(stream, "Ftmod_sangoma_ss7 information:\n");
<span style="color: #A00000">-        stream->write_function(stream, "ftdm ss7 show status link X\n");</span>
<span style="color: #A00000">-        stream->write_function(stream, "ftdm ss7 show status linkset X\n");</span>
<span style="color: #00A000">+        stream->write_function(stream, "ftdm ss7 show status mtp3 X\n");</span>
<span style="color: #00A000">+        stream->write_function(stream, "ftdm ss7 show status mtp2 X\n");</span>
        stream->write_function(stream, "ftdm ss7 show status span X chan Y\n");
        stream->write_function(stream, "ftdm ss7 show free span X chan Y\n");
        stream->write_function(stream, "ftdm ss7 show inuse span X chan Y\n");
</pre></div>
<div class="highlight"><pre>committer: Konrad Hammel
comments:
freetdm: ss7: bug fix for ticket 6290, channel status was not showing channel 1
<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_xml.c b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_xml.c</span>
<span style="color: #000080; font-weight: bold">index 2f67d3f..166fe5d 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_xml.c</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_xml.c</span>
<span style="color: #800080; font-weight: bold">@@ -2833,7 +2833,7 @@ static int ftmod_ss7_fill_in_ccSpan(sng_ccSpan_t *ccSpan)</span>
                }
                /* find a spot for this circuit in the global structure */
<span style="color: #A00000">-                x = (ccSpan->procId * 1000);</span>
<span style="color: #00A000">+                x = (ccSpan->procId * 1000) + 1;</span>
                flag = 0;
                while (flag == 0) {
                /**********************************************************************/
</pre></div>
<div class="highlight"><pre>committer: Moises Silva
comments:
Merge remote branch 'fsorig/master'
</pre></div>
<div class="highlight"><pre>committer: Konrad Hammel
comments:
freetdm: ss7 - bug fix for change in FreeTDM API
<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.c b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.c</span>
<span style="color: #000080; font-weight: bold">index d38d25f..48579ad 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.c</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.c</span>
<span style="color: #800080; font-weight: bold">@@ -366,7 +366,7 @@ static void *ftdm_sangoma_ss7_run(ftdm_thread_t * me, void *obj)</span>
                check_for_res_sus_flag(ftdmspan);
                /* Poll for events, e.g HW DTMF */
<span style="color: #A00000">-                switch (ftdm_span_poll_event(ftdmspan, 0)) {</span>
<span style="color: #00A000">+                switch (ftdm_span_poll_event(ftdmspan, 0, NULL)) {</span>
                /**********************************************************************/
                case FTDM_SUCCESS:
                        while (ftdm_span_next_event(ftdmspan, &event) == FTDM_SUCCESS);
</pre></div>
<div class="highlight"><pre>committer: Konrad Hammel
comments:
Merge branch 'konrad.02-09-11'
</pre></div>
<div class="highlight"><pre>committer: Konrad Hammel
comments:
freetdm: ss7 - bug fix for configuration
<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_xml.c b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_xml.c</span>
<span style="color: #000080; font-weight: bold">index 1b24e34..2f67d3f 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_xml.c</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_xml.c</span>
<span style="color: #800080; font-weight: bold">@@ -1749,33 +1749,46 @@ static int ftmod_ss7_parse_isup_interface(ftdm_conf_node_t *isup_interface)</span>
        /* default the interface to paused state */
        sngss7_set_flag(&sng_isup, SNGSS7_PAUSED);
<span style="color: #A00000">-        /* trickle down the SPC to all sub entities */</span>
<span style="color: #A00000">-        lnkSet = &g_ftdm_sngss7_data.cfg.mtpRoute[sng_isup.mtpRouteId].lnkSets;</span>
<span style="color: #A00000">-        g_ftdm_sngss7_data.cfg.mtp3Link[lnkSet->lsId].spc = sng_isup.spc;</span>
<span style="color: #A00000">-        lnkSet = lnkSet->next;</span>
<span style="color: #00A000">+        /* trickle down the SPC to all sub entities */</span>
<span style="color: #00A000">+        lnkSet = &g_ftdm_sngss7_data.cfg.mtpRoute[sng_isup.mtpRouteId].lnkSets;</span>
        while (lnkSet->next != NULL) {
<span style="color: #A00000">-                g_ftdm_sngss7_data.cfg.mtp3Link[lnkSet->lsId].spc = sng_isup.spc;</span>
<span style="color: #00A000">+        /**************************************************************************/</span>
<span style="color: #00A000">+                /* go through all the links and check if they belong to this linkset*/</span>
<span style="color: #00A000">+                i = 1;</span>
<span style="color: #00A000">+                while (g_ftdm_sngss7_data.cfg.mtp3Link[i].id != 0) {</span>
<span style="color: #00A000">+                        /* check if this link is in the linkset */</span>
<span style="color: #00A000">+                        if (g_ftdm_sngss7_data.cfg.mtp3Link[i].linkSetId == lnkSet->lsId) {</span>
<span style="color: #00A000">+                                /* fill in the spc */</span>
<span style="color: #00A000">+                                g_ftdm_sngss7_data.cfg.mtp3Link[i].spc = sng_isup.spc;</span>
<span style="color: #00A000">+                        }</span>
<span style="color: #00A000">+        </span>
<span style="color: #00A000">+                        i++;</span>
<span style="color: #00A000">+                }</span>
<span style="color: #00A000">+        </span>
<span style="color: #00A000">+                /* move to the next lnkSet */</span>
                lnkSet = lnkSet->next;
<span style="color: #A00000">-        }</span>
<span style="color: #00A000">+        /**************************************************************************/</span>
<span style="color: #00A000">+        } /* while (lnkSet->next != NULL) */</span>
        /* pull values from the lower levels */
<span style="color: #A00000">-        sng_isup.dpc = g_ftdm_sngss7_data.cfg.mtpRoute[sng_isup.mtpRouteId].dpc;</span>
<span style="color: #A00000">-        sng_isup.switchType = g_ftdm_sngss7_data.cfg.mtpRoute[sng_isup.mtpRouteId].switchType;</span>
<span style="color: #A00000">-        sng_isup.nwId = g_ftdm_sngss7_data.cfg.mtpRoute[sng_isup.mtpRouteId].nwId;</span>
<span style="color: #A00000">-</span>
        sng_isap.switchType = g_ftdm_sngss7_data.cfg.mtpRoute[sng_isup.mtpRouteId].switchType;
<span style="color: #00A000">+        /* fill in the isap */</span>
        ftmod_ss7_fill_in_isap(&sng_isap);
<span style="color: #A00000">-        sng_isup.isap = sng_isap.id;</span>
<span style="color: #00A000">+        /* pull values from the lower levels */</span>
<span style="color: #00A000">+        sng_isup.isap                 = sng_isap.id;</span>
<span style="color: #00A000">+        sng_isup.dpc                 = g_ftdm_sngss7_data.cfg.mtpRoute[sng_isup.mtpRouteId].dpc;</span>
<span style="color: #00A000">+        sng_isup.switchType        = g_ftdm_sngss7_data.cfg.mtpRoute[sng_isup.mtpRouteId].switchType;</span>
<span style="color: #00A000">+        sng_isup.nwId                 = g_ftdm_sngss7_data.cfg.mtpRoute[sng_isup.mtpRouteId].nwId;</span>
<span style="color: #00A000">+        /* fill in the isup interface */</span>
        ftmod_ss7_fill_in_isup_interface(&sng_isup);
        /* setup the self mtp3 route */
        i = sng_isup.mtpRouteId;
<span style="color: #A00000">-</span>
        if(ftmod_ss7_fill_in_self_route(sng_isup.spc,
                                                                        g_ftdm_sngss7_data.cfg.mtpRoute[i].linkType,
                                                                        g_ftdm_sngss7_data.cfg.mtpRoute[i].switchType,
</pre></div>
<div class="highlight"><pre>committer: Moises Silva
comments:
freetdm: disallow completely core variables for freetdm outbound variables
<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/mod_freetdm/mod_freetdm.c b/libs/freetdm/mod_freetdm/mod_freetdm.c</span>
<span style="color: #000080; font-weight: bold">index c0fdaa6..78874de 100755</span>
<span style="color: #A00000">--- a/libs/freetdm/mod_freetdm/mod_freetdm.c</span>
<span style="color: #00A000">+++ b/libs/freetdm/mod_freetdm/mod_freetdm.c</span>
<span style="color: #800080; font-weight: bold">@@ -1055,28 +1055,18 @@ switch_io_routines_t freetdm_io_routines = {</span>
static const char* channel_get_variable(switch_core_session_t *session, switch_event_t *var_event, const char *variable_name)
{
const char *variable = NULL;
<span style="color: #A00000">-</span>
if (var_event) {
if ((variable = switch_event_get_header(var_event, variable_name))) {
return variable;
}
}
<span style="color: #00A000">+</span>
if (session) {
switch_channel_t *channel = switch_core_session_get_channel(session);
if ((variable = switch_channel_get_variable(channel, variable_name))) {
return variable;
}
}
<span style="color: #A00000">-</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-         // This is unsafe, I don't see anywhere in the whole code where this is called with NULL session anyway.</span>
<span style="color: #A00000">-         // There is a new switch_core_get_variable_dup that will strdup it for you and then you must free it.</span>
<span style="color: #A00000">-         // That messes up the abstraction completely so I am just commenting it out for you.....</span>
<span style="color: #A00000">-         /*</span>
<span style="color: #A00000">- if ((variable = switch_core_get_variable(variable_name))) {</span>
<span style="color: #A00000">- return variable;</span>
<span style="color: #A00000">- }</span>
<span style="color: #A00000">-         */</span>
return NULL;
}
</pre></div>
<div class="highlight"><pre>committer: Anthony Minessale
comments:
revert
<span style="color: #000080; font-weight: bold">diff --git a/src/mod/endpoints/mod_loopback/mod_loopback.c b/src/mod/endpoints/mod_loopback/mod_loopback.c</span>
<span style="color: #000080; font-weight: bold">index b098ede..be9b499 100644</span>
<span style="color: #A00000">--- a/src/mod/endpoints/mod_loopback/mod_loopback.c</span>
<span style="color: #00A000">+++ b/src/mod/endpoints/mod_loopback/mod_loopback.c</span>
<span style="color: #800080; font-weight: bold">@@ -637,13 +637,8 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc</span>
                tech_pvt->other_tech_pvt &&
                switch_test_flag(tech_pvt, TFLAG_BRIDGE) &&
                switch_test_flag(tech_pvt->other_tech_pvt, TFLAG_BRIDGE) &&
<span style="color: #A00000">-</span>
                switch_channel_test_flag(tech_pvt->channel, CF_BRIDGED) &&
                switch_channel_test_flag(tech_pvt->other_channel, CF_BRIDGED) &&
<span style="color: #A00000">-</span>
<span style="color: #A00000">-                !switch_channel_test_flag(tech_pvt->channel, CF_INNER_BRIDGE) &&</span>
<span style="color: #A00000">-                !switch_channel_test_flag(tech_pvt->other_channel, CF_INNER_BRIDGE) &&</span>
<span style="color: #A00000">-</span>
                switch_channel_test_flag(tech_pvt->channel, CF_ANSWERED) &&
                switch_channel_test_flag(tech_pvt->other_channel, CF_ANSWERED) && !--tech_pvt->bowout_frame_count <= 0) {
                const char *a_uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE);
</pre></div>
<div class="highlight"><pre>committer: cypromis
comments:
Merge remote branch 'origin/master'
</pre></div>
<div class="highlight"><pre>committer: Moises Silva
comments:
freetdm: use packet_len as the base length in tone generation
<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/ftdm_io.c b/libs/freetdm/src/ftdm_io.c</span>
<span style="color: #000080; font-weight: bold">index 1e282d1..bd4e896 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/ftdm_io.c</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/ftdm_io.c</span>
<span style="color: #800080; font-weight: bold">@@ -3588,7 +3588,7 @@ static FIO_READ_FUNCTION(ftdm_raw_read)</span>
}
/* This function takes care of automatically generating DTMF or FSK tones when needed */
<span style="color: #A00000">-static ftdm_status_t handle_tone_generation(ftdm_channel_t *ftdmchan, ftdm_size_t datalen)</span>
<span style="color: #00A000">+static ftdm_status_t handle_tone_generation(ftdm_channel_t *ftdmchan)</span>
{
        /*
         * datalen: size in bytes of the chunk of data the user requested to read (this function
<span style="color: #800080; font-weight: bold">@@ -3650,9 +3650,7 @@ static ftdm_status_t handle_tone_generation(ftdm_channel_t *ftdmchan, ftdm_size_</span>
        /* if we picked a buffer, time to read from it and write the linear data to the device */
        if (buffer) {
                uint8_t auxbuf[1024];
<span style="color: #A00000">-                /* we initialize dlen to datalen, which is the size in bytes the </span>
<span style="color: #A00000">-                 * user wants to read (typically chunks of 160 bytes, 20ms G.711) */</span>
<span style="color: #A00000">-                ftdm_size_t dlen = datalen;</span>
<span style="color: #00A000">+                ftdm_size_t dlen = ftdmchan->packet_len;</span>
                ftdm_size_t len, br, max = sizeof(auxbuf);
                
                /* if the codec is not linear, then data is really twice as much cuz
<span style="color: #800080; font-weight: bold">@@ -3662,10 +3660,10 @@ static ftdm_status_t handle_tone_generation(ftdm_channel_t *ftdmchan, ftdm_size_</span>
                }
                /* we do not expect the user chunks to be bigger than auxbuf */
<span style="color: #A00000">-                ftdm_assert(dlen <= sizeof(auxbuf), "Unexpected size for user data chunk size\n");</span>
<span style="color: #00A000">+                ftdm_assert((dlen <= sizeof(auxbuf)), "Unexpected size for user data chunk size\n");</span>
                /* dblen is the size in use for dtmf_buffer or fsk_buffer, and dlen is the size
<span style="color: #A00000">-                 * of the read chunks of the user, we pick the smaller one */</span>
<span style="color: #00A000">+                 * of the io chunks to write, we pick the smaller one */</span>
                len = dblen > dlen ? dlen : dblen;
                /* we can't read more than the size of our auxiliary buffer */
<span style="color: #800080; font-weight: bold">@@ -3770,7 +3768,7 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_read(ftdm_channel_t *ftdmchan, void *data</span>
                        rdata[i] = ftdmchan->rxgain_table[rdata[i]];
                }
        }
<span style="color: #A00000">-        handle_tone_generation(ftdmchan, *datalen);</span>
<span style="color: #00A000">+        handle_tone_generation(ftdmchan);</span>
        if (ftdm_test_flag(ftdmchan, FTDM_CHANNEL_TRANSCODE) && ftdmchan->effective_codec != ftdmchan->native_codec) {
                if (ftdmchan->native_codec == FTDM_CODEC_ULAW && ftdmchan->effective_codec == FTDM_CODEC_SLIN) {
</pre></div>
<div class="highlight"><pre>committer: Konrad Hammel
comments:
freetdm: ss7 - added hardware dtmf
<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.c b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.c</span>
<span style="color: #000080; font-weight: bold">index 2f2e502..d38d25f 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.c</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.c</span>
<span style="color: #800080; font-weight: bold">@@ -273,6 +273,7 @@ static void *ftdm_sangoma_ss7_run(ftdm_thread_t * me, void *obj)</span>
        ftdm_interrupt_t        *ftdm_sangoma_ss7_int[2];
        ftdm_span_t                 *ftdmspan = (ftdm_span_t *) obj;
        ftdm_channel_t                 *ftdmchan = NULL;
<span style="color: #00A000">+        ftdm_event_t                 *event = NULL;</span>
        sngss7_event_data_t        *sngss7_event = NULL;
        sngss7_span_data_t        *sngss7_span = (sngss7_span_data_t *)ftdmspan->signal_data;
<span style="color: #800080; font-weight: bold">@@ -363,6 +364,22 @@ static void *ftdm_sangoma_ss7_run(ftdm_thread_t * me, void *obj)</span>
                /* check each channel on the span to see if there is an un-procressed SUS/RES flag */
                check_for_res_sus_flag(ftdmspan);
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                /* Poll for events, e.g HW DTMF */</span>
<span style="color: #00A000">+                switch (ftdm_span_poll_event(ftdmspan, 0)) {</span>
<span style="color: #00A000">+                /**********************************************************************/</span>
<span style="color: #00A000">+                case FTDM_SUCCESS:</span>
<span style="color: #00A000">+                        while (ftdm_span_next_event(ftdmspan, &event) == FTDM_SUCCESS);</span>
<span style="color: #00A000">+                        break;</span>
<span style="color: #00A000">+                /**********************************************************************/</span>
<span style="color: #00A000">+                case FTDM_TIMEOUT:</span>
<span style="color: #00A000">+                        /* No events pending */</span>
<span style="color: #00A000">+                        break;</span>
<span style="color: #00A000">+                /**********************************************************************/</span>
<span style="color: #00A000">+                default:</span>
<span style="color: #00A000">+                        SS7_ERROR("%s:Failed to poll span event\n", ftdmspan->name);</span>
<span style="color: #00A000">+                /**********************************************************************/</span>
<span style="color: #00A000">+                } /* switch (ftdm_span_poll_event(span, 0)) */</span>
        } /* master while loop */
        /* clear the IN_THREAD flag so that we know the thread is done */
</pre></div>
<div class="highlight"><pre>committer: Anthony Minessale
comments:
don't bow out on att_xfer bridge
<span style="color: #000080; font-weight: bold">diff --git a/src/mod/endpoints/mod_loopback/mod_loopback.c b/src/mod/endpoints/mod_loopback/mod_loopback.c</span>
<span style="color: #000080; font-weight: bold">index be9b499..b098ede 100644</span>
<span style="color: #A00000">--- a/src/mod/endpoints/mod_loopback/mod_loopback.c</span>
<span style="color: #00A000">+++ b/src/mod/endpoints/mod_loopback/mod_loopback.c</span>
<span style="color: #800080; font-weight: bold">@@ -637,8 +637,13 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc</span>
                tech_pvt->other_tech_pvt &&
                switch_test_flag(tech_pvt, TFLAG_BRIDGE) &&
                switch_test_flag(tech_pvt->other_tech_pvt, TFLAG_BRIDGE) &&
<span style="color: #00A000">+</span>
                switch_channel_test_flag(tech_pvt->channel, CF_BRIDGED) &&
                switch_channel_test_flag(tech_pvt->other_channel, CF_BRIDGED) &&
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                !switch_channel_test_flag(tech_pvt->channel, CF_INNER_BRIDGE) &&</span>
<span style="color: #00A000">+                !switch_channel_test_flag(tech_pvt->other_channel, CF_INNER_BRIDGE) &&</span>
<span style="color: #00A000">+</span>
                switch_channel_test_flag(tech_pvt->channel, CF_ANSWERED) &&
                switch_channel_test_flag(tech_pvt->other_channel, CF_ANSWERED) && !--tech_pvt->bowout_frame_count <= 0) {
                const char *a_uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE);
</pre></div>
<div class="highlight"><pre>committer: Moises Silva
comments:
Merge remote branch 'fsorig/master'
</pre></div>
<div class="highlight"><pre>committer: Konrad Hammel
comments:
Merge branch 'master' of git.sangoma.com:/smg_freeswitch
</pre></div>
<div class="highlight"><pre>committer: Konrad Hammel
comments:
freetdm: ss7 - bug fix for SPC no longer being part sng_gen config
<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_cfg.c b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_cfg.c</span>
<span style="color: #000080; font-weight: bold">index 20bcc3a..df0414a 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_cfg.c</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_cfg.c</span>
<span style="color: #800080; font-weight: bold">@@ -352,22 +352,6 @@ int ft_to_sngss7_cfg_all(void)</span>
                x++;
        } /* while (g_ftdm_sngss7_data.cfg.mtpRoute[x].id != 0) */
<span style="color: #A00000">-        if (g_ftdm_sngss7_data.cfg.mtpRoute[1].id != 0) {</span>
<span style="color: #A00000">-                if (!(g_ftdm_sngss7_data.cfg.mtpRoute[0].flags & SNGSS7_CONFIGURED)) {</span>
<span style="color: #A00000">-        </span>
<span style="color: #A00000">-                        if (ftmod_ss7_mtp3_route_config(0)) {</span>
<span style="color: #A00000">-                                SS7_CRITICAL("MTP3 ROUTE 0 configuration FAILED!\n");</span>
<span style="color: #A00000">-                                return 1;</span>
<span style="color: #A00000">-                        } else {</span>
<span style="color: #A00000">-                                SS7_INFO("MTP3 ROUTE 0 configuration DONE!\n");</span>
<span style="color: #A00000">-                        }</span>
<span style="color: #A00000">-        </span>
<span style="color: #A00000">-                        /* set the SNGSS7_CONFIGURED flag */</span>
<span style="color: #A00000">-                        g_ftdm_sngss7_data.cfg.mtpRoute[0].flags |= SNGSS7_CONFIGURED;</span>
<span style="color: #A00000">-                } /* if !SNGSS7_CONFIGURED */</span>
<span style="color: #A00000">-        }</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-</span>
        x = 1;
        while (g_ftdm_sngss7_data.cfg.isap[x].id != 0) {
                /* check if this link has been configured already */
<span style="color: #800080; font-weight: bold">@@ -1161,10 +1145,10 @@ int ftmod_ss7_mtp3_route_config(int id)</span>
        cfg.t.cfg.s.snRout.swtchType                = k->linkType;                                /* switch type */
        cfg.t.cfg.s.snRout.upSwtch                        = k->switchType;                        /* user part switch type */
        cfg.t.cfg.s.snRout.cmbLnkSetId                = k->cmbLinkSetId;                        /* combined link set ID */
<span style="color: #A00000">-        if (k->id == 0) {</span>
<span style="color: #A00000">-                cfg.t.cfg.s.snRout.dir                                 = LSN_RTE_UP;                                /* direction */</span>
<span style="color: #00A000">+        if (k->dir == SNG_RTE_UP) {</span>
<span style="color: #00A000">+                cfg.t.cfg.s.snRout.dir                         = LSN_RTE_UP;                                /* direction */</span>
        } else {
<span style="color: #A00000">-                cfg.t.cfg.s.snRout.dir                                 = LSN_RTE_DN;                                /* direction */</span>
<span style="color: #00A000">+                cfg.t.cfg.s.snRout.dir                         = LSN_RTE_DN;                                /* direction */</span>
        }
        cfg.t.cfg.s.snRout.rteToAdjSp                = 0;                                                /* flag indicating this route to adjacent SP */
        cfg.t.cfg.s.snRout.ssf                                = k->ssf;                                        /* sub service field */
<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.h b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.h</span>
<span style="color: #000080; font-weight: bold">index fe291fb..05c6351 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.h</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.h</span>
<span style="color: #800080; font-weight: bold">@@ -83,6 +83,11 @@ typedef enum {</span>
} sng_ckt_type_t;
typedef enum {
<span style="color: #00A000">+        SNG_RTE_UP        = 0,</span>
<span style="color: #00A000">+        SNG_RTE_DN</span>
<span style="color: #00A000">+} sng_route_direction_t;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+typedef enum {</span>
        SNGSS7_LPA_FOR_COT                = (1 << 0),        /* send LPA when COT arrives */
        SNGSS7_ACM_OBCI_BITA        = (1 << 10)        /* in-band indication */
} sng_intf_options_t;
<span style="color: #800080; font-weight: bold">@@ -236,6 +241,7 @@ typedef struct sng_route {</span>
        uint32_t                ssf;
        uint32_t                nwId;
        uint32_t                isSTP;
<span style="color: #00A000">+        uint32_t                dir;</span>
        uint32_t                t6;
        uint32_t                t8;
        uint32_t                t10;
<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_xml.c b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_xml.c</span>
<span style="color: #000080; font-weight: bold">index 46df990..1b24e34 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_xml.c</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_xml.c</span>
<span style="color: #800080; font-weight: bold">@@ -2383,6 +2383,7 @@ static int ftmod_ss7_fill_in_mtp3_route(sng_route_t *mtp3_route)</span>
        g_ftdm_sngss7_data.cfg.mtpRoute[i].nwId                        = mtp3_route->nwId;
        g_ftdm_sngss7_data.cfg.mtpRoute[i].lnkSets                = mtp3_route->lnkSets;
        g_ftdm_sngss7_data.cfg.mtpRoute[i].ssf                        = mtp3_route->ssf;
<span style="color: #00A000">+        g_ftdm_sngss7_data.cfg.mtpRoute[i].dir                        = SNG_RTE_DN;</span>
        if (mtp3_route->t6 != 0) {
                g_ftdm_sngss7_data.cfg.mtpRoute[i].t6                = mtp3_route->t6;
        } else {
<span style="color: #800080; font-weight: bold">@@ -2443,6 +2444,52 @@ static int ftmod_ss7_fill_in_mtp3_route(sng_route_t *mtp3_route)</span>
}
/******************************************************************************/
<span style="color: #00A000">+static int ftmod_ss7_fill_in_self_route(int spc, int linkType, int switchType, int ssf)</span>
<span style="color: #00A000">+{</span>
<span style="color: #00A000">+        int i = 1;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        while (g_ftdm_sngss7_data.cfg.mtpRoute[i].id != 0) {</span>
<span style="color: #00A000">+                if (g_ftdm_sngss7_data.cfg.mtpRoute[i].dpc == spc) {</span>
<span style="color: #00A000">+                        /* we have a match so break out of this loop */</span>
<span style="color: #00A000">+                        break;</span>
<span style="color: #00A000">+                }</span>
<span style="color: #00A000">+                /* move on to the next one */</span>
<span style="color: #00A000">+                i++;</span>
<span style="color: #00A000">+        }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        if (g_ftdm_sngss7_data.cfg.mtpRoute[i].id == 0) {</span>
<span style="color: #00A000">+                g_ftdm_sngss7_data.cfg.mtpRoute[i].id = i;</span>
<span style="color: #00A000">+                SS7_DEBUG("found new mtp3 self route\n");</span>
<span style="color: #00A000">+        } else {</span>
<span style="color: #00A000">+                g_ftdm_sngss7_data.cfg.mtpRoute[i].id = i;</span>
<span style="color: #00A000">+                SS7_DEBUG("found existing mtp3 self route\n");</span>
<span style="color: #00A000">+        }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        strncpy((char *)g_ftdm_sngss7_data.cfg.mtpRoute[i].name, "self-route", MAX_NAME_LEN-1);</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        g_ftdm_sngss7_data.cfg.mtpRoute[i].id                        = i;</span>
<span style="color: #00A000">+        g_ftdm_sngss7_data.cfg.mtpRoute[i].dpc                        = spc;</span>
<span style="color: #00A000">+        g_ftdm_sngss7_data.cfg.mtpRoute[i].linkType                = linkType;</span>
<span style="color: #00A000">+        g_ftdm_sngss7_data.cfg.mtpRoute[i].switchType        = switchType;</span>
<span style="color: #00A000">+        g_ftdm_sngss7_data.cfg.mtpRoute[i].cmbLinkSetId        = i;</span>
<span style="color: #00A000">+        g_ftdm_sngss7_data.cfg.mtpRoute[i].isSTP                = 0;</span>
<span style="color: #00A000">+        g_ftdm_sngss7_data.cfg.mtpRoute[i].ssf                        = ssf;</span>
<span style="color: #00A000">+        g_ftdm_sngss7_data.cfg.mtpRoute[i].dir                        = SNG_RTE_UP;</span>
<span style="color: #00A000">+        g_ftdm_sngss7_data.cfg.mtpRoute[i].t6                        = 8;</span>
<span style="color: #00A000">+        g_ftdm_sngss7_data.cfg.mtpRoute[i].t8                        = 12;</span>
<span style="color: #00A000">+        g_ftdm_sngss7_data.cfg.mtpRoute[i].t10                        = 300;</span>
<span style="color: #00A000">+        g_ftdm_sngss7_data.cfg.mtpRoute[i].t11                        = 300;</span>
<span style="color: #00A000">+        g_ftdm_sngss7_data.cfg.mtpRoute[i].t15                        = 30;</span>
<span style="color: #00A000">+        g_ftdm_sngss7_data.cfg.mtpRoute[i].t16                        = 20;</span>
<span style="color: #00A000">+        g_ftdm_sngss7_data.cfg.mtpRoute[i].t18                        = 200;</span>
<span style="color: #00A000">+        g_ftdm_sngss7_data.cfg.mtpRoute[i].t19                        = 690;</span>
<span style="color: #00A000">+        g_ftdm_sngss7_data.cfg.mtpRoute[i].t21                        = 650; </span>
<span style="color: #00A000">+        g_ftdm_sngss7_data.cfg.mtpRoute[i].t25                        = 100;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        return 0;</span>
<span style="color: #00A000">+}</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+/******************************************************************************/</span>
static int ftmod_ss7_fill_in_nsap(sng_route_t *mtp3_route)
{
        int i;
<span style="color: #800080; font-weight: bold">@@ -2755,45 +2802,6 @@ static int ftmod_ss7_fill_in_isap(sng_isap_t *sng_isap)</span>
}
/******************************************************************************/
<span style="color: #A00000">-static int ftmod_ss7_fill_in_self_route(int spc, int linkType, int switchType, int ssf)</span>
<span style="color: #A00000">-{</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-        if (g_ftdm_sngss7_data.cfg.mtpRoute[0].dpc == 0){</span>
<span style="color: #A00000">-                SS7_DEBUG("found new mtp3 self route\n");</span>
<span style="color: #A00000">-        } else if (g_ftdm_sngss7_data.cfg.mtpRoute[0].dpc == spc) {</span>
<span style="color: #A00000">-                SS7_DEBUG("found existing mtp3 self route\n");</span>
<span style="color: #A00000">-                return FTDM_SUCCESS;</span>
<span style="color: #A00000">-        } else {</span>
<span style="color: #A00000">-                SS7_ERROR("found new mtp3 self route but it does not match the route already configured (dpc=%d:spc=%d)\n",</span>
<span style="color: #A00000">-                                        g_ftdm_sngss7_data.cfg.mtpRoute[0].dpc,</span>
<span style="color: #A00000">-                                        spc);</span>
<span style="color: #A00000">-                return FTDM_FAIL;</span>
<span style="color: #A00000">-        }</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-        strncpy((char *)g_ftdm_sngss7_data.cfg.mtpRoute[0].name, "self-route", MAX_NAME_LEN-1);</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-        g_ftdm_sngss7_data.cfg.mtpRoute[0].id                        = 0;</span>
<span style="color: #A00000">-        g_ftdm_sngss7_data.cfg.mtpRoute[0].dpc                        = spc;</span>
<span style="color: #A00000">-        g_ftdm_sngss7_data.cfg.mtpRoute[0].linkType                = linkType;</span>
<span style="color: #A00000">-        g_ftdm_sngss7_data.cfg.mtpRoute[0].switchType        = switchType;</span>
<span style="color: #A00000">-        g_ftdm_sngss7_data.cfg.mtpRoute[0].cmbLinkSetId        = 0;</span>
<span style="color: #A00000">-        g_ftdm_sngss7_data.cfg.mtpRoute[0].isSTP                = 0;</span>
<span style="color: #A00000">-        g_ftdm_sngss7_data.cfg.mtpRoute[0].ssf                        = ssf;</span>
<span style="color: #A00000">-        g_ftdm_sngss7_data.cfg.mtpRoute[0].t6                        = 8;</span>
<span style="color: #A00000">-        g_ftdm_sngss7_data.cfg.mtpRoute[0].t8                        = 12;</span>
<span style="color: #A00000">-        g_ftdm_sngss7_data.cfg.mtpRoute[0].t10                        = 300;</span>
<span style="color: #A00000">-        g_ftdm_sngss7_data.cfg.mtpRoute[0].t11                        = 300;</span>
<span style="color: #A00000">-        g_ftdm_sngss7_data.cfg.mtpRoute[0].t15                        = 30;</span>
<span style="color: #A00000">-        g_ftdm_sngss7_data.cfg.mtpRoute[0].t16                        = 20;</span>
<span style="color: #A00000">-        g_ftdm_sngss7_data.cfg.mtpRoute[0].t18                        = 200;</span>
<span style="color: #A00000">-        g_ftdm_sngss7_data.cfg.mtpRoute[0].t19                        = 690;</span>
<span style="color: #A00000">-        g_ftdm_sngss7_data.cfg.mtpRoute[0].t21                        = 650; </span>
<span style="color: #A00000">-        g_ftdm_sngss7_data.cfg.mtpRoute[0].t25                        = 100;</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-        return 0;</span>
<span style="color: #A00000">-}</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-/******************************************************************************/</span>
static int ftmod_ss7_fill_in_ccSpan(sng_ccSpan_t *ccSpan)
{
        sng_timeslot_t                timeslot;
</pre></div>
<div class="highlight"><pre>committer: Moises Silva
comments:
Merge branch 'master' of git.freeswitch.org:freeswitch
</pre></div>
<div class="highlight"><pre>committer: Moises Silva
comments:
freetdm: add code to troubleshoot crash on tone generation
<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/ftdm_io.c b/libs/freetdm/src/ftdm_io.c</span>
<span style="color: #000080; font-weight: bold">index c9000de..1e282d1 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/ftdm_io.c</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/ftdm_io.c</span>
<span style="color: #800080; font-weight: bold">@@ -2743,10 +2743,9 @@ static ftdm_status_t ftdmchan_activate_dtmf_buffer(ftdm_channel_t *ftdmchan)</span>
        if (!ftdmchan->dtmf_buffer) {
                if (ftdm_buffer_create(&ftdmchan->dtmf_buffer, 1024, 3192, 0) != FTDM_SUCCESS) {
                        ftdm_log(FTDM_LOG_ERROR, "Failed to allocate DTMF Buffer!\n");
<span style="color: #A00000">-                        snprintf(ftdmchan->last_error, sizeof(ftdmchan->last_error), "buffer error");</span>
                        return FTDM_FAIL;
                } else {
<span style="color: #A00000">-                        ftdm_log(FTDM_LOG_DEBUG, "Created DTMF Buffer!\n");</span>
<span style="color: #00A000">+                        ftdm_log_chan_msg(ftdmchan, FTDM_LOG_DEBUG, "Created DTMF buffer\n");</span>
                }
        }
<span style="color: #800080; font-weight: bold">@@ -3588,8 +3587,17 @@ static FIO_READ_FUNCTION(ftdm_raw_read)</span>
        return status;
}
<span style="color: #A00000">-static ftdm_status_t handle_dtmf(ftdm_channel_t *ftdmchan, ftdm_size_t datalen)</span>
<span style="color: #00A000">+/* This function takes care of automatically generating DTMF or FSK tones when needed */</span>
<span style="color: #00A000">+static ftdm_status_t handle_tone_generation(ftdm_channel_t *ftdmchan, ftdm_size_t datalen)</span>
{
<span style="color: #00A000">+        /*</span>
<span style="color: #00A000">+         * datalen: size in bytes of the chunk of data the user requested to read (this function </span>
<span style="color: #00A000">+         * is called from the ftdm_channel_read function)</span>
<span style="color: #00A000">+         * dblen: size currently in use in any of the tone generation buffers (data available in the buffer)</span>
<span style="color: #00A000">+         * gen_dtmf_buffer: buffer holding the raw ASCII digits that the user requested to generate</span>
<span style="color: #00A000">+         * dtmf_buffer: raw linear tone data generated by teletone to be written to the devices</span>
<span style="color: #00A000">+         * fsk_buffer: raw linear FSK modulated data for caller id</span>
<span style="color: #00A000">+         */</span>
        ftdm_buffer_t *buffer = NULL;
        ftdm_size_t dblen = 0;
        int wrote = 0;
<span style="color: #800080; font-weight: bold">@@ -3604,7 +3612,7 @@ static ftdm_status_t handle_dtmf(ftdm_channel_t *ftdmchan, ftdm_size_t datalen)</span>
                }
                if (ftdm_buffer_read(ftdmchan->gen_dtmf_buffer, digits, dblen) && !ftdm_strlen_zero_buf(digits)) {
<span style="color: #A00000">-                        ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Generating DTMF [%s]\n", digits);        </span>
<span style="color: #00A000">+                        ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Generating DTMF [%s]\n", digits);</span>
                
                        cur = digits;
<span style="color: #800080; font-weight: bold">@@ -3618,7 +3626,7 @@ static ftdm_status_t handle_dtmf(ftdm_channel_t *ftdmchan, ftdm_size_t datalen)</span>
                                        ftdm_buffer_write(ftdmchan->dtmf_buffer, ftdmchan->tone_session.buffer, wrote * 2);
                                        x++;
                                } else {
<span style="color: #A00000">-                                        ftdm_log(FTDM_LOG_ERROR, "%d:%d Problem Adding DTMF SEQ [%s]\n", ftdmchan->span_id, ftdmchan->chan_id, digits);</span>
<span style="color: #00A000">+                                        ftdm_log_chan(ftdmchan, FTDM_LOG_ERROR, "Problem adding DTMF sequence [%s]\n", digits);</span>
                                        return FTDM_FAIL;
                                }
                        }
<span style="color: #800080; font-weight: bold">@@ -3631,6 +3639,7 @@ static ftdm_status_t handle_dtmf(ftdm_channel_t *ftdmchan, ftdm_size_t datalen)</span>
        
        if (!ftdmchan->buffer_delay || --ftdmchan->buffer_delay == 0) {
<span style="color: #00A000">+                /* time to pick a buffer, either the dtmf or fsk buffer */</span>
                if (ftdmchan->dtmf_buffer && (dblen = ftdm_buffer_inuse(ftdmchan->dtmf_buffer))) {
                        buffer = ftdmchan->dtmf_buffer;
                } else if (ftdmchan->fsk_buffer && (dblen = ftdm_buffer_inuse(ftdmchan->fsk_buffer))) {
<span style="color: #800080; font-weight: bold">@@ -3638,22 +3647,41 @@ static ftdm_status_t handle_dtmf(ftdm_channel_t *ftdmchan, ftdm_size_t datalen)</span>
                }
        }
<span style="color: #00A000">+        /* if we picked a buffer, time to read from it and write the linear data to the device */</span>
        if (buffer) {
<span style="color: #A00000">-                ftdm_size_t dlen = datalen;</span>
                uint8_t auxbuf[1024];
<span style="color: #00A000">+                /* we initialize dlen to datalen, which is the size in bytes the </span>
<span style="color: #00A000">+                 * user wants to read (typically chunks of 160 bytes, 20ms G.711) */</span>
<span style="color: #00A000">+                ftdm_size_t dlen = datalen;</span>
                ftdm_size_t len, br, max = sizeof(auxbuf);
                
<span style="color: #00A000">+                /* if the codec is not linear, then data is really twice as much cuz</span>
<span style="color: #00A000">+                 tone generation is done in linear (we assume anything different than linear is G.711) */</span>
                if (ftdmchan->native_codec != FTDM_CODEC_SLIN) {
                        dlen *= 2;
                }
<span style="color: #A00000">-                </span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                /* we do not expect the user chunks to be bigger than auxbuf */</span>
<span style="color: #00A000">+                ftdm_assert(dlen <= sizeof(auxbuf), "Unexpected size for user data chunk size\n");</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                /* dblen is the size in use for dtmf_buffer or fsk_buffer, and dlen is the size</span>
<span style="color: #00A000">+                 * of the read chunks of the user, we pick the smaller one */</span>
                len = dblen > dlen ? dlen : dblen;
<span style="color: #00A000">+                /* we can't read more than the size of our auxiliary buffer */</span>
<span style="color: #00A000">+                ftdm_assert((len <= sizeof(auxbuf)), "Unexpected size to read into auxbuf\n");</span>
<span style="color: #00A000">+</span>
                br = ftdm_buffer_read(buffer, auxbuf, len);                
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                /* the amount read can't possibly be bigger than what we requested */</span>
<span style="color: #00A000">+                ftdm_assert((br <= len), "Unexpected size read from tone generation buffer\n");</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                /* if we read less than the chunk size, we must fill in with silence the rest */</span>
                if (br < dlen) {
                        memset(auxbuf + br, 0, dlen - br);
                }
<span style="color: #00A000">+                /* finally we convert to the native format for the channel if necessary */</span>
                if (ftdmchan->native_codec != FTDM_CODEC_SLIN) {
                        if (ftdmchan->native_codec == FTDM_CODEC_ULAW) {
                                fio_slin2ulaw(auxbuf, max, &dlen);
<span style="color: #800080; font-weight: bold">@@ -3662,6 +3690,7 @@ static ftdm_status_t handle_dtmf(ftdm_channel_t *ftdmchan, ftdm_size_t datalen)</span>
                        }
                }
                
<span style="color: #00A000">+                /* write the tone to the channel */</span>
                return ftdm_raw_write(ftdmchan, auxbuf, &dlen);
        }
<span style="color: #800080; font-weight: bold">@@ -3741,7 +3770,7 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_read(ftdm_channel_t *ftdmchan, void *data</span>
                        rdata[i] = ftdmchan->rxgain_table[rdata[i]];
                }
        }
<span style="color: #A00000">-        handle_dtmf(ftdmchan, *datalen);</span>
<span style="color: #00A000">+        handle_tone_generation(ftdmchan, *datalen);</span>
        if (ftdm_test_flag(ftdmchan, FTDM_CHANNEL_TRANSCODE) && ftdmchan->effective_codec != ftdmchan->native_codec) {
                if (ftdmchan->native_codec == FTDM_CODEC_ULAW && ftdmchan->effective_codec == FTDM_CODEC_SLIN) {
<span style="color: #800080; font-weight: bold">@@ -3938,7 +3967,8 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_write(ftdm_channel_t *ftdmchan, void *dat</span>
        if (!ftdmchan->buffer_delay &&
                ((ftdmchan->dtmf_buffer && ftdm_buffer_inuse(ftdmchan->dtmf_buffer)) ||
                 (ftdmchan->fsk_buffer && ftdm_buffer_inuse(ftdmchan->fsk_buffer)))) {
<span style="color: #A00000">-                /* read size writing DTMF ATM */</span>
<span style="color: #00A000">+                /* generating some kind of tone at the moment (see handle_tone_generation), </span>
<span style="color: #00A000">+                 * we ignore user data ... */</span>
                goto done;
        }
</pre></div>
<div class="highlight"><pre>committer: Christopher Rienzo
comments:
FS-3043 break during mod_unimrcp can hang session
<span style="color: #000080; font-weight: bold">diff --git a/src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c b/src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c</span>
<span style="color: #000080; font-weight: bold">index 734ef21..d5bac5f 100644</span>
<span style="color: #A00000">--- a/src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c</span>
<span style="color: #00A000">+++ b/src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c</span>
<span style="color: #800080; font-weight: bold">@@ -1363,7 +1363,7 @@ static switch_status_t speech_channel_stop(speech_channel_t *schannel)</span>
                }
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) %s stopped\n", schannel->name, speech_channel_type_to_string(schannel->type));
        } else if (schannel->state == SPEECH_CHANNEL_DONE) {
<span style="color: #A00000">-                speech_channel_set_state(schannel, SPEECH_CHANNEL_READY);</span>
<span style="color: #00A000">+                speech_channel_set_state_unlocked(schannel, SPEECH_CHANNEL_READY);</span>
        }
done:
</pre></div>
<div class="highlight"><pre>committer: Marc Olivier Chouinard
comments:
mod_conference: Added to the Auto OutCall support to specify the conf profile to be used using variable : conference_auto_outcall_profile
<span style="color: #000080; font-weight: bold">diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c</span>
<span style="color: #000080; font-weight: bold">index 961a140..0aee352 100644</span>
<span style="color: #A00000">--- a/src/mod/applications/mod_conference/mod_conference.c</span>
<span style="color: #00A000">+++ b/src/mod/applications/mod_conference/mod_conference.c</span>
<span style="color: #800080; font-weight: bold">@@ -401,13 +401,14 @@ static switch_status_t conference_outcall(conference_obj_t *conference,</span>
                                                                                 char *bridgeto, uint32_t timeout,
                                                                                 char *flags,
                                                                                 char *cid_name,
<span style="color: #A00000">-                                                                                 char *cid_num, </span>
<span style="color: #00A000">+                                                                                 char *cid_num,</span>
<span style="color: #00A000">+                                                                                 char *profile,</span>
                                                                                 switch_call_cause_t *cause,
                                                                                 switch_call_cause_t *cancel_cause);
static switch_status_t conference_outcall_bg(conference_obj_t *conference,
                                                                                         char *conference_name,
                                                                                         switch_core_session_t *session, char *bridgeto, uint32_t timeout, const char *flags, const char *cid_name,
<span style="color: #A00000">-                                                                                         const char *cid_num, const char *call_uuid, switch_call_cause_t *cancel_cause);</span>
<span style="color: #00A000">+                                                                                         const char *cid_num, const char *call_uuid, const char *profile, switch_call_cause_t *cancel_cause);</span>
SWITCH_STANDARD_APP(conference_function);
static void launch_conference_thread(conference_obj_t *conference);
static void launch_conference_video_thread(conference_obj_t *conference);
<span style="color: #800080; font-weight: bold">@@ -2410,6 +2411,7 @@ static void conference_loop_output(conference_member_t *member)</span>
                        const char *cid_num = switch_channel_get_variable(channel, "conference_auto_outcall_caller_id_number");
                        const char *toval = switch_channel_get_variable(channel, "conference_auto_outcall_timeout");
                        const char *flags = switch_channel_get_variable(channel, "conference_auto_outcall_flags");
<span style="color: #00A000">+                        const char *profile = switch_channel_get_variable(channel, "conference_auto_outcall_profile");</span>
                        const char *ann = switch_channel_get_variable(channel, "conference_auto_outcall_announce");
                        const char *prefix = switch_channel_get_variable(channel, "conference_auto_outcall_prefix");
                        int to = 60;
<span style="color: #800080; font-weight: bold">@@ -2441,7 +2443,7 @@ static void conference_loop_output(conference_member_t *member)</span>
                                        char *dial_str = switch_mprintf("%s%s", switch_str_nil(prefix), argv[x]);
                                        switch_assert(dial_str);
                                        conference_outcall_bg(member->conference, NULL, NULL, dial_str, to, switch_str_nil(flags), cid_name, cid_num, NULL,
<span style="color: #A00000">-                                                                                 &member->conference->cancel_cause);</span>
<span style="color: #00A000">+                                                                                 profile, &member->conference->cancel_cause);</span>
                                        switch_safe_free(dial_str);
                                }
                                switch_safe_free(cpstr);
<span style="color: #800080; font-weight: bold">@@ -4264,9 +4266,9 @@ static switch_status_t conf_api_sub_dial(conference_obj_t *conference, switch_st</span>
        }
        if (conference) {
<span style="color: #A00000">-                conference_outcall(conference, NULL, NULL, argv[2], 60, NULL, argv[4], argv[3], &cause, NULL);</span>
<span style="color: #00A000">+                conference_outcall(conference, NULL, NULL, argv[2], 60, NULL, argv[4], argv[3], NULL, &cause, NULL);</span>
        } else {
<span style="color: #A00000">-                conference_outcall(NULL, argv[0], NULL, argv[2], 60, NULL, argv[4], argv[3], &cause, NULL);</span>
<span style="color: #00A000">+                conference_outcall(NULL, argv[0], NULL, argv[2], 60, NULL, argv[4], argv[3], NULL, &cause, NULL);</span>
        }
        stream->write_function(stream, "Call Requested: result: [%s]\n", switch_channel_cause2str(cause));
<span style="color: #800080; font-weight: bold">@@ -4289,9 +4291,9 @@ static switch_status_t conf_api_sub_bgdial(conference_obj_t *conference, switch_</span>
        switch_uuid_format(uuid_str, &uuid);
        if (conference) {
<span style="color: #A00000">-                conference_outcall_bg(conference, NULL, NULL, argv[2], 60, NULL, argv[4], argv[3], uuid_str, NULL);</span>
<span style="color: #00A000">+                conference_outcall_bg(conference, NULL, NULL, argv[2], 60, NULL, argv[4], argv[3], uuid_str, NULL, NULL);</span>
        } else {
<span style="color: #A00000">-                conference_outcall_bg(NULL, argv[0], NULL, argv[2], 60, NULL, argv[4], argv[3], uuid_str, NULL);</span>
<span style="color: #00A000">+                conference_outcall_bg(NULL, argv[0], NULL, argv[2], 60, NULL, argv[4], argv[3], uuid_str, NULL, NULL);</span>
        }
        stream->write_function(stream, "OK Job-UUID: %s\n", uuid_str);
<span style="color: #800080; font-weight: bold">@@ -4807,7 +4809,8 @@ static switch_status_t conference_outcall(conference_obj_t *conference,</span>
                                                                                 switch_core_session_t *session,
                                                                                 char *bridgeto, uint32_t timeout,
                                                                                 char *flags, char *cid_name,
<span style="color: #A00000">-                                                                                 char *cid_num, </span>
<span style="color: #00A000">+                                                                                 char *cid_num,</span>
<span style="color: #00A000">+                                                                                 char *profile,</span>
                                                                                 switch_call_cause_t *cause,
                                                                                 switch_call_cause_t *cancel_cause)
{
<span style="color: #800080; font-weight: bold">@@ -4817,6 +4820,7 @@ static switch_status_t conference_outcall(conference_obj_t *conference,</span>
        switch_channel_t *caller_channel = NULL;
        char appdata[512];
        int rdlock = 0;
<span style="color: #00A000">+        switch_bool_t have_flags = SWITCH_FALSE;</span>
        *cause = SWITCH_CAUSE_NORMAL_CLEARING;
<span style="color: #800080; font-weight: bold">@@ -4902,13 +4906,16 @@ static switch_status_t conference_outcall(conference_obj_t *conference,</span>
                        status = SWITCH_STATUS_MEMERR;
                        goto done;
                }
<span style="color: #A00000">-                /* add them to the conference */</span>
<span style="color: #00A000">+</span>
                if (flags && strcasecmp(flags, "none")) {
<span style="color: #A00000">-                        switch_snprintf(appdata, sizeof(appdata), "%s+flags{%s}", conference_name, flags);</span>
<span style="color: #A00000">-                        switch_caller_extension_add_application(peer_session, extension, (char *) global_app_name, appdata);</span>
<span style="color: #A00000">-                } else {</span>
<span style="color: #A00000">-                        switch_caller_extension_add_application(peer_session, extension, (char *) global_app_name, conference_name);</span>
<span style="color: #00A000">+                        have_flags = SWITCH_TRUE;</span>
                }
<span style="color: #00A000">+                /* add them to the conference */</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                switch_snprintf(appdata, sizeof(appdata), "%s%s%s%s%s%s", conference_name,</span>
<span style="color: #00A000">+                                profile?"@":"", profile?profile:"",</span>
<span style="color: #00A000">+                                have_flags?"+flags{":"", have_flags?flags:"", have_flags?"}":"");</span>
<span style="color: #00A000">+                switch_caller_extension_add_application(peer_session, extension, (char *) global_app_name, appdata);</span>
                switch_channel_set_caller_extension(peer_channel, extension);
                switch_channel_set_state(peer_channel, CS_EXECUTE);
<span style="color: #800080; font-weight: bold">@@ -4940,6 +4947,7 @@ struct bg_call {</span>
        char *cid_num;
        char *conference_name;
        char *uuid;
<span style="color: #00A000">+        char *profile;</span>
        switch_call_cause_t *cancel_cause;
        switch_memory_pool_t *pool;
};
<span style="color: #800080; font-weight: bold">@@ -4953,7 +4961,7 @@ static void *SWITCH_THREAD_FUNC conference_outcall_run(switch_thread_t *thread,</span>
                switch_event_t *event;
                conference_outcall(call->conference, call->conference_name,
<span style="color: #A00000">-                                                 call->session, call->bridgeto, call->timeout, call->flags, call->cid_name, call->cid_num, &cause, call->cancel_cause);</span>
<span style="color: #00A000">+                                                 call->session, call->bridgeto, call->timeout, call->flags, call->cid_name, call->cid_num, call->profile, &cause, call->cancel_cause);</span>
                if (call->conference && test_eflag(call->conference, EFLAG_BGDIAL_RESULT) &&
                        switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
<span style="color: #800080; font-weight: bold">@@ -4969,6 +4977,7 @@ static void *SWITCH_THREAD_FUNC conference_outcall_run(switch_thread_t *thread,</span>
                switch_safe_free(call->cid_num);
                switch_safe_free(call->conference_name);
                switch_safe_free(call->uuid);
<span style="color: #00A000">+                switch_safe_free(call->profile);</span>
                if (call->pool) {
                        switch_core_destroy_memory_pool(&call->pool);
                }
<span style="color: #800080; font-weight: bold">@@ -4981,7 +4990,7 @@ static void *SWITCH_THREAD_FUNC conference_outcall_run(switch_thread_t *thread,</span>
static switch_status_t conference_outcall_bg(conference_obj_t *conference,
                                                                                         char *conference_name,
                                                                                         switch_core_session_t *session, char *bridgeto, uint32_t timeout, const char *flags, const char *cid_name,
<span style="color: #A00000">-                                                                                         const char *cid_num, const char *call_uuid, switch_call_cause_t *cancel_cause)</span>
<span style="color: #00A000">+                                                                                         const char *cid_num, const char *call_uuid, const char *profile, switch_call_cause_t *cancel_cause)</span>
{
        struct bg_call *call = NULL;
        switch_thread_t *thread;
<span style="color: #800080; font-weight: bold">@@ -5025,6 +5034,10 @@ static switch_status_t conference_outcall_bg(conference_obj_t *conference,</span>
                call->uuid = strdup(call_uuid);
        }
<span style="color: #00A000">+ if (profile) {</span>
<span style="color: #00A000">+ call->profile = strdup(profile);</span>
<span style="color: #00A000">+ }</span>
<span style="color: #00A000">+</span>
        switch_threadattr_create(&thd_attr, pool);
        switch_threadattr_detach_set(thd_attr, 1);
        switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
<span style="color: #800080; font-weight: bold">@@ -5750,7 +5763,7 @@ SWITCH_STANDARD_APP(conference_function)</span>
        /* if we're using "bridge:" make an outbound call and bridge it in */
        if (!zstr(bridgeto) && strcasecmp(bridgeto, "none")) {
                switch_call_cause_t cause;
<span style="color: #A00000">-                if (conference_outcall(conference, NULL, session, bridgeto, 60, NULL, NULL, NULL, &cause, NULL) != SWITCH_STATUS_SUCCESS) {</span>
<span style="color: #00A000">+                if (conference_outcall(conference, NULL, session, bridgeto, 60, NULL, NULL, NULL, NULL, &cause, NULL) != SWITCH_STATUS_SUCCESS) {</span>
                        goto done;
                }
        } else {
</pre></div>
<div class="highlight"><pre>committer: Anthony Minessale
comments:
take out default it seems to suck on 32 bit
<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 32cb76f..44893b9 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">@@ -25,7 +25,7 @@</span>
<param name="colorize-console" value="true"/>
<!-- minimum idle CPU before refusing calls -->
<span style="color: #A00000">- <param name="min-idle-cpu" value="25"/></span>
<span style="color: #00A000">+ <!--<param name="min-idle-cpu" value="25"/>--></span>
<!--
        Max number of sessions to allow at any given time.
</pre></div>
<div class="highlight"><pre>committer: Moises Silva
comments:
Merge remote branch 'smgfs/master'
</pre></div>
<div class="highlight"><pre>committer: Anthony Minessale
comments:
minor regression from 4ae8282e6c6df0e296113e9b4b4a1383e1af8ad7 (sofia_contact with no args from cli caused seg)
<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 c683203..2a2ec63 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">@@ -3458,7 +3458,7 @@ SWITCH_STANDARD_API(sofia_contact_function)</span>
{
        char *data;
        char *user = NULL;
<span style="color: #A00000">-        char *domain = NULL;</span>
<span style="color: #00A000">+        char *domain = NULL, *dup_domain = NULL;</span>
        char *concat = NULL;
        char *profile_name = NULL;
        char *p;
<span style="color: #800080; font-weight: bold">@@ -3501,7 +3501,8 @@ SWITCH_STANDARD_API(sofia_contact_function)</span>
        }
        if (zstr(domain)) {
<span style="color: #A00000">-                domain = switch_core_get_variable_pdup("domain", switch_core_session_get_pool(session));</span>
<span style="color: #00A000">+                dup_domain = switch_core_get_variable_dup("domain");</span>
<span style="color: #00A000">+                domain = dup_domain;</span>
        }
        if (!user) goto end;
<span style="color: #800080; font-weight: bold">@@ -3567,6 +3568,7 @@ SWITCH_STANDARD_API(sofia_contact_function)</span>
        switch_safe_free(mystream.data);                                        
        switch_safe_free(data);
<span style="color: #00A000">+        switch_safe_free(dup_domain);</span>
        return SWITCH_STATUS_SUCCESS;
}
</pre></div>
<div class="highlight"><pre>committer: Anthony Minessale
comments:
reset signal_bond variable back to its original value on failed dial in att_xfer
<span style="color: #000080; font-weight: bold">diff --git a/src/mod/applications/mod_dptools/mod_dptools.c b/src/mod/applications/mod_dptools/mod_dptools.c</span>
<span style="color: #000080; font-weight: bold">index f7bf86b..9a1258a 100755</span>
<span style="color: #A00000">--- a/src/mod/applications/mod_dptools/mod_dptools.c</span>
<span style="color: #00A000">+++ b/src/mod/applications/mod_dptools/mod_dptools.c</span>
<span style="color: #800080; font-weight: bold">@@ -1864,6 +1864,7 @@ SWITCH_STANDARD_APP(att_xfer_function)</span>
        if (switch_ivr_originate(session, &peer_session, &cause, data, 0, NULL, NULL, NULL, NULL, NULL, SOF_NONE, NULL)
                != SWITCH_STATUS_SUCCESS || !peer_session) {
<span style="color: #00A000">+                switch_channel_set_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE, bond);</span>
                goto end;
        }
<span style="color: #800080; font-weight: bold">@@ -1878,6 +1879,7 @@ SWITCH_STANDARD_APP(att_xfer_function)</span>
        if (zstr(bond) && switch_channel_down(peer_channel)) {
                switch_core_session_rwunlock(peer_session);
<span style="color: #00A000">+                switch_channel_set_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE, bond);</span>
                goto end;
        }
</pre></div>
<div class="highlight"><pre>committer: David Yat Sin
comments:
Fixes to support QSIG over T1
<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_cfg.c b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_cfg.c</span>
<span style="color: #000080; font-weight: bold">index bd5b13b..9fe2819 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_cfg.c</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_cfg.c</span>
<span style="color: #800080; font-weight: bold">@@ -84,6 +84,8 @@ static ftdm_status_t parse_switchtype(const char* switch_name, ftdm_span_t *span</span>
                                signal_data->switchtype = SNGISDN_SWITCH_4ESS;
                        } else if (!strcasecmp(switch_name, "dms100")) {
                                signal_data->switchtype = SNGISDN_SWITCH_DMS100;
<span style="color: #00A000">+                        } else if (!strcasecmp(switch_name, "qsig")) {</span>
<span style="color: #00A000">+                                signal_data->switchtype = SNGISDN_SWITCH_QSIG;</span>
                        } else {
                                ftdm_log(FTDM_LOG_ERROR, "%s:Unsupported switchtype %s for trunktype:%s\n", span->name, switch_name, ftdm_trunk_type2str(span->trunk_type));
                                return FTDM_FAIL;
<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_cfg.c b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_cfg.c</span>
<span style="color: #000080; font-weight: bold">index a52a624..1bd2753 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_cfg.c</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_cfg.c</span>
<span style="color: #800080; font-weight: bold">@@ -667,25 +667,33 @@ ftdm_status_t sngisdn_stack_cfg_q931_dlsap(ftdm_span_t *span)</span>
        cfg.t.cfg.s.inDLSAP.maxBSrvCnt = 2;
        cfg.t.cfg.s.inDLSAP.maxDSrvCnt = 2;
#endif /* ISDN_SRV */
<span style="color: #A00000">-        </span>
<span style="color: #A00000">-        if (signal_data->signalling == SNGISDN_SIGNALING_NET) {</span>
<span style="color: #A00000">-                cfg.t.cfg.s.inDLSAP.ackOpt = TRUE;</span>
<span style="color: #A00000">-                cfg.t.cfg.s.inDLSAP.intType = NETWORK;</span>
<span style="color: #A00000">-                cfg.t.cfg.s.inDLSAP.clrGlr = FALSE;                        /* in case of glare, do not clear local call */</span>
<span style="color: #A00000">-                cfg.t.cfg.s.inDLSAP.statEnqOpt = TRUE;</span>
<span style="color: #A00000">-                if (signal_data->switchtype == SNGISDN_SWITCH_EUROISDN ||</span>
<span style="color: #A00000">-                        signal_data->switchtype == SNGISDN_SWITCH_INSNET) {</span>
<span style="color: #A00000">-                        cfg.t.cfg.s.inDLSAP.rstOpt = FALSE;</span>
<span style="color: #A00000">-                } else {</span>
<span style="color: #A00000">-                        cfg.t.cfg.s.inDLSAP.rstOpt = TRUE;</span>
<span style="color: #A00000">-                }</span>
<span style="color: #A00000">-        } else {</span>
<span style="color: #A00000">-                cfg.t.cfg.s.inDLSAP.ackOpt = FALSE;</span>
<span style="color: #A00000">-                cfg.t.cfg.s.inDLSAP.intType = USER;</span>
<span style="color: #00A000">+        if (signal_data->switchtype == SNGISDN_SWITCH_QSIG) {</span>
<span style="color: #00A000">+                cfg.t.cfg.s.inDLSAP.ackOpt = TRUE;</span>
<span style="color: #00A000">+                cfg.t.cfg.s.inDLSAP.intType = SYM_USER;</span>
                cfg.t.cfg.s.inDLSAP.clrGlr = TRUE;                        /* in case of glare, clear local call */
                cfg.t.cfg.s.inDLSAP.statEnqOpt = FALSE;
                cfg.t.cfg.s.inDLSAP.rstOpt = FALSE;
<span style="color: #00A000">+        } else {</span>
<span style="color: #00A000">+                if (signal_data->signalling == SNGISDN_SIGNALING_NET) {</span>
<span style="color: #00A000">+                        cfg.t.cfg.s.inDLSAP.ackOpt = TRUE;</span>
<span style="color: #00A000">+                        cfg.t.cfg.s.inDLSAP.intType = NETWORK;</span>
<span style="color: #00A000">+                        cfg.t.cfg.s.inDLSAP.clrGlr = FALSE;                        /* in case of glare, do not clear local call */</span>
<span style="color: #00A000">+                        cfg.t.cfg.s.inDLSAP.statEnqOpt = TRUE;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                        if (signal_data->switchtype == SNGISDN_SWITCH_EUROISDN ||</span>
<span style="color: #00A000">+                                signal_data->switchtype == SNGISDN_SWITCH_INSNET) {</span>
<span style="color: #00A000">+                                cfg.t.cfg.s.inDLSAP.rstOpt = FALSE;</span>
<span style="color: #00A000">+                        } else {</span>
<span style="color: #00A000">+                                cfg.t.cfg.s.inDLSAP.rstOpt = TRUE;</span>
<span style="color: #00A000">+                        }</span>
<span style="color: #00A000">+                } else {</span>
<span style="color: #00A000">+                        cfg.t.cfg.s.inDLSAP.ackOpt = FALSE;</span>
<span style="color: #00A000">+                        cfg.t.cfg.s.inDLSAP.intType = USER;</span>
<span style="color: #00A000">+                        cfg.t.cfg.s.inDLSAP.clrGlr = TRUE;                        /* in case of glare, clear local call */</span>
<span style="color: #00A000">+                        cfg.t.cfg.s.inDLSAP.statEnqOpt = FALSE;</span>
<span style="color: #00A000">+                        cfg.t.cfg.s.inDLSAP.rstOpt = FALSE;</span>
<span style="color: #00A000">+                }</span>
        }
        /* Override the restart options if user selected that option */
</pre></div>
<div class="highlight"><pre>committer: David Yat Sin
comments:
Fixes to support QSIG over T1
<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_cfg.c b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_cfg.c</span>
<span style="color: #000080; font-weight: bold">index bd5b13b..9fe2819 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_cfg.c</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_cfg.c</span>
<span style="color: #800080; font-weight: bold">@@ -84,6 +84,8 @@ static ftdm_status_t parse_switchtype(const char* switch_name, ftdm_span_t *span</span>
                                signal_data->switchtype = SNGISDN_SWITCH_4ESS;
                        } else if (!strcasecmp(switch_name, "dms100")) {
                                signal_data->switchtype = SNGISDN_SWITCH_DMS100;
<span style="color: #00A000">+                        } else if (!strcasecmp(switch_name, "qsig")) {</span>
<span style="color: #00A000">+                                signal_data->switchtype = SNGISDN_SWITCH_QSIG;</span>
                        } else {
                                ftdm_log(FTDM_LOG_ERROR, "%s:Unsupported switchtype %s for trunktype:%s\n", span->name, switch_name, ftdm_trunk_type2str(span->trunk_type));
                                return FTDM_FAIL;
<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_cfg.c b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_cfg.c</span>
<span style="color: #000080; font-weight: bold">index a52a624..1bd2753 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_cfg.c</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_cfg.c</span>
<span style="color: #800080; font-weight: bold">@@ -667,25 +667,33 @@ ftdm_status_t sngisdn_stack_cfg_q931_dlsap(ftdm_span_t *span)</span>
        cfg.t.cfg.s.inDLSAP.maxBSrvCnt = 2;
        cfg.t.cfg.s.inDLSAP.maxDSrvCnt = 2;
#endif /* ISDN_SRV */
<span style="color: #A00000">-        </span>
<span style="color: #A00000">-        if (signal_data->signalling == SNGISDN_SIGNALING_NET) {</span>
<span style="color: #A00000">-                cfg.t.cfg.s.inDLSAP.ackOpt = TRUE;</span>
<span style="color: #A00000">-                cfg.t.cfg.s.inDLSAP.intType = NETWORK;</span>
<span style="color: #A00000">-                cfg.t.cfg.s.inDLSAP.clrGlr = FALSE;                        /* in case of glare, do not clear local call */</span>
<span style="color: #A00000">-                cfg.t.cfg.s.inDLSAP.statEnqOpt = TRUE;</span>
<span style="color: #A00000">-                if (signal_data->switchtype == SNGISDN_SWITCH_EUROISDN ||</span>
<span style="color: #A00000">-                        signal_data->switchtype == SNGISDN_SWITCH_INSNET) {</span>
<span style="color: #A00000">-                        cfg.t.cfg.s.inDLSAP.rstOpt = FALSE;</span>
<span style="color: #A00000">-                } else {</span>
<span style="color: #A00000">-                        cfg.t.cfg.s.inDLSAP.rstOpt = TRUE;</span>
<span style="color: #A00000">-                }</span>
<span style="color: #A00000">-        } else {</span>
<span style="color: #A00000">-                cfg.t.cfg.s.inDLSAP.ackOpt = FALSE;</span>
<span style="color: #A00000">-                cfg.t.cfg.s.inDLSAP.intType = USER;</span>
<span style="color: #00A000">+        if (signal_data->switchtype == SNGISDN_SWITCH_QSIG) {</span>
<span style="color: #00A000">+                cfg.t.cfg.s.inDLSAP.ackOpt = TRUE;</span>
<span style="color: #00A000">+                cfg.t.cfg.s.inDLSAP.intType = SYM_USER;</span>
                cfg.t.cfg.s.inDLSAP.clrGlr = TRUE;                        /* in case of glare, clear local call */
                cfg.t.cfg.s.inDLSAP.statEnqOpt = FALSE;
                cfg.t.cfg.s.inDLSAP.rstOpt = FALSE;
<span style="color: #00A000">+        } else {</span>
<span style="color: #00A000">+                if (signal_data->signalling == SNGISDN_SIGNALING_NET) {</span>
<span style="color: #00A000">+                        cfg.t.cfg.s.inDLSAP.ackOpt = TRUE;</span>
<span style="color: #00A000">+                        cfg.t.cfg.s.inDLSAP.intType = NETWORK;</span>
<span style="color: #00A000">+                        cfg.t.cfg.s.inDLSAP.clrGlr = FALSE;                        /* in case of glare, do not clear local call */</span>
<span style="color: #00A000">+                        cfg.t.cfg.s.inDLSAP.statEnqOpt = TRUE;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                        if (signal_data->switchtype == SNGISDN_SWITCH_EUROISDN ||</span>
<span style="color: #00A000">+                                signal_data->switchtype == SNGISDN_SWITCH_INSNET) {</span>
<span style="color: #00A000">+                                cfg.t.cfg.s.inDLSAP.rstOpt = FALSE;</span>
<span style="color: #00A000">+                        } else {</span>
<span style="color: #00A000">+                                cfg.t.cfg.s.inDLSAP.rstOpt = TRUE;</span>
<span style="color: #00A000">+                        }</span>
<span style="color: #00A000">+                } else {</span>
<span style="color: #00A000">+                        cfg.t.cfg.s.inDLSAP.ackOpt = FALSE;</span>
<span style="color: #00A000">+                        cfg.t.cfg.s.inDLSAP.intType = USER;</span>
<span style="color: #00A000">+                        cfg.t.cfg.s.inDLSAP.clrGlr = TRUE;                        /* in case of glare, clear local call */</span>
<span style="color: #00A000">+                        cfg.t.cfg.s.inDLSAP.statEnqOpt = FALSE;</span>
<span style="color: #00A000">+                        cfg.t.cfg.s.inDLSAP.rstOpt = FALSE;</span>
<span style="color: #00A000">+                }</span>
        }
        /* Override the restart options if user selected that option */
</pre></div>
<div class="highlight"><pre>committer: Anthony Minessale
comments:
FS-3040/FS-1742: use 1 sql query for message count in a way that is portable and doesn't segfault
<span style="color: #000080; font-weight: bold">diff --git a/src/mod/applications/mod_voicemail/mod_voicemail.c b/src/mod/applications/mod_voicemail/mod_voicemail.c</span>
<span style="color: #000080; font-weight: bold">index 80b011e..894e49a 100644</span>
<span style="color: #A00000">--- a/src/mod/applications/mod_voicemail/mod_voicemail.c</span>
<span style="color: #00A000">+++ b/src/mod/applications/mod_voicemail/mod_voicemail.c</span>
<span style="color: #800080; font-weight: bold">@@ -1011,6 +1011,11 @@ typedef struct msg_cnt_callback msg_cnt_callback_t;</span>
static int message_count_callback(void *pArg, int argc, char **argv, char **columnNames)
{
        msg_cnt_callback_t *cbt = (msg_cnt_callback_t *) pArg;
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        if (argc < 3 || zstr(argv[0]) || zstr(argv[1]) || zstr(argv[2])) {</span>
<span style="color: #00A000">+                return -1;</span>
<span style="color: #00A000">+        }</span>
<span style="color: #00A000">+</span>
        if (atoi(argv[0]) == 1) {        /* UnRead */
                if (!strcasecmp(argv[1], "A_URGENT")) {        /* Urgent */
                        cbt->total_new_urgent_messages = atoi(argv[2]);
<span style="color: #800080; font-weight: bold">@@ -1263,7 +1268,7 @@ static void message_count(vm_profile_t *profile, const char *id_in, const char *</span>
{
        char msg_count[80] = "";
        msg_cnt_callback_t cbt = { 0 };
<span style="color: #A00000">-        char sql[256];</span>
<span style="color: #00A000">+        char *sql;</span>
        char *myid = NULL;
<span style="color: #800080; font-weight: bold">@@ -1277,11 +1282,20 @@ static void message_count(vm_profile_t *profile, const char *id_in, const char *</span>
        myid = resolve_id(id_in, domain_name, "message-count");
<span style="color: #A00000">-        switch_snprintf(sql, sizeof(sql),</span>
<span style="color: #A00000">-                                        "select read_epoch=0, read_flags, count(read_epoch) from voicemail_msgs where username='%s' and domain='%s' and in_folder='%s' group by read_epoch=0,read_flags;",</span>
<span style="color: #A00000">-                                        myid, domain_name, myfolder);</span>
<span style="color: #00A000">+        sql = switch_mprintf(</span>
<span style="color: #00A000">+                                                 "select 1, read_flags, count(read_epoch) from voicemail_msgs where "</span>
<span style="color: #00A000">+                                                 "username='%q' and domain='%q' and in_folder='%q' and read_epoch=0 "</span>
<span style="color: #00A000">+                                                 "group by read_flags "</span>
<span style="color: #00A000">+                                                 "union "</span>
<span style="color: #00A000">+                                                 "select 0, read_flags, count(read_epoch) from voicemail_msgs where "</span>
<span style="color: #00A000">+                                                 "username='%q' and domain='%q' and in_folder='%q' and read_epoch<>0 "</span>
<span style="color: #00A000">+                                                 "group by read_flags;",</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                                                 myid, domain_name, myfolder,</span>
<span style="color: #00A000">+                                                 myid, domain_name, myfolder);</span>
        vm_execute_sql_callback(profile, profile->mutex, sql, message_count_callback, &cbt);
<span style="color: #00A000">+        free(sql);</span>
        *total_new_messages = cbt.total_new_messages + cbt.total_new_urgent_messages;
        *total_new_urgent_messages = cbt.total_new_urgent_messages;
</pre></div>
<div class="highlight"><pre>committer: Anthony Minessale
comments:
3 regresions from this now, rolling it back
<span style="color: #000080; font-weight: bold">diff --git a/src/mod/applications/mod_voicemail/mod_voicemail.c b/src/mod/applications/mod_voicemail/mod_voicemail.c</span>
<span style="color: #000080; font-weight: bold">index bea8214..80b011e 100644</span>
<span style="color: #A00000">--- a/src/mod/applications/mod_voicemail/mod_voicemail.c</span>
<span style="color: #00A000">+++ b/src/mod/applications/mod_voicemail/mod_voicemail.c</span>
<span style="color: #800080; font-weight: bold">@@ -1277,13 +1277,9 @@ static void message_count(vm_profile_t *profile, const char *id_in, const char *</span>
        myid = resolve_id(id_in, domain_name, "message-count");
<span style="color: #A00000">-        switch_snprintf(sql, sizeof(sql), "select 1, read_flags, count(read_epoch) from voicemail_msgs where "</span>
<span style="color: #A00000">-                                        "username='%s' and domain='%s' and in_folder='%s' "</span>
<span style="color: #A00000">-                                        "and read_epoch=0 group by read_flags union select 0, read_flags, count(read_epoch) from voicemail_msgs where username='%s' "</span>
<span style="color: #A00000">-                                        "and domain='%s' and in_folder='%s' and read_epoch<>0 group by read_flags;", </span>
<span style="color: #A00000">-                                        myid, domain_name, myfolder, myid, domain_name, myfolder);</span>
<span style="color: #A00000">-                                        </span>
<span style="color: #A00000">-                                 </span>
<span style="color: #00A000">+        switch_snprintf(sql, sizeof(sql),</span>
<span style="color: #00A000">+                                        "select read_epoch=0, read_flags, count(read_epoch) from voicemail_msgs where username='%s' and domain='%s' and in_folder='%s' group by read_epoch=0,read_flags;",</span>
<span style="color: #00A000">+                                        myid, domain_name, myfolder);</span>
        vm_execute_sql_callback(profile, profile->mutex, sql, message_count_callback, &cbt);
</pre></div>
<div class="highlight"><pre>committer: cypromis
comments:
Merge branch 'master' of ssh://git.freeswitch.org/freeswitch
</pre></div>
<div class="highlight"><pre>committer: cypromis
comments:
Merge remote branch 'origin/master'
</pre></div>
<div class="highlight"><pre>committer: cypromis
comments:
antoher try at c options to make iksemel right on solaris
<span style="color: #000080; font-weight: bold">diff --git a/libs/iksemel/configure.ac b/libs/iksemel/configure.ac</span>
<span style="color: #000080; font-weight: bold">index 49d8621..403725a 100644</span>
<span style="color: #A00000">--- a/libs/iksemel/configure.ac</span>
<span style="color: #00A000">+++ b/libs/iksemel/configure.ac</span>
<span style="color: #800080; font-weight: bold">@@ -83,12 +83,12 @@ AC_ARG_ENABLE(64,</span>
if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then
if test "${enable_64}" = "yes"; then
<span style="color: #A00000">- CFLAGS="$CFLAGS -xc99=all -mt -m64 -lgpg-error"</span>
<span style="color: #A00000">- CXXFLAGS="$CXXFLAGS -xc99=all -mt -m64 -lgpg-error"</span>
<span style="color: #00A000">+ CFLAGS="$CFLAGS -mt -m64 -lgpg-error"</span>
<span style="color: #00A000">+ CXXFLAGS="$CXXFLAGS -mt -m64 -lgpg-error"</span>
        SUNFLAGS="-xc99=all -mt -m64 -lgpg-error"
else
<span style="color: #A00000">-        CFLAGS="$CFLAGS -xc99=all -mt -lgpg-error"</span>
<span style="color: #A00000">-        CXXFLAGS="$CXXFLAGS -xc99=all -mt -lgpg-error"</span>
<span style="color: #00A000">+        CFLAGS="$CFLAGS -mt -lgpg-error"</span>
<span style="color: #00A000">+        CXXFLAGS="$CXXFLAGS -mt -lgpg-error"</span>
        SUNFLAGS="-xc99=all -mt -lgpg-error"
fi
fi
</pre></div>
========================================================================<pre>
Summary of changes:
conf/autoload_configs/switch.conf.xml | 2 +-
libs/freetdm/mod_freetdm/mod_freetdm.c | 16 +--
libs/freetdm/src/ftdm_io.c | 50 +++++++--
libs/freetdm/src/ftmod/ftmod_r2/ftmod_r2.c | 28 +++--
.../ftmod_sangoma_isdn/ftmod_sangoma_isdn_cfg.c | 2 +
.../ftmod_sangoma_isdn_stack_cfg.c | 38 ++++---
.../ftmod_sangoma_ss7/ftmod_sangoma_ss7_cfg.c | 22 +---
.../ftmod_sangoma_ss7/ftmod_sangoma_ss7_cli.c | 4 +-
.../ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.c | 17 +++
.../ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.h | 6 +
.../ftmod_sangoma_ss7/ftmod_sangoma_ss7_xml.c | 125 ++++++++++++--------
libs/freetdm/src/include/private/ftdm_core.h | 3 -
libs/iksemel/configure.ac | 8 +-
.../applications/mod_conference/mod_conference.c | 45 +++++---
src/mod/applications/mod_dptools/mod_dptools.c | 2 +
src/mod/applications/mod_voicemail/mod_voicemail.c | 26 +++--
src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c | 2 +-
src/mod/endpoints/mod_sofia/mod_sofia.c | 6 +-
18 files changed, 244 insertions(+), 158 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>