[OpenSIPS-Devel] [ opensips-Bugs-3610690 ] lookup can only be called once

SourceForge.net noreply at sourceforge.net
Fri Apr 19 14:00:14 CEST 2013


Bugs item #3610690, was opened at 2013-04-12 09:02
Message generated for change (Settings changed) made by bogdan_iancu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3610690&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: 1.8.x
>Status: Closed
Resolution: Invalid
Priority: 5
Private: No
Submitted By: https://www.google.com/accounts ()
Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: lookup can only be called once

Initial Comment:
If you have several contacts for the same user, and if you call lookup twice, then each request will be sent one time to the contact with the highest priority and twice to all other contacts.

If you call it three times, then t_relay will relay the same request three times to all contacts (except the first one).

Most probably opensips maintains an internal linked list with all branches and that list is not reset by lookup.

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

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2013-04-15 09:50

Message:
Hi,

This is not a bug, but rather a misusage of the lookup() function - the
function is all the time uploading the contacts for the AOR from RURI.
There is no intention (by design) to remove the existing branches -
actually I know cases where the script is relying on this behaviour.

If you call the lookup twice and you want no connection between the 2,
simply purge all existing branches before doing the second lookup :
     while ( remove_branch(0) ) {xlog("removing branch");}

Regards,
Bogdan

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3610690&group_id=232389



More information about the Devel mailing list