add logical-direction to events
This commit is contained in:
parent
0d1b647197
commit
5456daa010
|
@ -314,6 +314,10 @@ SWITCH_DECLARE(void) switch_caller_profile_event_set_data(switch_caller_profile_
|
||||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, header_name, caller_profile->direction == SWITCH_CALL_DIRECTION_INBOUND ?
|
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, header_name, caller_profile->direction == SWITCH_CALL_DIRECTION_INBOUND ?
|
||||||
"inbound" : "outbound");
|
"inbound" : "outbound");
|
||||||
|
|
||||||
|
switch_snprintf(header_name, sizeof(header_name), "%s-Logical-Direction", prefix);
|
||||||
|
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, header_name, caller_profile->logical_direction == SWITCH_CALL_DIRECTION_INBOUND ?
|
||||||
|
"inbound" : "outbound");
|
||||||
|
|
||||||
if (!zstr(caller_profile->username)) {
|
if (!zstr(caller_profile->username)) {
|
||||||
switch_snprintf(header_name, sizeof(header_name), "%s-Username", prefix);
|
switch_snprintf(header_name, sizeof(header_name), "%s-Username", prefix);
|
||||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, header_name, caller_profile->username);
|
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, header_name, caller_profile->username);
|
||||||
|
|
Loading…
Reference in New Issue