[asterisk-dev] 'sip unregister devicename' device unavaiable 25/3600 seconds
Alec Davis
sivad.a at paradise.net.nz
Tue May 19 05:28:57 CDT 2009
The 3600 in the subject assumes a sip registration period of 60 minutes.
refer https://issues.asterisk.org/view.php?id=15118
The testing and reporting of the bug was done with a Grandstream BT100, but
it is no way a reflection on Grandstream.
The reported 25 seconds of available time is a combination of the 10 seconds
chan_sip adds to the requested expiry period, and the 15 seconds that
Grandstream re-Registers before the expire time.
For testing, I used a register expire period of 60 seconds. Configured
either in sip.conf as maxexpiry=60 in the [general] section or set the
phone's parameter.
The fault is that a stale expire_register schedule is left in the scheduler,
and expires 25 seconds after the device adds a new fresh expire schedule,
due to expire in 70 seconds...
If a device has a re-register time of 3600 seconds, the phone is unavailable
for 3575 seconds in every 3600.!!!
There are 2 patches:
1st targets the sip_unregister problem directly, its removes the current
active expire_register callback scheduled event.
The 2nd is more general and may be over kill, it removes if present the
event that called expire_register, most of the time it's already gone.
A last thought, sure the cause was buggy sip_unregister, but what about the
concept of instead of using ast_sched_add when the phone registers, use
ast_sched_replace, where it would replace an existing expire_register id, or
if not found, would add a new event.
Alec Davis.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20090519/3cb6e733/attachment.htm
More information about the asterisk-dev
mailing list