<h1>Project "FreeSWITCH Source" received a push.</h1>
<h2>branch: master updated</h2>
<pre>
via: 46215605f42bf534ab040e63b9bd84a6c34c3e05 (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: 0e841a5f14810514ee60562481c405d7fb560e72 (commit)
via: a93623618b83fb08f2a0a728800f431856b29f92 (commit)
from: 361178089943c14bb3f842d7ff5cd8950cbe2493 (commit)
</pre>= COMMIT LOG ===========================================================
<div class="highlight"><pre>committer: Moises Silva
comments:
Merge remote branch 'fsorig/master'
</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: 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>
========================================================================<pre>
Summary of changes:
conf/autoload_configs/switch.conf.xml | 2 +-
libs/freetdm/src/ftdm_io.c | 48 ++++++++++++++++----
.../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 ++-
7 files changed, 94 insertions(+), 37 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>