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

mayamatakeshi mayamatakeshi at gmail.com
Wed Aug 7 08:30:59 CEST 2013


Hello Vlad,
I tested and confirmed it is OK now.
Thanks.

Regards,
Takeshi


On Wed, Aug 7, 2013 at 4:33 AM, Vlad Paiu <vladpaiu at opensips.org> wrote:

>  Hello,
>
> Actually, the ERROR:core:fixup_uint: bad number <-1> error message was a
> bug in the code, that it wouldn't accept negative numbers for the gateway
> type ( as the docs suggest would match any gw type ).
>
> I've just pushed a fix for this on 1.8, 1.9 and 1.10.
>
> Best Regards,
>
> Vlad Paiu
> OpenSIPS Developerhttp://www.opensips-solutions.com
>
> On 08/04/2013 11:39 PM, mayamatakeshi wrote:
>
>  Thanks,
> actually, I realized it was my mistake:
> 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.
>
>  regards,
> Takeshi
>
>
> On Mon, Aug 5, 2013 at 9:24 AM, Laszlo <laszlo at voipfreak.net> wrote:
>
>>  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
>>>
>>>  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
>>>
>>>  _______________________________________________
>>> Users mailing list
>>> Users at lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>
>>
>> --
>>
>> --
>>  Kind regards,
>>  Laszlo Bekesi
>>  http://voipfreak.net
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>
>
> _______________________________________________
> Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20130807/cdf3af08/attachment.htm>


More information about the Users mailing list