FS-4378 add sofia::error custom event
This commit is contained in:
parent
b9b4db7d40
commit
e79e6146c5
|
@ -90,6 +90,7 @@ typedef struct private_object private_object_t;
|
|||
#define MY_EVENT_RECOVERY "sofia::recovery_recv"
|
||||
#define MY_EVENT_RECOVERY_SEND "sofia::recovery_send"
|
||||
#define MY_EVENT_RECOVERY_RECOVERED "sofia::recovery_recovered"
|
||||
#define MY_EVENT_ERROR "sofia::error"
|
||||
|
||||
#define MULTICAST_EVENT "multicast::event"
|
||||
#define SOFIA_REPLACES_HEADER "_sofia_replaces_"
|
||||
|
|
|
@ -7316,6 +7316,16 @@ void sofia_handle_sip_i_refer(nua_t *nua, sofia_profile_t *profile, nua_handle_t
|
|||
switch_ivr_session_transfer(b_session, exten, NULL, NULL);
|
||||
switch_core_session_rwunlock(b_session);
|
||||
} else {
|
||||
switch_event_t *event;
|
||||
|
||||
if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, MY_EVENT_ERROR)) {
|
||||
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Error-Type", "attended_transfer");
|
||||
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Transfer-Exten", exten);
|
||||
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Full-Refer-To", full_ref_to);
|
||||
|
||||
switch_channel_event_set_data(channel, event);
|
||||
}
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Cannot Blind Transfer 1 Legged calls\n");
|
||||
switch_channel_set_variable(channel_a, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, "ATTENDED_TRANSFER_ERROR");
|
||||
nua_notify(tech_pvt->nh, NUTAG_NEWSUB(1), SIPTAG_CONTENT_TYPE_STR("message/sipfrag;version=2.0"),
|
||||
|
|
Loading…
Reference in New Issue