<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=FR link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN>thanks for sharing</span><o:p></o:p></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>Alain<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:12.0pt;color:black'>De : </span></b><span style='font-size:12.0pt;color:black'>Users <users-bounces@lists.opensips.org> au nom de Babak Yakhchali <babak.freeswitch@gmail.com><br><b>Répondre à : </b>OpenSIPS users mailling list <users@lists.opensips.org><br><b>Date : </b>mardi 14 avril 2020 à 15:27<br><b>À : </b><users@lists.opensips.org><br><b>Objet : </b>Re: [OpenSIPS-Users] Forking call to more than one AOR<o:p></o:p></span></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>For anyone interested:<o:p></o:p></p><div><p class=MsoNormal>I used append_branch() two times to create 2 branches. then using <o:p></o:p></p></div><div><p class=MsoNormal>    $(branch(uri)[1]) = $avp(other_aor);<o:p></o:p></p></div><div><p class=MsoNormal>I set the second branch to go for other AOR, now calling lookup() like this:<o:p></o:p></p></div><div><p class=MsoNormal>    lookup("location","r")<o:p></o:p></p></div><div><p class=MsoNormal>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:<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>branch_route[per_branch_ops] {<o:p></o:p></p></div><div><div><p class=MsoNormal>   if($tU != $rU){<o:p></o:p></p></div><p class=MsoNormal>        uac_replace_to("","$avp(other_aor)");<br>   }<o:p></o:p></p></div><div><p class=MsoNormal>}<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>On Tue, Apr 14, 2020 at 12:46 PM Babak Yakhchali <<a href="mailto:babak.freeswitch@gmail.com">babak.freeswitch@gmail.com</a>> wrote:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><div><p class=MsoNormal>Hi<o:p></o:p></p><div><p class=MsoNormal>I'm trying to implement this scenario:<o:p></o:p></p></div><div><p class=MsoNormal>each user has two AORs. one for mobile and one for a userId (random string)<o:p></o:p></p></div><div><p class=MsoNormal>at any time user may be registered on one, both or none of these AORs<o:p></o:p></p></div><div><p class=MsoNormal>when a call comes to one of these AORs the other one must be called too (if there is a registered contact for it)<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>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<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>thanks<o:p></o:p></p></div></div></blockquote></div><p class=MsoNormal>_______________________________________________ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users <o:p></o:p></p></div></body></html>