]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-4570 --resolve
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 29 Aug 2012 16:50:55 +0000 (11:50 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 29 Aug 2012 16:50:55 +0000 (11:50 -0500)
src/mod/endpoints/mod_sofia/sofia.c

index 63aa6c5379ca24d51bc6e8c8aef164fdc6a91283..58aba110767f6bac53d724de46b61a053702d685 100644 (file)
@@ -5701,8 +5701,10 @@ static void sofia_handle_sip_r_invite(switch_core_session_t *session, int status
                                                switch_t38_options_t *t38_options = sofia_glue_extract_t38_options(session, sip->sip_payload->pl_data);
                                                
                                                if (!t38_options) {
-                                                       switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_WARNING, "%s Error parsing SDP:\n%s\n",
-                                                                                         switch_channel_get_name(tech_pvt->channel), sip->sip_payload->pl_data);
+                                                       switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Could not parse T.38 options from sdp.\n");
+                                                       switch_channel_set_variable(channel, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, "T.38 NEGOTIATION ERROR");
+                                                       switch_channel_hangup(channel, SWITCH_CAUSE_INCOMPATIBLE_DESTINATION);
+                                                       switch_core_session_rwunlock(other_session);
                                                        goto end;
                                                } else {
                                                        char *remote_host = switch_rtp_get_remote_host(tech_pvt->rtp_session);
@@ -5735,15 +5737,7 @@ static void sofia_handle_sip_r_invite(switch_core_session_t *session, int status
                                                                }
                                                        }
 
-
-                                                       if (t38_options) {
-                                                               sofia_glue_copy_t38_options(t38_options, other_session);
-                                                       } else {
-                                                               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Could not parse T.38 options from sdp.\n");
-                                                               switch_channel_set_variable(channel, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, "T.38 NEGOTIATION ERROR");
-                                                               switch_channel_hangup(channel, SWITCH_CAUSE_INCOMPATIBLE_DESTINATION);
-                                                               goto end;
-                                                       }
+                                                       sofia_glue_copy_t38_options(t38_options, other_session);
                                                }
                                        }