mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-13 15:50:59 +00:00
FS-3640 try this patch, not sure what you are doing because I can recover 300 channels fine. I added a patch to deal with what looks like corrupted data in the cdr or something so it should fail more gracefully
This commit is contained in:
parent
7b10506e78
commit
fd495dbbe1
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user