[Serusers] Re: ser ottendorf flags does not parsing strings

Bogdan Pintea pintea at iptego.de
Thu Nov 9 12:09:30 CET 2006


SER tries to see if you specified directly a number or a pre-declared
flag (possibly specified with "flag: flag_name_1[:number] [other flag
specs...];" config directive) in your modparam.

If you specified a flag string, the function str2s that tries number
conversion fails (and misleadingly prints an "ERROR" prefixed message on
the debug level).

If you didn't specify that flag with "flag: ...;" directive, the flag is
'automatically' registered by modparam (but I would advise to declare it
with the directive, as the cfg gets easier readable).

Flag names do not support `.'.


HTH,
Bogdan.

samuel wrote:
> My own reply...
>
> I mised the flags definition (NEWS file):
>
> (...)
> - added named flags, declared at the beginning of the config file with:
>     flags  flag1_name[:position],  flag2_name ...
>   Example:
>       flags test, a:1, b:2 ;
>       route{
>              setflag(test);
>              if (isflagset(a)){ # equiv. to isflagset(1)
>                ....
>              }
>              resetflag(b);  # equiv. to resetflag(2)
> (...)
>
> It still give me the str2s ERROR but SER starts. I have to check yet
> if the flags are properly used in the config file
>
> Samuel.
> 2006/11/8, samuel <samu60 at gmail.com>:
>> I clicked on send button before finishing...too much work :P
>>
>> If I change "nat.uac" for an uppercase version, such as NAT_UAC, fixup
>> function does not complain....
>>
>> 2006/11/8, samuel <samu60 at gmail.com>:
>> > I can not use "nat.uac" and "nat.uas" as registrar flags:
>> >
>> >  0(12872) str2s: ERROR: unexpected char N in NATuac
>> >  0(12872) set_mod_param_regex: 'registrar' matches module 'registrar'
>> >  0(12872) find_param_export: found <load_nat_flag> in module registrar
>> > [/usr/local/lib/ser/modules/registrar.so]
>> >  0(12872) set_mod_param_regex: found <load_nat_flag> in module
>> > registrar [/usr/local/lib/ser/modules/registrar.so]
>> >  0(12872) str2s: ERROR: unexpected char N in NATuas
>> >
>>
> _______________________________________________
> Serusers mailing list
> Serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
>


-- 
Bogdan Pintea

iptego GmbH  -  VoIP Security
http://www.iptego.de




More information about the sr-users mailing list