<div dir="ltr">Thank you so much for your reply . I had solved my problem earlier . <div><br></div><div> But now I am facing a strange problem . I am trying to implement the dynamic routing login in a machine which has two interface , one public and one private . </div><div><br></div><div>I have added listen as : listen=10.138.x.x:5508 AS 54.167.x.x:5508</div><div> First ip is the private ip and the second one is the public ip . </div><div><br></div><div> Now I have added a gateway in dr_gateways like bellow </div><div><br></div><div>| 4 | 4 | 4 | 162.241.x.x:5080 | 0 | NULL | NULL | 0 | 0 | NULL | inbound 1 |<br></div><div><br></div><div> And my opensips config is like bellow .</div><div><br></div><div> if (is_from_gw() )</div><div> {</div><div> xlog( "L_WARN", "from gateway do look up" );</div><div><br></div><div> xlog( "L_WARN", "Source IP : $si To Uri : $tu From : $fU Request URI: $oU Call ID:$ci" );</div><div> # alias_db_lookup("dbaliases");</div><div> if ( !lookup("location")){</div><div> sl_send_reply("404","NO Match Found");</div><div> xlog( "L_WARN", "Source IP : $si To Uri : $tu From : $fU Request URI: $oU Call ID:$ci: NO Match Found" );</div><div> exit;</div><div> }</div><div> #do lcr</div><div> if ( !serialize_branches(1)){</div><div> t_on_failure("redirect");</div><div> }else{</div><div> next_branches();</div><div> t_on_failure("3");</div><div> route(1);</div><div> exit;</div><div> }</div><div> }</div><div><br></div><div>But when I am dialing from the gateway IP , the call is not going through this loop its directly going to the routing logic .</div><div><br></div><div> I am getting bellow error .</div><div><br></div><div><div><b> request domain,54.167.x.x</b></div><div><b> WARNING:core:do_assign: no value in right expression on line 354</b></div><div><b> translated to <null></b></div><div><b> ERROR:drouting:do_routing: failed to get group id</b></div><div><b> do_routing: No rules matching the URI</b></div></div><div> </div><div> </div><div> The strange thing is . I have done the same setup in anothe rmachine which has one public interface . And the logic is running absolutely fine .</div><div><br></div><div> I am not getting where I am doing wrong in the case . I think its not able to recognize the incoming gateway ip . What else I should do to make this working . </div><div><br></div><div> Please help me . I have almost spent my entire day to resolve this but still I am not able to fix this .</div><div> </div><div> </div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><b><i>Thanks & Regards</i></b><div><i>Sasmita Panda</i></div><div><i>Network Testing and Software Engineer</i></div><div><i>3CLogic , ph:07827611765</i></div></div></div></div>
<br><div class="gmail_quote">On Tue, May 3, 2016 at 5:51 PM, Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<tt>Hi Sasmita,<br>
<br>
Take a look at the carrier flags definition (1.1.4.2):<br>
<a href="http://www.opensips.org/html/docs/modules/2.1.x/drouting.html#id293400" target="_blank">http://www.opensips.org/html/docs/modules/2.1.x/drouting.html#id293400</a><br>
</tt><br>
<tt>flags : 0x1 - use weight for sorting the list and not definition
order; 0x2 - use only the first gateway from the carrier
(depending on the sorting); 0x4 - disable the usage of this
carrier<br>
<br>
So, you need to have the flag 0x1 to do weight based selection
inside the carrier.<br>
<br>
Best regards,<br>
</tt>
<pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre><div><div class="h5">
<div>On 03.05.2016 10:57, Sasmita Panda
wrote:<br>
</div>
</div></div><blockquote type="cite"><div><div class="h5">
<div dir="ltr">Hi All ,
<div><br>
</div>
<div> I am using opensips-1.11 and seting up the dynamic
routing .</div>
<div>I wanted to randomly distribute the call between two
gateways .</div>
<div> </div>
<div> When I have added two gateways with weight 50%
each in the dr_carriers table and set flags=2 , it didnt
worked . </div>
<div><br>
</div>
<div> But when i just changed the flags=3 , it started
working , calls get distributed randomly between two gateways
. </div>
<div><br>
</div>
<div> Is there any dependency of the call distribution with
the flags parameter of dr_carriers table ?</div>
<div> <br clear="all">
<div>
<div>
<div dir="ltr"><b><i>Thanks & Regards</i></b>
<div><i>Sasmita Panda</i></div>
<div><i>Network Testing and Software Engineer</i></div>
<div><i>3CLogic , ph:07827611765</i></div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</div>
</blockquote></div><br></div>