[asterisk-bugs] [Asterisk 0015942]: Asterisk does not use the “expires=” from the SIP contact header during registration

Asterisk Bug Tracker noreply at bugs.digium.com
Sat Sep 26 21:38:30 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15942 
====================================================================== 
Reported By:                tpsast
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   15942
Category:                   Channels/chan_sip/Registration
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     acknowledged
Asterisk Version:           1.6.1.7-rc1 
JIRA:                        
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-09-22 20:36 CDT
Last Modified:              2009-09-26 21:38 CDT
====================================================================== 
Summary:                    Asterisk does not use the “expires=” from the
SIP contact header during registration
Description: 
When registering against a SIP provider, the reply from the registrar (SIP
200 OK message) includes an “expires =” in the SIP contact header, but
Asterisk always use the “defaultexpiry” value instead.

Example:
------------
Asterisk sends “Expires: 3600” when register, but if the registrar
replies with “expires=3170” in the contact header, then Asterisk always
scheduling for a reregistration in 3585 s. anyway, and therefore the
registration expires before Asterisk sends a reregister.

I have tested with Asterisk versions: 1.6.0.5, 1.6.0.3-rc1, 1.6.0.9,
1.6.1-beta4, 1.6.1.0, 1.6.1.1, 1.6.0.13, 1.6.1.4, 1.6.1.5, 1.6.1.6,
1.6.1.7-rc1 and SVN revision: 219891 (Asterisk SVN-branch-1.6.1-r219820).
The problem seems to exist in all above versions.

With Asterisk 1.6.2.0-beta3, beta4, rc1 and rc2 the registration doesn’t
work at all.
SIP/2.0 403 Forbidden 
(WARNING[3584]: chan_sip.c:17273 handle_response_register: Forbidden -
wrong password on authentication for REGISTER …)
;I will attach the debug output for the 1.6.2.0 registration problem in a
new issue!

Asterisk sip settings:
---------------------------
Global Signalling Settings:
----------------------------------
Reg. min duration: 60 secs
Reg. max duration: 4000 secs
Reg. default duration: 3600 secs

Register in sip.conf:
-------------------------
[sip-trunk]
type=peer
callbackextension=extension
defaultuser=xxxxxxxxxx
fromuser= xxxxxxxxxx
secret=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

====================================================================== 

---------------------------------------------------------------------- 
 (0111396) tpsast (reporter) - 2009-09-26 21:38
 https://issues.asterisk.org/view.php?id=15942#c111396 
---------------------------------------------------------------------- 
Some information from RFC3261:
------------------------------
"10.2.1.1 Setting the Expiration Interval of Contact Addresses

When a client sends a REGISTER request, it MAY suggest an expiration
interval that indicates how long the client would like the
registration to be valid. (As described in Section 10.3, the
registrar selects the actual time interval based on its local
policy.)

There are two ways in which a client can suggest an expiration
interval for a binding: through an Expires header field or an
"expires" Contact header parameter. The latter allows expiration
intervals to be suggested on a per-binding basis when more than one
binding is given in a single REGISTER request, whereas the former
suggests an expiration interval for all Contact header field values
that do not contain the "expires" parameter.

If neither mechanism for expressing a suggested expiration time is
present in a REGISTER, the client is indicating its desire for the
server to choose."

------------------------------------------------------------------ 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-09-26 21:38 tpsast         Note Added: 0111396                          
======================================================================




More information about the asterisk-bugs mailing list