]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-3640 try this patch, not sure what you are doing because I can recover 300 channel...
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 26 Oct 2011 14:00:59 +0000 (09:00 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 26 Oct 2011 14:00:59 +0000 (09:00 -0500)
src/mod/endpoints/mod_sofia/sofia_glue.c
src/switch_core_session.c

index cba2828376f9d1967b4ccbfede8fca0abb8fa124..c05cff06e4d89d7dd62ca806583ec976b7e6cf46 100644 (file)
@@ -1959,6 +1959,12 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
 
        caller_profile = switch_channel_get_caller_profile(channel);
 
+       if (!caller_profile) {
+               switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
+               return SWITCH_STATUS_FALSE;
+       }
+
+
        cid_name = caller_profile->caller_id_name;
        cid_num = caller_profile->caller_id_number;
        sofia_glue_tech_prepare_codecs(tech_pvt);
@@ -5368,7 +5374,7 @@ static int recover_callback(void *pArg, int argc, char **argv, char **columnName
                return 0;
 
        if (!(session = switch_core_session_request_xml(sofia_endpoint_interface, NULL, xml))) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "skipping non-bridged entry\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Invalid cdr data, call not recovered\n");
                return 0;
        }
 
index 46bffa7df5ac5231a454fb241c7889a1d1b748fd..a7ab9d8ddc72d1ced387dae8bf842648e005e759 100644 (file)
@@ -1748,6 +1748,13 @@ SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request_xml(switch_e
        }
 
 
+       if (!channel || !switch_channel_get_caller_profile(channel)) {
+               if (session) {
+                       switch_core_session_destroy(&session);
+               }
+       }
+
+
        return session;
 }