FS-3581 --resolve

This commit is contained in:
Anthony Minessale 2011-09-26 09:03:10 -05:00
parent 34827a892c
commit 28b380c8b5
2 changed files with 14 additions and 0 deletions

View File

@ -98,6 +98,7 @@ typedef struct private_object private_object_t;
#define SOFIA_SIP_RESPONSE_HEADER_PREFIX "sip_rh_"
#define SOFIA_SIP_RESPONSE_HEADER_PREFIX_T "~sip_rh_"
#define SOFIA_SIP_BYE_HEADER_PREFIX "sip_bye_h_"
#define SOFIA_SIP_BYE_HEADER_PREFIX_T "~sip_bye_h_"
#define SOFIA_SIP_PROGRESS_HEADER_PREFIX "sip_ph_"
#define SOFIA_SIP_PROGRESS_HEADER_PREFIX_T "~sip_ph_"
#define SOFIA_SIP_HEADER_PREFIX_T "~sip_h_"

View File

@ -506,6 +506,7 @@ void sofia_handle_sip_i_bye(switch_core_session_t *session, int status,
private_object_t *tech_pvt;
char *extra_headers;
const char *call_info = NULL;
const char *vval = NULL;
#ifdef MANUAL_BYE
int cause;
char st[80] = "";
@ -557,6 +558,18 @@ void sofia_handle_sip_i_bye(switch_core_session_t *session, int status,
extra_headers = sofia_glue_get_extra_headers(channel, SOFIA_SIP_BYE_HEADER_PREFIX);
sofia_glue_set_extra_headers(channel, sip, SOFIA_SIP_BYE_HEADER_PREFIX);
if (!(vval = switch_channel_get_variable(channel, "sip_copy_custom_headers")) || switch_true(vval)) {
switch_core_session_t *nsession = NULL;
switch_core_session_get_partner(session, &nsession);
if (nsession) {
switch_ivr_transfer_variable(session, nsession, SOFIA_SIP_BYE_HEADER_PREFIX_T);
switch_core_session_rwunlock(nsession);
}
}
switch_channel_hangup(channel, cause);
nua_respond(nh, SIP_200_OK, NUTAG_WITH_THIS_MSG(de->data->e_msg),
TAG_IF(call_info, SIPTAG_CALL_INFO_STR(call_info)), TAG_IF(!zstr(extra_headers), SIPTAG_HEADER_STR(extra_headers)), TAG_END());