mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 13:12:03 +00:00
add CALL_UPDATE event
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15119 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -1284,6 +1284,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
||||
if (!switch_strlen_zero(name)) {
|
||||
char message[256] = "";
|
||||
const char *ua = switch_channel_get_variable(tech_pvt->channel, "sip_user_agent");
|
||||
switch_event_t *event;
|
||||
|
||||
if (switch_strlen_zero(number)) {
|
||||
number = tech_pvt->caller_profile->destination_number;
|
||||
@@ -1303,6 +1304,22 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
||||
TAG_END());
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (switch_event_create(&event, SWITCH_EVENT_CALL_UPDATE) == SWITCH_STATUS_SUCCESS) {
|
||||
const char *uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE);
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Direction", "SEND");
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Callee-Name", name);
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Callee-Number", number);
|
||||
if (uuid) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Bridged-To", uuid);
|
||||
}
|
||||
switch_channel_event_set_data(channel, event);
|
||||
switch_event_fire(&event);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
switch_safe_free(arg);
|
||||
|
||||
Reference in New Issue
Block a user