<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><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;"></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>
</span>
<p></p>
<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>
</body>
</html>