mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-22 20:04:52 +00:00
mod_xml_cdr: add force_process_cdr var to process b leg cdr on a case by case basis when b leg cdr is disabled (XML-17)
This commit is contained in:
parent
cac7d55580
commit
b1f9dc416d
@ -141,6 +141,7 @@ SWITCH_BEGIN_EXTERN_C
|
||||
#define SWITCH_API_HANGUP_HOOK_VARIABLE "api_hangup_hook"
|
||||
#define SWITCH_SESSION_IN_HANGUP_HOOK_VARIABLE "session_in_hangup_hook"
|
||||
#define SWITCH_PROCESS_CDR_VARIABLE "process_cdr"
|
||||
#define SWITCH_FORCE_PROCESS_CDR_VARIABLE "force_process_cdr"
|
||||
#define SWITCH_BRIDGE_CHANNEL_VARIABLE "bridge_channel"
|
||||
#define SWITCH_CHANNEL_NAME_VARIABLE "channel_name"
|
||||
#define SWITCH_BRIDGE_UUID_VARIABLE "bridge_uuid"
|
||||
|
@ -200,7 +200,10 @@ static switch_status_t my_on_reporting(switch_core_session_t *session)
|
||||
|
||||
is_b = channel && switch_channel_get_originator_caller_profile(channel);
|
||||
if (!globals.log_b && is_b) {
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
const char *force_cdr = switch_channel_get_variable(channel, SWITCH_FORCE_PROCESS_CDR_VARIABLE);
|
||||
if (!switch_true(force_cdr)) {
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
if (!is_b && globals.prefix_a)
|
||||
a_prefix = "a_";
|
||||
|
Loading…
x
Reference in New Issue
Block a user