<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi Liviu.</p>
<p><br>
</p>
<p>Thank you.</p>
<p><br>
</p>
<p>That is the point I want to discuss!</p>
<p><br>
</p>
<p>According to the example from the documentation, the lookup() is in <br>
</p>
<p><br>
</p>
<p><span style="color: rgb(0, 111, 201); font-size: 10pt;">route[relay] {</span></p>
<p><span style="color: rgb(0, 111, 201); font-size: 10pt;">}</span></p>
<p><br>
</p>
<p>However, in my code the lookup() is in <br>
</p>
<p><br>
</p>
<p><span style="color: rgb(0, 111, 201); font-size: 10pt;">route{</span></p>
<p><br>
</p>
<p><span style="color: rgb(0, 111, 201); font-size: 10pt;">}</span></p>
<p><br>
</p>
<p>Even with lookup() in rout{...}, does it will populate the attributes of each branch in my &quot;attr_avp&quot; and I will be able to access them within branch_route?</p>
<p><br>
</p>
<p>Best regards!</p>
<p><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: &#43;55 35 3471 9200 RAMAL 979<br>
</div>
</font></div>
</div>
</div>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" color="#000000" face="Calibri, sans-serif"><b>De:</b> users-bounces@lists.opensips.org &lt;users-bounces@lists.opensips.org&gt; em nome de Liviu Chircu &lt;liviu@opensips.org&gt;<br>
<b>Enviado:</b> segunda-feira, 31 de outubro de 2016 12:26<br>
<b>Para:</b> users@lists.opensips.org<br>
<b>Assunto:</b> Re: [OpenSIPS-Users] Can I read &quot;$(avp(attr)[$T_branch_idx])&quot; in &quot;branch_route[per_branch_ops]&quot; ??</font>
<div>&nbsp;</div>
</div>
<div>
<p><tt>Yes, lookup() will populate the attributes of each branch in your &quot;attr_avp&quot;, and you can access them through $T_branch_idx within branch_route. [1]</tt></p>
<p><tt><br>
</tt></p>
<p><tt>[1]: <a previewremoved="true" id="LPlnk673395" 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 previewremoved="true" id="LPlnk23514" class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<div style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;" id="LPBorder_GT_14779177501770.4176527079792275">
<table style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);" id="LPContainer_14779177501740.07788236666153259" cellspacing="0">
<tbody>
<tr style="border-spacing: 0px;" valign="top">
<td colspan="2" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;" id="TextCell_14779177501750.36704414877467206">
<div id="LPRemovePreviewContainer_14779177501750.8872486186900457"></div>
<div style="top: 0px; color: rgb(0, 120, 215); font-weight: 400; font-size: 21px; font-family: &quot;wf_segoe-ui_light&quot;,&quot;Segoe UI Light&quot;,&quot;Segoe WP Light&quot;,&quot;Segoe UI&quot;,&quot;Segoe WP&quot;,Tahoma,Arial,sans-serif; line-height: 21px;" id="LPTitle_14779177501750.25142110983321775">
<a target="_blank" href="http://www.opensips-solutions.com/" style="text-decoration: none;" id="LPUrlAnchor_14779177501750.9938929203242014">Home &#8212; OpenSIPS Solutions</a></div>
<div style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: 400; font-family: &quot;wf_segoe-ui_normal&quot;,&quot;Segoe UI&quot;,&quot;Segoe WP&quot;,Tahoma,Arial,sans-serif; font-size: 14px; line-height: 14px;" id="LPMetadata_14779177501760.6030316058069972">
www.opensips-solutions.com</div>
<div style="display: block; color: rgb(102, 102, 102); font-weight: 400; font-family: &quot;wf_segoe-ui_normal&quot;,&quot;Segoe UI&quot;,&quot;Segoe WP&quot;,Tahoma,Arial,sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;" id="LPDescription_14779177501760.27815901110072105">
OpenSIPS is a mature Open Source implementation of a SIP server. OpenSIPS is more than a SIP proxy/router as it includes application-level functionalities.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="moz-cite-prefix">On 31.10.2016 16:08, Rodrigo Pimenta Carvalho wrote:<br>
</div>
<blockquote type="cite">
<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(&quot;registrar&quot;, &quot;attr_avp&quot;, &quot;$avp(attr)&quot;)</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">&nbsp;&nbsp; <span><span style="color:rgb(0,111,201); font-size:10pt">$avp(attr) = &quot;User in M1&quot;;</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">&nbsp;&nbsp; <span><span style="color:rgb(0,111,201); font-size:10pt">$avp(attr) = &quot;User in M2&quot;;</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">&nbsp; <span><span style="color:rgb(0,111,201); font-size:10pt">$avp(attr) = &quot;User in Mx&quot;;</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 &quot;<span>$(avp(attr)[$T_branch_idx])</span>&quot; in the
<span>&quot;branch_route[per_branch_ops]&quot;</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: &#43;55 35 3471 9200 RAMAL 979<br>
</div>
</font></div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset> <br>
<pre>_______________________________________________
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>
</div>
</div>
</div>
</body>
</html>