<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><tt>Yes, lookup() will populate the attributes of each branch in
your "attr_avp", and you can access them through $T_branch_idx
within branch_route. [1]</tt></p>
<p><tt><br>
</tt></p>
<p><tt>[1]:
<a class="moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/2.3.x/registrar.html#id293909">http://www.opensips.org/html/docs/modules/2.3.x/registrar.html#id293909</a></tt><br>
</p>
<pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<div class="moz-cite-prefix">On 31.10.2016 16:08, Rodrigo Pimenta
Carvalho wrote:<br>
</div>
<blockquote
cite="mid:BN6PR02MB27213D45A3C83A9D81EF5327B5AE0@BN6PR02MB2721.namprd02.prod.outlook.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p><span><br>
</span></p>
<p><span>Hi.</span></p>
<p><span><br>
</span></p>
<p><span>In my project with OpenSIPS, I have the following kind
of code in the configuration:</span></p>
<p><span><br>
</span></p>
<p><span><span style="color: rgb(0, 111, 201); font-size: 10pt;">modparam("registrar",
"attr_avp", "$avp(attr)")</span><br>
</span></p>
<p><span style="color: rgb(0, 111, 201); font-size: 10pt;">.</span></p>
<p><span style="color: rgb(0, 111, 201); font-size: 10pt;">.</span></p>
<p><span style="color: rgb(0, 111, 201); font-size: 10pt;">.</span></p>
<p><span style="color: rgb(0, 111, 201); font-size: 10pt;">if
register request come from machine M1 {</span></p>
<p><span style="color: rgb(0, 111, 201); font-size: 10pt;"> <span><span
style="color: rgb(0, 111, 201); font-size: 10pt;">$avp(attr)
= "User in M1";</span></span> //this mean that the user
is behind a NAT, from the point of view OpenSIPS.<br>
</span></p>
<p><span style="color: rgb(0, 111, 201); font-size: 10pt;">}</span></p>
<p><span style="color: rgb(0, 111, 201); font-size: 10pt;"></span></p>
<p><span style="color: rgb(0, 111, 201); font-size: 10pt;">if
register request come from machine M2 {</span></p>
<p><span style="color: rgb(0, 111, 201); font-size: 10pt;"> <span><span
style="color: rgb(0, 111, 201); font-size: 10pt;">$avp(attr)
= "User in M2";</span></span>
<br>
</span></p>
<p><span style="color: rgb(0, 111, 201); font-size: 10pt;">}</span></p>
...<br>
<p><span style="color: rgb(0, 111, 201); font-size: 10pt;">else{</span></p>
<p><span style="color: rgb(0, 111, 201); font-size: 10pt;"> <span><span
style="color: rgb(0, 111, 201); font-size: 10pt;">$avp(attr)
= "User in Mx";</span></span> //this mean that there is
no NAT.<br>
</span></p>
<p><span style="color: rgb(0, 111, 201); font-size: 10pt;">}<br>
</span></p>
<p><span style="color: rgb(0, 111, 201); font-size: 10pt;"><br>
</span></p>
<br>
<p><span><br>
</span></p>
<p><span>In my opensips.cfg file I need read "<span>$(avp(attr)[$T_branch_idx])</span>"
in the
<span>"branch_route[per_branch_ops]"</span> .</span></p>
<p><span><br>
</span></p>
<p><span>Does <span><span>$(avp(attr)[$T_branch_idx])</span></span>
will give me the correct value, even if the callee is always
online in several machines (M1, M2...etc) ?<br>
</span></p>
<p><span><br>
</span></p>
<p><span>So, can I discover which machine is participating in
the dialog?</span></p>
<p><span><br>
</span></p>
<p><span>Best regards.</span><br>
</p>
<p><br>
</p>
<div id="Signature">
<div name="divtagdefaultwrapper"
style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:; margin:0">
<div class="BodyFragment"><font size="2">
<div class="PlainText">RODRIGO PIMENTA CARVALHO<br>
Inatel Competence Center<br>
Software<br>
Ph: +55 35 3471 9200 RAMAL 979<br>
</div>
</font></div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>