<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">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"></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">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"></a></div></div></div>