[asterisk-dev] [Code Review] handle_request_subscribe is too slow cause of iterating through all sip dialogs

Stefan Schmidt sst at sil.at
Fri Sep 3 14:40:36 CDT 2010


Am 03.09.2010 20:42, schrieb Russell Bryant:
> 
> 
>> On 2010-09-03 07:23:58, Russell Bryant wrote:
>>> Wow, I'm surprised this code was in there.  I agree - make it go away!
> 
> Actually, hold off on commit.  After talking to David Vossel about this, I think we need to get to the bottom of why this was put there in the first place to be sure it should be removed.  The code was added very intentionally in revision 7514:
> 
> r7513 | kpfleming | 2005-12-16 21:44:30 -0600 (Fri, 16 Dec 2005) | 2 lines
> 
> forcibly expire previous subscriptions from a peer when they resubscribe (keeps them from building up and waiting for expiration, and stops us sending unwanted NOTIFY messages to devices)
> 
> 
> - Russell
> 
> 
right time for your mail, i just have done the svn checkout, to patch
and commit it then.

i will wait ;)

the sentence in the () sounds to me like: lets hold the amount of sip
dialogs low and not send to much packets to not turn up the load.
even on an old system sending 100 notifys would be much faster than one
call of handle_request_subscribe with this ao2 iteration.

a phone shout drop a notify with wrong call-id but i am not sure if all
clients will react like this.


best regards

steve



More information about the asterisk-dev mailing list