mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 20:51:58 +00:00
Remove Contact header from BYE and CANCEL requests.
Per rfc3261 the Contact header is not applicable and MUST not appear in the request. FS-5868 #resolve
This commit is contained in:
@@ -465,6 +465,7 @@ switch_status_t sofia_on_hangup(switch_core_session_t *session)
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Sending BYE to %s\n", switch_channel_get_name(channel));
|
||||
if (!sofia_test_flag(tech_pvt, TFLAG_BYE)) {
|
||||
nua_bye(tech_pvt->nh,
|
||||
SIPTAG_CONTACT(SIP_NONE),
|
||||
TAG_IF(!zstr(reason), SIPTAG_REASON_STR(reason)),
|
||||
TAG_IF(call_info, SIPTAG_CALL_INFO_STR(call_info)),
|
||||
TAG_IF(!zstr(tech_pvt->user_via), SIPTAG_VIA_STR(tech_pvt->user_via)),
|
||||
@@ -478,6 +479,7 @@ switch_status_t sofia_on_hangup(switch_core_session_t *session)
|
||||
}
|
||||
if (!sofia_test_flag(tech_pvt, TFLAG_BYE)) {
|
||||
nua_cancel(tech_pvt->nh,
|
||||
SIPTAG_CONTACT(SIP_NONE),
|
||||
TAG_IF(call_info, SIPTAG_CALL_INFO_STR(call_info)),
|
||||
TAG_IF(!zstr(reason), SIPTAG_REASON_STR(reason)), TAG_IF(!zstr(bye_headers), SIPTAG_HEADER_STR(bye_headers)), TAG_END());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user