<h1>Project "FreeSWITCH Source" received a push.</h1>
<h2>branch: master updated</h2>
<pre>
via: 673678509f0f3ea0464ea45798c0cdbc4843946b (commit)
via: 10d696ebacedde5416e99f03911c928eea8889d1 (commit)
via: 43dd776c3616f3735bd8b73d965f81e9d16dab79 (commit)
via: fb66abfab4a74055c38cdc67da83e6e0175a4a0b (commit)
via: 93b85b5a4c8abff3be692288176a40fda5b13c3f (commit)
via: 6a524a1d567f9e73d10d14067212bda5f67b7ffb (commit)
via: d72cde9b76a856cf002366300bea02c26db44ffb (commit)
via: 2404dd295aa0b6ef2e9da1598a4b3d479ee6317f (commit)
via: 45b3adda57a9281d0dd4389884d2a42eebc7dbba (commit)
via: 52bf0423e2231e7e16126baa13b8fef14132ac57 (commit)
from: 45ec088753031fc60b1b1abeb25536b7ac042374 (commit)
</pre>= COMMIT LOG ===========================================================
<div class="highlight"><pre>committer: Leon de Rooij
comments:
Merge branch 'master' of ssh://git.freeswitch.org/freeswitch
</pre></div>
<div class="highlight"><pre>committer: Andrew Thompson
comments:
Added conference UUID to xml_list
<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 12b3193..961a140 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">@@ -3778,6 +3778,7 @@ static void conference_xlist(conference_obj_t *conference, switch_xml_t x_confer</span>
        switch_xml_set_attr_d(x_conference, "member-count", ival);
        switch_snprintf(i, sizeof(i), "%u", conference->rate);
        switch_xml_set_attr_d(x_conference, "rate", ival);
