[asterisk-bugs] [JIRA] (ASTERISK-25469) chan_sip enabled unnegotiated session-timers after reINVITE if session-minse is non-default.
Rusty Newton (JIRA)
noreply at issues.asterisk.org
Fri Oct 16 11:58:33 CDT 2015
[ https://issues.asterisk.org/jira/browse/ASTERISK-25469?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rusty Newton updated ASTERISK-25469:
------------------------------------
Summary: chan_sip enabled unnegotiated session-timers after reINVITE if session-minse is non-default. (was: chan_sip enabled unnegotiated session-timers after reinvite if minse is non-default.)
> chan_sip enabled unnegotiated session-timers after reINVITE if session-minse is non-default.
> --------------------------------------------------------------------------------------------
>
> Key: ASTERISK-25469
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-25469
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Channels/chan_sip/Interoperability
> Affects Versions: 11.20.0
> Reporter: Walter Doekes
> Attachments: iinv-o200-oinv-i200-oinv-i200-wait-obye.xml
>
>
> If I give Alice these two sip.conf settings:
> {noformat}
> session-minse=91
> session-expires=92
> {noformat}
> If Alice then gets called, and Alice initiates one or more reINVITEs, Asterisk enables session timers. In the 200 to the reINVITEs, Asterisk will add this:
> {noformat}
> Session-Expires: 92;refresher=uac
> {noformat}
> and then it expects reinvites from Alice.
> It seems plausible that the cause should be found here:
> {code}
> /* Add Session-Timers related headers */
> if (st_get_mode(p, 0) == SESSION_TIMER_MODE_ORIGINATE
> || (st_get_mode(p, 0) == SESSION_TIMER_MODE_ACCEPT
> && st_get_se(p, FALSE) != DEFAULT_MIN_SE)) {
> char i2astr[10];
> if (!p->stimer->st_interval) {
> p->stimer->st_interval = st_get_se(p, TRUE);
> }
> p->stimer->st_active = TRUE;
> if (st_get_mode(p, 0) == SESSION_TIMER_MODE_ORIGINATE) {
> snprintf(i2astr, sizeof(i2astr), "%d", p->stimer->st_interval);
> add_header(&req, "Session-Expires", i2astr);
> }
> snprintf(i2astr, sizeof(i2astr), "%d", st_get_se(p, FALSE));
> add_header(&req, "Min-SE", i2astr);
> }
> {code}
> Default mode is SESSION_TIMER_MODE_ACCEPT and the get_mins_se is non-standard, so Asterisk enables session timers.
> When the reINVITE is seen, we get here:
> {noformat}
> /* If this is an invite, add Session-Timers related headers if the feature is active for this session */
> if (p->method == SIP_INVITE && p->stimer && p->stimer->st_active == TRUE) {
> char se_hdr[256];
> snprintf(se_hdr, sizeof(se_hdr), "%d;refresher=%s", p->stimer->st_interval,
> p->stimer->st_ref == SESSION_TIMER_REFRESHER_US ? "uas" : "uac");
> add_header(resp, "Session-Expires", se_hdr);
> ...
> {noformat}
> The headers get added, and somewhere along the road, the timers get activated too.
> See attached SIPp scenario that trips on the bug.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list