[OpenSIPS-Users] Forking call to more than one AOR

Bogdan-Andrei Iancu bogdan at opensips.org
Wed Apr 15 17:40:41 EST 2020


Hi Babak,

Yes, the 'r' flag in lookup() is the magic one here, but you do not have 
to use append_branch() 2 times before the lookup. Just set the first AOR 
into RURI and the second one have it appended as branch - this is all 
you need to do before the lookup().

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com

On 4/14/20 4:25 PM, Babak Yakhchali wrote:
> For anyone interested:
> I used append_branch() two times to create 2 branches. then using
>     $(branch(uri)[1]) = $avp(other_aor);
> I set the second branch to go for other AOR, now calling lookup() like 
> this:
>     lookup("location","r")
> will create all needed branches based on the 2 already created 
> branches and removes them from destination set. Till now invites are 
> generated for different contacts, BUT there is a problem with clients 
> registered with second contact, because To header is based on the 
> first AOR in ruri and they will not accept the invite message, to 
> solve this I used a branch route and changed the To header like this:
>
> branch_route[per_branch_ops] {
>    if($tU != $rU){
>         uac_replace_to("","$avp(other_aor)");
>    }
> }
>
>
> On Tue, Apr 14, 2020 at 12:46 PM Babak Yakhchali 
> <babak.freeswitch at gmail.com <mailto:babak.freeswitch at gmail.com>> wrote:
>
>     Hi
>     I'm trying to implement this scenario:
>     each user has two AORs. one for mobile and one for a userId
>     (random string)
>     at any time user may be registered on one, both or none of these AORs
>     when a call comes to one of these AORs the other one must be
>     called too (if there is a registered contact for it)
>
>     reading the documents I think I need to use
>     lookup("location","r"). but I don't know how should I add branches
>     before calling it for the two AORs
>
>     thanks
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20200415/4249565d/attachment.html>


More information about the Users mailing list