[asterisk-dev] [Code Review] SIP: session timer behavior in Asterisk

CDR venefax at gmail.com
Sun Aug 29 13:44:54 CDT 2010


I support these changes. In fact, just had a big issue with a major carrier
because of the "require Timer" feature. Please remove it from the INVITE
when the timer fires.
F.Alves

On Thu, Aug 26, 2010 at 3:06 PM, David Vossel <dvossel at digium.com> wrote:

>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/879/
> -----------------------------------------------------------
>
> Review request for Asterisk Developers.
>
>
> Summary
> -------
>
> This is a simple patch.  This review is more to verify my expectations of
> how Session Timers are supposed to work are sane.
>
> CHANGES:
> 1. Never put "timer" in "Require" header.  This is not to our benefit and
> RFC 4028 section 7.1 even warns against it.  It is possible for one endpoint
> to perform session-timer refreshes while the other endpoint does not support
> them.  If in this case the end point performing the refreshing puts "timer"
> in the Require field during a refresh, the dialog will likely get terminated
> by the other end.
>
> 2. Change the behavior of 'session-timer=accept' in sip.conf (which is the
> default behavior of Asterisk with no session timer configuration specified)
> to only run session-timers as result of an incoming INVITE request if the
> INVITE contains an "Session-Expires" header... Asterisk is currently
> treating having the "timer" option in the "Supported" header as a request
> for session timers by the UAC.  I do not agree with this.  Session timers
> should only be negotiated in "accept" mode when the incoming INVITE supplies
> a "Session-Expires" header, otherwise RFC 4028 says we should treat a
> request containing no "Session-Expires" header as a session with no
> expiration.
>
> Below I have outlined some situations and what I would Asterisk's behavior
> to be.  The table reflects the behavior changes implemented by this patch.
>
> SITUATIONS:
> -Asterisk as UAS
> 1. Incoming INVITE: NO  "Session-Expires"
> 2. Incoming INVITE: HAS "Session-Expires"
>
> -Asterisk as UAC
> 3. Outgoing INVITE: NO  "Session-Expires". 200 Ok Response HAS
> "Session-Expires" header
> 4. Outgoing INVITE: NO  "Session-Expires". 200 Ok Response NO
>  "Session-Expires" header
> 5. Outgoing INVITE: HAS "Session-Expires".
>
> Active   - Asterisk will have an active refresh timer regardless if the
> other endpoint does.
> Inactive - Asterisk does not have an active refresh timer regardless if the
> other endpoint does.
> XXXXXXX  - Not possible for mode.
> ______________________________________
> |SITUATIONS | 'session-timer' MODES  |
> |___________|________________________|
> |           | originate  |  accept   |
> |-----------|------------|-----------|
> |1.         |   Active   | Inactive  |
> |2.         |   Active   |  Active   |
> |3.         | XXXXXXXX   | Active    |
> |4.         | XXXXXXXX   | Inactive  |
> |5.         |   Active   | XXXXXXXX  |
> --------------------------------------
>
>
> This addresses bug 17005.
>    https://issues.asterisk.org/view.php?id=17005
>
>
> Diffs
> -----
>
>  /branches/1.8/channels/chan_sip.c 283768
>
> Diff: https://reviewboard.asterisk.org/r/879/diff
>
>
> Testing
> -------
>
>
> Thanks,
>
> David
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20100829/57d4a795/attachment.htm 


More information about the asterisk-dev mailing list