[asterisk-dev] [Code Review] chan_sip: Make the session-timers 'require: timer' header an option

Kevin P. Fleming kpfleming at digium.com
Tue Jun 15 08:52:55 CDT 2010

On 06/15/2010 08:25 AM, Darren Sessions wrote:

> Modes:
> refuse:
>  Do not run session-timers in any case


> accept:
>  Run session-timers only when requested by other user agent.
>  Adds supported-header to inbound and outbound calls.


> originate:
>  Request and run session-timers if UA supports them.
>  Adds supported-header to inbound and outbound calls.


> require:
>  Basically the existing 'originate' mode.
>  Request and run session-timers always
>  Adds supported-header and require-header to inbound and outbound
> calls even if supported-header is not received.

Not quite. For an outbound call, adding 'timer' to the Require header is
sufficient, as the Supported header does need to have it listed if it is
in the Require header. For an inbound call, if 'timer' is not listed in
a Require or Supported header, then the call must be failed, as
session-timers will not be used (and the admin requires them). If
'timer' is listed in an incoming Require header, then nothing special
must be done. If 'timer' is listed in an incoming Supported header (but
not in Require), then the first response from Asterisk must include it
in a Require header (assuming that is allowed... I haven't checked the
RFC to see if the UAS can respond with a Require header that has values
that were not included in the UAC's Require header; if that is not
allowed, then Asterisk must respond with a Session-Expires header and
just hope that the other end will respect it... there is no way to force
the UAC to use session-timers on an incoming call in that case, except
by some possibly complex machinations).

Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
skype: kpfleming | jabber: kfleming at digium.com
Check us out at www.digium.com & www.asterisk.org

More information about the asterisk-dev mailing list