[Home]

Summary:ASTERISK-17084: Realtime expires IAX2 registration wrongly
Reporter:Birgit Arkesteijn (birgita)Labels:
Date Opened:2010-12-09 04:00:58.000-0600Date Closed:2011-06-07 14:05:27
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_iax2
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) chan_iax2.c_changed
( 1) lock_ipcentrex3.txt
Description:When our device registers over IAX2, Asterisk schedules for the registration to be expired. When our devices registers a next time (~60s later), the previous scheduled expiration kicks in soon after and deregisters our device.

****** ADDITIONAL INFORMATION ******

function update_registry():
When our devices registers over IAX2:
Asterisk will update the appropriate table (dynamic realtime).
In the same function it will schedule a call to expire the registry.
The expire time is just a bit later then our next registry.

The next time our device registers, the table is updated correctly (again).
However, shortly after that, the previous expire kicks in and basically deregisters the entry.

I can see the regseconds go to zero again.
When that happens, and I try to make a phonecall to the device, the call fails.


function realtime_peer():
It first gets the regseconds from realtime,
then compares the elapsed time with IAX_DEFAULT_REG_EXPIRE
and expires the entry, if elapsed.
That works as should, and I think that this is the way expire should work, by comparing the time.

Because of the above,
a) the database table is not reliable and
b) registration doesn't work well


When I don't use dynamic realtime for IAX, this expiry problem doesn't seem to happen. Then again, I could only try by ringing the device up and see what happens, since I cannot tell from the console.

I added debug statements to channels/chan_iax2.c,
ast_verb(15, "birgit ...
and captures the console output data. I'll try to upload the changed c file and the capture file.
Comments:By: Birgit Arkesteijn (birgita) 2010-12-09 04:27:28.000-0600

The attached files:
lock_ipcentrex3.txt : console capture
chan_iax2.c_changed : chan_iax2.c with additional debug statements. I renamed the file because I wasn't allowed to upload a .c file.

By: Leif Madsen (lmadsen) 2010-12-16 09:55:05.000-0600

I think this might be a configuration issue. Try using this:


;rtautoclear=yes        ; Auto-Expire friends created on the fly on the same schedule
                       ; as if it had just registered? (yes|no|<seconds>)
                       ; If set to yes, when the registration expires, the friend will
                       ; vanish from the configuration until requested again.
                       ; If set to an integer, friends expire within this number of
                       ; seconds instead of the registration interval.

By: Leif Madsen (lmadsen) 2011-01-19 09:31:08.000-0600

No response. Presume fixed by suggestion.