[OpenSIPS-Users] How to get is_from_gw to fill gw_id_avp

Laszlo laszlo at voipfreak.net
Mon Aug 5 02:24:41 CEST 2013


http://openser.org/pipermail/users/2013-May/025705.html

maybe this can give you an idea......

-Laszlo


2013/8/3 mayamatakeshi <mayamatakeshi at gmail.com>

> Hello, can anyone give me an example of how to call drouting function
> is_from_gw ?
>
> http://www.opensips.org/html/docs/modules/1.9.x/drouting.html#id293958
>  <http://www.opensips.org/html/docs/modules/devel/drouting.html#id294786>
>
> The doc gives this example:
>     if (is_from_gw("3","1")
> which seems to be incorrect as "1" is not a valid flag.
>
> I am trying to use flag "i" to get the gwid in the AVP set using gw_id_avp
> but it is not working.
> I already tried as:
>     if (is_from_gw("", "i"))
> and
>     if (is_from_gw("0", "i"))
> but it is not working: the avp set by avp_gw_id is no filled.
> I know my configuration is correct because do_routing() does fill the avp.
>
> Obs: the doc also says that if I don't care about the type of the gateway
> I can pass a negative number.
> So I tried:
>     if (is_from_gw("-1", "i")
> But then i get:
> Aug  3 16:53:44 SERVER /usr/local/src/git/opensips-head/opensips[1454]:
> ERROR:core:fixup_uint: bad number <-1>
> 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
> Aug  3 16:53:44 SERVER /usr/local/src/git/opensips-head/opensips[1454]:
> CRITICAL:core:fix_expr: fix_actions error
> 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
>
>
>
> In case this is a bug, I tried with this git commit (head):
>
> commit 70b6629f88e2e3fc51e42154b7db8fb7b94417a1
> Author: Damien Sandras <dsandras at beip.be>
> Date:   Wed Jul 10 17:59:34 2013 +0200
>
>
>
> regards,
> Takeshi
> <http://www.opensips.org/html/docs/modules/devel/drouting.html#id294786>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>


-- 

--
Kind regards,
Laszlo Bekesi
http://voipfreak.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20130805/59ecb39b/attachment.htm>


More information about the Users mailing list