Hello,
the support for named flags isn't yet propagated to modules and
functions coming from kamailio -- only the functions coming from core
support it (e.g., setflag, isflagset, resetflag).
Hopefully next release will fix some of missing easy to integrate K+S
things.
Just to mention that in devel (upcoming 3.1) you can use 'define' to
give names to various integer things, e.g.,:
#!define ACCFLAG 1
modparam("acc", "db_flag", ACCFLAG)
setflag(ACCFLAG);
Cheers,
Daniel
On 7/15/10 2:55 PM, Raúl Alexis Betancor Santana wrote:
On Thursday 15 July 2010 13:26:41 Daniel-Constantin
Mierla wrote:
Thanks ... now a problem with named flags ...
------- kamailio.cfg -----------
#!KAMAILIO
#!define SERVER sbc01
include_file "common.cfg"
include_file "sbc01.cfg"
include_file "modules.cfg"
include_file "flags.cfg"
# Modules params
include_file "usrloc.cfg"
include_file "maxfwd.cfg"
[...]
-------------------------------------
-------- flags.cfg ----------------
flags
ACC_DB_FLAG,
ACC_DB_MISSED_FLAG,
CALL_FROM_INTERNAL_JUMP_FLAG,
INTERNAL_JUMP_FLAG,
BOTH_BRANCHES_SAME_NAT_FLAG,
NAT_FLAG,
CALLEE_NAT_FLAG,
CALLER_NAT_FLAG,
CALL_TO_FOREING_DOMAIN_FLAG,
USE_MEDIAPROXY_FLAG,
PSTN2PSTN_FORWARD_FLAG,
ACC_FAILED_TRANSACTION_FLAG,
ACC_LOOSE_ROUTE_FLAG,
ANONYMIZATION_FLAG,
DM_FLAG,
DEBUG_FLAG_13;
-------------------------------------
sbc02:/etc/kamailio# kamailio -ddddddddd -u kamailio -g kamailio -c -E
0(8472) DEBUG:<core> [main.c:1800]: read 2193979221 from /dev/urandom
0(8472) DEBUG:<core> [main.c:1806]: seeding PRNG with 3473186065
0(8472) DEBUG:<core> [main.c:1810]: test random numbers 379346606 528905461
1802449517
0(8472) DEBUG:<core> [cfg.y:1591]: loading modules
under /usr/lib/kamailio/modules:/usr/lib/kamailio/modules_k
sbc01loading modules
under /usr/lib/kamailio/modules:/usr/lib/kamailio/modules_k
0(8472) :<core> [cfg.y:3330]: parse error in config file usrloc.cfg, line
20, column 33-40: syntax error
0(8472) :<core> [cfg.y:3330]: parse error in config file usrloc.cfg, line
20, column 33-40: Invalid arguments
0(8472) :<core> [cfg.y:3333]: parse error in config file usrloc.cfg, line
20, column 41:
ERROR: bad config file (3 errors)
---------- usrloc.cfg [20] -------
[...]
modparam("usrloc", "nat_bflag", NAT_FLAG)
[...]
--------------------------------------
So the obvious question is ... could named flags be used on the modparam
declaration?
Regars
--
Daniel-Constantin Mierla
http://www.asipto.com/