<div dir="ltr"><div><div>Thanks,<br>actually, I realized it was my mistake: <br>i was calling is_from_gw more than once but only used "i" on one place and so opensips was not always filling the AVP as it was not requested.<br>
</div><br></div>regards,<br>Takeshi<br><div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Aug 5, 2013 at 9:24 AM, Laszlo <span dir="ltr"><<a href="mailto:laszlo@voipfreak.net" target="_blank">laszlo@voipfreak.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><a href="http://openser.org/pipermail/users/2013-May/025705.html" target="_blank">http://openser.org/pipermail/users/2013-May/025705.html</a><br>
<br></div>maybe this can give you an idea......<br><br></div>-Laszlo<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/8/3 mayamatakeshi <span dir="ltr"><<a href="mailto:mayamatakeshi@gmail.com" target="_blank">mayamatakeshi@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div class="h5">
<div dir="ltr"><div>Hello, can anyone give me an example of how to call drouting function is_from_gw ?<br><div><br><a href="http://www.opensips.org/html/docs/modules/1.9.x/drouting.html#id293958" target="_blank">http://www.opensips.org/html/docs/modules/1.9.x/drouting.html#id293958</a><br>
<a href="http://www.opensips.org/html/docs/modules/devel/drouting.html#id294786" target="_blank"></a></div><br></div>The doc gives this example:<br><div> if (is_from_gw("3","1") <br></div><div>which seems to be incorrect as "1" is not a valid flag.<br>
<br></div><div>I am trying to use flag "i" to get the gwid in the AVP set using gw_id_avp but it is not working.<br>I already tried as:<br> if (is_from_gw("", "i"))<br>and<br> if (is_from_gw("0", "i"))<br>
</div><div><div>but it is not working: the avp set by avp_gw_id is no filled.<br>I know my configuration is correct because do_routing() does fill the avp.</div><br></div><div>Obs: the doc also says that if I don't care about the type of the gateway I can pass a negative number.<br>
</div><div>So I tried:<br> if (is_from_gw("-1", "i") <br></div><div>But then i get:<br>Aug 3 16:53:44 SERVER /usr/local/src/git/opensips-head/opensips[1454]: ERROR:core:fixup_uint: bad number <-1><br>
Aug 3 16:53:44 SERVER /usr/local/src/git/opensips-head/opensips[1454]: ERROR:core:fix_actions: fixing failed (code=-6) at cfg line 227<br>Aug 3 16:53:44 SERVER /usr/local/src/git/opensips-head/opensips[1454]: CRITICAL:core:fix_expr: fix_actions error<br>
Aug 3 16:53:44 SERVER /usr/local/src/git/opensips-head/opensips[1454]: ERROR:core:main: failed to fix configuration with err code -6<br><br></div><div><br><br>In case this is a bug, I tried with this git commit (head):<br>
<br>commit 70b6629f88e2e3fc51e42154b7db8fb7b94417a1<br>Author: Damien Sandras <<a href="mailto:dsandras@beip.be" target="_blank">dsandras@beip.be</a>><br>Date: Wed Jul 10 17:59:34 2013 +0200<br><br><br><br></div>
<div>regards,<br>
</div><div>Takeshi<br></div><div><div><a href="http://www.opensips.org/html/docs/modules/devel/drouting.html#id294786" target="_blank"></a></div></div></div>
<br></div></div>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div dir="ltr"><div><div><div><br>--<br></div>Kind regards,<br></div>Laszlo Bekesi<br></div><a href="http://voipfreak.net" target="_blank">http://voipfreak.net</a><br>
</div>
</font></span></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div></div></div></div></div>