<span style="color: #00A000">+        switch_xml_set_attr_d(x_conference, "uuid", conference->uuid_str);</span>
        if (switch_test_flag(conference, CFLAG_LOCKED)) {
                switch_xml_set_attr_d(x_conference, "locked", "true");
</pre></div>
<div class="highlight"><pre>committer: Brian West
comments:
sigh
<span style="color: #000080; font-weight: bold">diff --git a/libs/openzap/mod_openzap/mod_openzap.c b/libs/openzap/mod_openzap/mod_openzap.c</span>
<span style="color: #000080; font-weight: bold">index 3e5227e..d52149c 100644</span>
<span style="color: #A00000">--- a/libs/openzap/mod_openzap/mod_openzap.c</span>
<span style="color: #00A000">+++ b/libs/openzap/mod_openzap/mod_openzap.c</span>
<span style="color: #800080; font-weight: bold">@@ -135,7 +135,9 @@ void dump_chan_xml(zap_span_t *span, uint32_t chan_id, switch_stream_handle_t *s</span>
static void zap_set_npi(const char *npi_string, uint8_t *target)
{
<span style="color: #A00000">-        if (!strcasecmp(npi_string, "isdn") || !strcasecmp(npi_string, "e164")) {</span>
<span style="color: #00A000">+        if (switch_is_number(npi_string)) {</span>
<span style="color: #00A000">+                *target = (uint8_t)atoi(npi_string);</span>
<span style="color: #00A000">+        } else if (!strcasecmp(npi_string, "isdn") || !strcasecmp(npi_string, "e164")) {</span>
                *target = ZAP_NPI_ISDN;
        } else if (!strcasecmp(npi_string, "data")) {
                *target = ZAP_NPI_DATA;
<span style="color: #800080; font-weight: bold">@@ -157,7 +159,9 @@ static void zap_set_npi(const char *npi_string, uint8_t *target)</span>
static void zap_set_ton(const char *ton_string, uint8_t *target)
{
<span style="color: #A00000">-        if (!strcasecmp(ton_string, "national")) {</span>
<span style="color: #00A000">+        if (switch_is_number(ton_string)) {</span>
<span style="color: #00A000">+                *target = (uint8_t)atoi(ton_string);</span>
<span style="color: #00A000">+        } else if (!strcasecmp(ton_string, "national")) {</span>
                *target = ZAP_TON_NATIONAL;
        } else if (!strcasecmp(ton_string, "international")) {
                *target = ZAP_TON_INTERNATIONAL;
<span style="color: #800080; font-weight: bold">@@ -1231,15 +1235,8 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi</span>
        }
        
        if ((var = switch_event_get_header(var_event, "openzap_outbound_ton")) || (var = switch_core_get_variable("openzap_outbound_ton"))) {
<span style="color: #A00000">-                if (!strcasecmp(var, "national")) {</span>
<span style="color: #A00000">-                        caller_data.ani.type = ZAP_TON_NATIONAL;</span>
<span style="color: #A00000">-                } else if (!strcasecmp(var, "international")) {</span>
<span style="color: #A00000">-                        caller_data.ani.type = ZAP_TON_INTERNATIONAL;</span>
<span style="color: #A00000">-                } else if (!strcasecmp(var, "local")) {</span>
<span style="color: #A00000">-                        caller_data.ani.type = ZAP_TON_SUBSCRIBER_NUMBER;</span>
<span style="color: #A00000">-                } else if (!strcasecmp(var, "unknown")) {</span>
<span style="color: #A00000">-                        caller_data.ani.type = ZAP_TON_UNKNOWN;</span>
<span style="color: #A00000">-                }</span>
<span style="color: #00A000">+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Setting TON to: %s\n", var);</span>
<span style="color: #00A000">+                zap_set_ton(var, &caller_data.ani.type);</span>
        } else {
                caller_data.ani.type = outbound_profile->destination_number_ton;
        }
<span style="color: #800080; font-weight: bold">@@ -1248,9 +1245,14 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi</span>
                zap_set_string((char *)caller_data.raw_data, var);
                caller_data.raw_data_len = strlen(var);
        }
<span style="color: #A00000">-</span>
<span style="color: #A00000">-        caller_data.ani.plan = outbound_profile->destination_number_numplan;</span>
<span style="color: #A00000">-</span>
<span style="color: #00A000">+        </span>
<span style="color: #00A000">+        if ((var = switch_event_get_header(var_event, "openzap_outbound_npi")) || (var = switch_core_get_variable("openzap_outbound_npi"))) {</span>
<span style="color: #00A000">+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Setting NPI to: %s\n", var);</span>
<span style="color: #00A000">+                zap_set_npi(var, &caller_data.ani.plan);</span>
<span style="color: #00A000">+        } else {</span>
<span style="color: #00A000">+                caller_data.ani.plan = outbound_profile->destination_number_numplan;</span>
<span style="color: #00A000">+        }</span>
<span style="color: #00A000">+        </span>
        /* blindly copy data from outbound_profile. They will be overwritten
         * by calling zap_caller_data if needed after */
        caller_data.cid_num.type = outbound_profile->caller_ton;
</pre></div>
<div class="highlight"><pre>committer: Anthony Minessale
comments:
more loopback improvements
<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 727de27..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">@@ -82,6 +82,7 @@ struct private_object {</span>
        int32_t bowout_frame_count;
        char *other_uuid;
        switch_queue_t *frame_queue;
<span style="color: #00A000">+        int64_t packet_count;</span>
};
typedef struct private_object private_t;
<span style="color: #800080; font-weight: bold">@@ -577,40 +578,22 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch</span>
                if (tech_pvt->write_frame) {
                        switch_frame_free(&tech_pvt->write_frame);
                }
<span style="color: #A00000">-</span>
<span style="color: #00A000">+                </span>
                tech_pvt->write_frame = (switch_frame_t *) pop;
                tech_pvt->write_frame->codec = &tech_pvt->read_codec;
                *frame = tech_pvt->write_frame;
<span style="color: #00A000">+                tech_pvt->packet_count++;</span>
<span style="color: #00A000">+                switch_clear_flag_locked(tech_pvt, TFLAG_CNG);</span>
<span style="color: #00A000">+                switch_clear_flag(tech_pvt->write_frame, SFF_CNG);</span>
        } else {
                switch_set_flag(tech_pvt, TFLAG_CNG);
        }
        if (switch_test_flag(tech_pvt, TFLAG_CNG)) {
<span style="color: #A00000">-                unsigned char data[SWITCH_RECOMMENDED_BUFFER_SIZE];</span>
<span style="color: #A00000">-                uint32_t flag = 0;</span>
<span style="color: #A00000">-                switch_status_t encode_status;</span>
<span style="color: #A00000">-                uint32_t rate = tech_pvt->read_codec.implementation->actual_samples_per_second;</span>
<span style="color: #A00000">-</span>
                *frame = &tech_pvt->cng_frame;
                tech_pvt->cng_frame.codec = &tech_pvt->read_codec;
                tech_pvt->cng_frame.datalen = tech_pvt->read_codec.implementation->decoded_bytes_per_packet;
<span style="color: #A00000">-</span>
<span style="color: #A00000">-                memset(tech_pvt->cng_frame.data, 0, tech_pvt->cng_frame.datalen);</span>
<span style="color: #A00000">-                memset(&data, 0, tech_pvt->read_codec.implementation->decoded_bytes_per_packet);</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-                if (strcasecmp(tech_pvt->read_codec.implementation->iananame, "L16")) {</span>
<span style="color: #A00000">-                        encode_status = switch_core_codec_encode(&tech_pvt->read_codec,</span>
<span style="color: #A00000">-                                                                                                         NULL,</span>
<span style="color: #A00000">-                                                                                                         data,</span>
<span style="color: #A00000">-                                                                                                         tech_pvt->read_codec.implementation->decoded_bytes_per_packet,</span>
<span style="color: #A00000">-                                                                                                         tech_pvt->read_codec.implementation->actual_samples_per_second,</span>
<span style="color: #A00000">-                                                                                                         tech_pvt->cng_frame.data, &tech_pvt->cng_frame.datalen, &rate, &flag);</span>
<span style="color: #A00000">-                        if (encode_status != SWITCH_STATUS_SUCCESS) {</span>
<span style="color: #A00000">-                                switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);</span>
<span style="color: #A00000">-                        }</span>
<span style="color: #A00000">-                } else {</span>
<span style="color: #A00000">-                        switch_set_flag((&tech_pvt->cng_frame), SFF_CNG);</span>
<span style="color: #A00000">-                }</span>
<span style="color: #00A000">+                switch_set_flag((&tech_pvt->cng_frame), SFF_CNG);</span>
                switch_clear_flag_locked(tech_pvt, TFLAG_CNG);
        }
</pre></div>
<div class="highlight"><pre>committer: David Yat Sin
comments:
Merge branch 'master' of git.freeswitch.org:freeswitch
</pre></div>
<div class="highlight"><pre>committer: David Yat Sin
comments:
chlog: freetdm: Fix for only checking first progress indicator for early-media flag
<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_hndl.c b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_hndl.c</span>
<span style="color: #000080; font-weight: bold">index 0b52011..578677a 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_hndl.c</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_hndl.c</span>
<span style="color: #800080; font-weight: bold">@@ -385,8 +385,12 @@ void sngisdn_process_cnst_ind (sngisdn_event_data_t *sngisdn_event)</span>
                                case FTDM_CHANNEL_STATE_DIALING:
                                case FTDM_CHANNEL_STATE_PROCEED:
                                case FTDM_CHANNEL_STATE_PROGRESS:
<span style="color: #A00000">-                                case FTDM_CHANNEL_STATE_RINGING:                                        </span>
<span style="color: #A00000">-                                        if (cnStEvnt->progInd.eh.pres && cnStEvnt->progInd.progDesc.val == IN_PD_IBAVAIL) {</span>
<span style="color: #00A000">+                                case FTDM_CHANNEL_STATE_RINGING:</span>
<span style="color: #00A000">+                                        if ((cnStEvnt->progInd.eh.pres && cnStEvnt->progInd.progDesc.val == IN_PD_IBAVAIL) ||</span>
<span style="color: #00A000">+                                                (cnStEvnt->progInd1.eh.pres && cnStEvnt->progInd1.progDesc.val == IN_PD_IBAVAIL) ||</span>
<span style="color: #00A000">+                                                (cnStEvnt->progInd2.eh.pres && cnStEvnt->progInd2.progDesc.val == IN_PD_IBAVAIL) ||</span>
<span style="color: #00A000">+                                                (cnStEvnt->progInd3.eh.pres && cnStEvnt->progInd3.progDesc.val == IN_PD_IBAVAIL)) {</span>
<span style="color: #00A000">+                                                </span>
                                                ftdm_log_chan_msg(ftdmchan, FTDM_LOG_DEBUG, "Early media available\n");
                                                sngisdn_set_flag(sngisdn_info, FLAG_MEDIA_READY);
                                        } else {
</pre></div>
<div class="highlight"><pre>committer: Anthony Minessale
comments:
only execute execute_on_[answer|media|ring] async when its expressed in app::arg form vs 'app arg form'
<span style="color: #000080; font-weight: bold">diff --git a/src/switch_channel.c b/src/switch_channel.c</span>
<span style="color: #000080; font-weight: bold">index de472a9..70b1879 100644</span>
<span style="color: #A00000">--- a/src/switch_channel.c</span>
<span style="color: #00A000">+++ b/src/switch_channel.c</span>
<span style="color: #800080; font-weight: bold">@@ -2595,14 +2595,15 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_mark_ring_ready_value(swi</span>
                if (var) {
                        char *arg = NULL;
                        app = switch_core_session_strdup(channel->session, var);
<span style="color: #A00000">-                        if ((arg = strchr(app, ' '))) {</span>
<span style="color: #A00000">-                                *arg++ = '\0';</span>
<span style="color: #A00000">-                        }</span>
<span style="color: #A00000">-                        if (switch_core_session_in_thread(channel->session)) {</span>
<span style="color: #A00000">-                                switch_core_session_execute_application(channel->session, app, arg);</span>
<span style="color: #A00000">-                        } else {</span>
<span style="color: #00A000">+                        if (strstr(app, "::")) {</span>
                                switch_core_session_execute_application_async(channel->session, app, arg);
<span style="color: #00A000">+                        } else {</span>
<span style="color: #00A000">+                                if ((arg = strchr(app, ' '))) {</span>
<span style="color: #00A000">+                                        *arg++ = '\0';</span>
<span style="color: #00A000">+                                }</span>
<span style="color: #00A000">+                                </span>
<span style="color: #00A000">+                                switch_core_session_execute_application(channel->session, app, arg);</span>
                        }
                }
<span style="color: #800080; font-weight: bold">@@ -2653,14 +2654,16 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_mark_pre_answered(switch_</span>
                         (var = switch_channel_get_variable(channel, SWITCH_CHANNEL_EXECUTE_ON_MEDIA_VARIABLE))) && !zstr(var)) {
                        char *arg = NULL;
                        app = switch_core_session_strdup(channel->session, var);
<span style="color: #A00000">-                        if ((arg = strchr(app, ' '))) {</span>
<span style="color: #A00000">-                                *arg++ = '\0';</span>
<span style="color: #A00000">-                        }</span>
<span style="color: #A00000">-                        if (switch_core_session_in_thread(channel->session)) {</span>
<span style="color: #A00000">-                                switch_core_session_execute_application(channel->session, app, arg);</span>
<span style="color: #A00000">-                        } else {</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                        if (strstr(app, "::")) {</span>
                                switch_core_session_execute_application_async(channel->session, app, arg);
<span style="color: #00A000">+                        } else {</span>
<span style="color: #00A000">+                                if ((arg = strchr(app, ' '))) {</span>
<span style="color: #00A000">+                                        *arg++ = '\0';</span>
<span style="color: #00A000">+                                }</span>
<span style="color: #00A000">+                                </span>
<span style="color: #00A000">+                                switch_core_session_execute_application(channel->session, app, arg);</span>
                        }
                }
<span style="color: #800080; font-weight: bold">@@ -2825,27 +2828,17 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_mark_answered(switch_chan</span>
                 (!switch_channel_test_flag(channel, CF_EARLY_MEDIA) && (var = switch_channel_get_variable(channel, SWITCH_CHANNEL_EXECUTE_ON_MEDIA_VARIABLE))))
                && !zstr(var)) {
                char *arg = NULL;
<span style="color: #A00000">-                char *colon = NULL;</span>
                app = switch_core_session_strdup(channel->session, var);
<span style="color: #A00000">-                arg = strchr(app, ' ');</span>
<span style="color: #A00000">-                colon = strchr(app, ':');</span>
<span style="color: #A00000">-                if (colon && (!arg || arg > colon) && *(colon + 1) == ':') {</span>
<span style="color: #A00000">-                        switch_log_printf(SWITCH_CHANNEL_CHANNEL_LOG(channel), SWITCH_LOG_DEBUG, "%s execute on answer: %s (BROADCAST)\n", channel->name, app);</span>
<span style="color: #A00000">-                        switch_ivr_broadcast(switch_core_session_get_uuid(channel->session), app, SMF_NONE);</span>
<span style="color: #00A000">+                if (strstr(app, "::")) {</span>
<span style="color: #00A000">+                        switch_core_session_execute_application_async(channel->session, app, arg);</span>
                } else {
<span style="color: #A00000">-                        if (arg) {</span>
<span style="color: #00A000">+                        if ((arg = strchr(app, ' '))) {</span>
                                *arg++ = '\0';
                        }
<span style="color: #A00000">-                        switch_log_printf(SWITCH_CHANNEL_CHANNEL_LOG(channel), SWITCH_LOG_DEBUG, "%s execute on answer: %s(%s)\n", channel->name, app,</span>
<span style="color: #A00000">-                                                         switch_str_nil(arg));</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-                        if (switch_core_session_in_thread(channel->session)) {</span>
<span style="color: #A00000">-                                switch_core_session_execute_application(channel->session, app, arg);</span>
<span style="color: #A00000">-                        } else {</span>
<span style="color: #A00000">-                                switch_core_session_execute_application_async(channel->session, app, arg);</span>
<span style="color: #A00000">-                        }</span>
<span style="color: #00A000">+                        </span>
<span style="color: #00A000">+                        switch_core_session_execute_application(channel->session, app, arg);</span>
                }
        }
</pre></div>
<div class="highlight"><pre>committer: Anthony Minessale
comments:
try another approach to previous mod_loopback fix ... FS-3011
<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 f875f6b..727de27 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">@@ -608,9 +608,9 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch</span>
                        if (encode_status != SWITCH_STATUS_SUCCESS) {
                                switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
                        }
<span style="color: #A00000">-</span>
<span style="color: #00A000">+                } else {</span>
<span style="color: #00A000">+                        switch_set_flag((&tech_pvt->cng_frame), SFF_CNG);</span>
                }
<span style="color: #A00000">-                //switch_set_flag((&tech_pvt->cng_frame), SFF_CNG);</span>
                switch_clear_flag_locked(tech_pvt, TFLAG_CNG);
        }
<span style="color: #800080; font-weight: bold">@@ -642,7 +642,10 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc</span>
        tech_pvt = switch_core_session_get_private(session);
        switch_assert(tech_pvt != NULL);
<span style="color: #A00000">-        if (switch_test_flag(frame, SFF_CNG) || switch_test_flag(tech_pvt, TFLAG_CNG) || (switch_test_flag(tech_pvt, TFLAG_BOWOUT) && switch_test_flag(tech_pvt, TFLAG_BOWOUT_USED))) {</span>
<span style="color: #00A000">+        if (switch_test_flag(frame, SFF_CNG) || </span>
<span style="color: #00A000">+                switch_test_flag(tech_pvt, TFLAG_CNG) || (switch_test_flag(tech_pvt, TFLAG_BOWOUT) && switch_test_flag(tech_pvt, TFLAG_BOWOUT_USED))) {</span>
<span style="color: #00A000">+                switch_core_timer_sync(&tech_pvt->timer);</span>
<span style="color: #00A000">+                switch_core_timer_sync(&tech_pvt->other_tech_pvt->timer);</span>
                return SWITCH_STATUS_SUCCESS;
        }
</pre></div>
<div class="highlight"><pre>committer: Anthony Minessale
comments:
revert 02d1af647bac6b937de02608d53ea1831f51b968
<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 aa57668..f875f6b 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">@@ -77,11 +77,11 @@ struct private_object {</span>
        switch_frame_t cng_frame;
        unsigned char cng_databuf[SWITCH_RECOMMENDED_BUFFER_SIZE];
<span style="color: #00A000">+        switch_timer_t timer;</span>
        switch_caller_profile_t *caller_profile;
        int32_t bowout_frame_count;
        char *other_uuid;
        switch_queue_t *frame_queue;
<span style="color: #A00000">-        switch_codec_implementation_t read_impl;</span>
};
typedef struct private_object private_t;
<span style="color: #800080; font-weight: bold">@@ -111,6 +111,7 @@ static switch_status_t tech_init(private_t *tech_pvt, switch_core_session_t *ses</span>
        int interval = 20;
        switch_status_t status = SWITCH_STATUS_SUCCESS;
        switch_channel_t *channel = switch_core_session_get_channel(session);
<span style="color: #00A000">+        const switch_codec_implementation_t *read_impl;</span>
        if (codec) {
                iananame = codec->implementation->iananame;
<span style="color: #800080; font-weight: bold">@@ -165,7 +166,15 @@ static switch_status_t tech_init(private_t *tech_pvt, switch_core_session_t *ses</span>
        switch_core_session_set_read_codec(session, &tech_pvt->read_codec);
        switch_core_session_set_write_codec(session, &tech_pvt->write_codec);
<span style="color: #A00000">-        tech_pvt->read_impl = *tech_pvt->read_codec.implementation;</span>
<span style="color: #00A000">+        if (tech_pvt->flag_mutex) {</span>
<span style="color: #00A000">+                switch_core_timer_destroy(&tech_pvt->timer);</span>
<span style="color: #00A000">+        }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        read_impl = tech_pvt->read_codec.implementation;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        switch_core_timer_init(&tech_pvt->timer, "soft",</span>
<span style="color: #00A000">+                                                 read_impl->microseconds_per_packet / 1000, read_impl->samples_per_packet * 4, switch_core_session_get_pool(session));</span>
<span style="color: #00A000">+</span>
        if (!tech_pvt->flag_mutex) {
                switch_mutex_init(&tech_pvt->flag_mutex, SWITCH_MUTEX_NESTED, switch_core_session_get_pool(session));
<span style="color: #800080; font-weight: bold">@@ -367,6 +376,7 @@ static switch_status_t channel_on_destroy(switch_core_session_t *session)</span>
        tech_pvt = switch_core_session_get_private(session);
        if (tech_pvt) {
<span style="color: #00A000">+                switch_core_timer_destroy(&tech_pvt->timer);</span>
                if (switch_core_codec_ready(&tech_pvt->read_codec)) {
                        switch_core_codec_destroy(&tech_pvt->read_codec);
<span style="color: #800080; font-weight: bold">@@ -558,10 +568,12 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch</span>
                goto end;
        }
<span style="color: #A00000">-        mutex = tech_pvt->mutex;</span>
<span style="color: #00A000">+        switch_core_timer_next(&tech_pvt->timer);</span>
<span style="color: #00A000">+        mutex = tech_pvt->mutex;</span>
<span style="color: #00A000">+        switch_mutex_lock(mutex);</span>
<span style="color: #A00000">-        if (switch_queue_pop_timeout(tech_pvt->frame_queue, &pop, tech_pvt->read_impl.microseconds_per_packet) == SWITCH_STATUS_SUCCESS && pop) {</span>
<span style="color: #00A000">+        if (switch_queue_trypop(tech_pvt->frame_queue, &pop) == SWITCH_STATUS_SUCCESS && pop) {</span>
                if (tech_pvt->write_frame) {
                        switch_frame_free(&tech_pvt->write_frame);
                }
<span style="color: #800080; font-weight: bold">@@ -573,8 +585,6 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch</span>
                switch_set_flag(tech_pvt, TFLAG_CNG);
        }
<span style="color: #A00000">-        switch_mutex_lock(mutex);</span>
<span style="color: #A00000">-</span>
        if (switch_test_flag(tech_pvt, TFLAG_CNG)) {
                unsigned char data[SWITCH_RECOMMENDED_BUFFER_SIZE];
                uint32_t flag = 0;
<span style="color: #800080; font-weight: bold">@@ -765,6 +775,8 @@ static switch_status_t channel_receive_message(switch_core_session_t *session, s</span>
                                switch_frame_free(&frame);
                        }
<span style="color: #00A000">+                        switch_core_timer_sync(&tech_pvt->timer);</span>
<span style="color: #00A000">+</span>
                }
                break;
        default:
</pre></div>
<div class="highlight"><pre>committer: Anthony Minessale
comments:
try to fix SOA problem with early and answer audio with dissimilar sdp
<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 6c91ce1..8bceb3b 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">@@ -707,11 +707,20 @@ static switch_status_t sofia_answer_channel(switch_core_session_t *session)</span>
                cid = generate_pai_str(tech_pvt);
<span style="color: #A00000">-                if (switch_channel_test_flag(tech_pvt->channel, CF_PROXY_MODE) && tech_pvt->early_sdp && strcmp(tech_pvt->early_sdp, tech_pvt->local_sdp_str)) {</span>
<span style="color: #A00000">-                        /* The SIP RFC for SOA forbids sending a 183 with one sdp then a 200 with another but it won't do us much good unless </span>
<span style="color: #A00000">-                         we do so in this case we will abandon the SOA rules and go rogue.</span>
<span style="color: #A00000">-                         */</span>
<span style="color: #A00000">-                        sofia_clear_flag(tech_pvt, TFLAG_ENABLE_SOA);</span>
<span style="color: #00A000">+                if (switch_channel_test_flag(tech_pvt->channel, CF_PROXY_MODE) && tech_pvt->early_sdp) {</span>
<span style="color: #00A000">+                        char *a, *b;</span>
<span style="color: #00A000">+                        </span>
<span style="color: #00A000">+                        /* start at the s= line to avoid some devices who update the o= between messages */</span>
<span style="color: #00A000">+                        a = strstr(tech_pvt->early_sdp, "s=");</span>
<span style="color: #00A000">+                        b = strstr(tech_pvt->local_sdp_str, "s=");</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                        if (!a || !b || strcmp(a, b)) {</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                                /* The SIP RFC for SOA forbids sending a 183 with one sdp then a 200 with another but it won't do us much good unless </span>
<span style="color: #00A000">+                                 we do so in this case we will abandon the SOA rules and go rogue.</span>
<span style="color: #00A000">+                                */</span>
<span style="color: #00A000">+                                sofia_clear_flag(tech_pvt, TFLAG_ENABLE_SOA);</span>
<span style="color: #00A000">+                        }</span>
                }
                if (sofia_use_soa(tech_pvt)) {
</pre></div>
========================================================================<pre>
Summary of changes:
.../ftmod_sangoma_isdn_stack_hndl.c | 8 ++-
libs/openzap/mod_openzap/mod_openzap.c | 30 ++++++-----
.../applications/mod_conference/mod_conference.c | 1 +
src/mod/endpoints/mod_loopback/mod_loopback.c | 58 ++++++++++----------
src/mod/endpoints/mod_sofia/mod_sofia.c | 19 +++++--
src/switch_channel.c | 47 +++++++---------
6 files changed, 85 insertions(+), 78 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>