mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 13:12:03 +00:00
FS-6462 --resolve
I found a problem here but it may not completely match your expectations. I reviewed the RFC 4028 and checked against the code and I discovered we should not be putting a Min-SE in any response at all besides a 422: section 5: The Min-SE header field MUST NOT be used in responses except for those with a 422 response code. It indicates the minimum value of the session interval that the server is willing to accept. I corrected this problem and implemented the 422 response so if you request a value lower than the minimum specified for the profile. If the value is equal or higher to the minimum, it will be reflected in the Session-Expires header in the response and no Min-SE will be present.
This commit is contained in:
@@ -4502,9 +4502,9 @@ session_timer_add_headers(struct session_timer *t,
|
||||
|
||||
sip_add_tl(msg, sip,
|
||||
TAG_IF(expires != 0, SIPTAG_SESSION_EXPIRES(x)),
|
||||
TAG_IF(min != 0
|
||||
TAG_IF((!uas || sip->sip_status->st_status == 422) && (min != 0
|
||||
/* Min-SE: 0 is optional with initial INVITE */
|
||||
|| !initial,
|
||||
|| !initial),
|
||||
SIPTAG_MIN_SE(min_se)),
|
||||
TAG_IF(autorequire && refresher == nua_remote_refresher && expires != 0, SIPTAG_REQUIRE_STR("timer")),
|
||||
TAG_END());
|
||||
|
||||
Reference in New Issue
Block a user