<div dir="ltr">For anyone interested:<div>I used append_branch() two times to create 2 branches. then using </div><div> $(branch(uri)[1]) = $avp(other_aor);<br></div><div>I set the second branch to go for other AOR, now calling lookup() like this:</div><div> lookup("location","r")<br></div><div>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:</div><div><br></div><div>branch_route[per_branch_ops] {</div><div><div> if($tU != $rU){</div> uac_replace_to("","$avp(other_aor)");<br> }<div></div></div><div>}<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 14, 2020 at 12:46 PM Babak Yakhchali <<a href="mailto:babak.freeswitch@gmail.com">babak.freeswitch@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi<div>I'm trying to implement this scenario:</div><div>each user has two AORs. one for mobile and one for a userId (random string)</div><div>at any time user may be registered on one, both or none of these AORs</div><div>when a call comes to one of these AORs the other one must be called too (if there is a registered contact for it)</div><div><br></div><div>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</div><div><br></div><div>thanks</div></div>
</blockquote></div>