Hi, I'm trying to test the new 3.0.2 release ... but with no luck ...
sbc02:/etc/kamailio# kamailio -ddddddddd -u kamailio -g kamailio -c -E 0(1036) DEBUG: <core> [main.c:1800]: read 343643572 from /dev/urandom 0(1036) DEBUG: <core> [main.c:1806]: seeding PRNG with 1622837431 0(1036) DEBUG: <core> [main.c:1810]: test random numbers 396346077 2140170049 1800197589 0(1036) : <core> [cfg.lex:1390]: included file name must be between quotes
If i'm not wrong ... I should get the line/caracter at witch the parser get the error ... but that's not true ... I'm missing something really stupid ?
Best regards
Hello,
On 7/15/10 1:22 PM, Raúl Alexis Betancor Santana wrote:
Hi, I'm trying to test the new 3.0.2 release ... but with no luck ...
sbc02:/etc/kamailio# kamailio -ddddddddd -u kamailio -g kamailio -c -E 0(1036) DEBUG:<core> [main.c:1800]: read 343643572 from /dev/urandom 0(1036) DEBUG:<core> [main.c:1806]: seeding PRNG with 1622837431 0(1036) DEBUG:<core> [main.c:1810]: test random numbers 396346077 2140170049 1800197589 0(1036) :<core> [cfg.lex:1390]: included file name must be between quotes
If i'm not wrong ... I should get the line/caracter at witch the parser get the error ... but that's not true ... I'm missing something really stupid ?
the printing of error messagess is done by parser generator (i.e., bison), following pretty much the pattern with line and column. This error comes from lexical analyzer/scanner (i.e., flex), so it is different.
I will add printing the line for this case as well, since it does not return to bison, but exits.
Cheers, Daniel
On Thursday 15 July 2010 12:45:16 Daniel-Constantin Mierla wrote:
the printing of error messagess is done by parser generator (i.e., bison), following pretty much the pattern with line and column. This error comes from lexical analyzer/scanner (i.e., flex), so it is different.
I will add printing the line for this case as well, since it does not return to bison, but exits.
Umm ... so it's supposed to be my fault with something in the .cfg ? ... I was just trying to test the new include_file("file.cfg"); directive ...
Best regards
On 7/15/10 1:58 PM, Raúl Alexis Betancor Santana wrote:
On Thursday 15 July 2010 12:45:16 Daniel-Constantin Mierla wrote:
the printing of error messagess is done by parser generator (i.e., bison), following pretty much the pattern with line and column. This error comes from lexical analyzer/scanner (i.e., flex), so it is different.
I will add printing the line for this case as well, since it does not return to bison, but exits.
Umm ... so it's supposed to be my fault with something in the .cfg ? ... I was just trying to test the new include_file("file.cfg"); directive ...
you have an error in the config, include file does not take parenthesis.
Cheers, Daniel
On Thursday 15 July 2010 13:02:25 Daniel-Constantin Mierla wrote:
On 7/15/10 1:58 PM, Raúl Alexis Betancor Santana wrote:
On Thursday 15 July 2010 12:45:16 Daniel-Constantin Mierla wrote:
the printing of error messagess is done by parser generator (i.e., bison), following pretty much the pattern with line and column. This error comes from lexical analyzer/scanner (i.e., flex), so it is different.
I will add printing the line for this case as well, since it does not return to bison, but exits.
Umm ... so it's supposed to be my fault with something in the .cfg ? ... I was just trying to test the new include_file("file.cfg"); directive ...
you have an error in the config, include file does not take parenthesis.
Ejem, Ejem .... ;-)
http://by-miconda.blogspot.com/2009/12/best-of-new-in-kamailio-300-1-include... http://www.kamailio.org/dokuwiki/doku.php/features:new-in-3.0.x#cfg_include_...
No matter if I remove the () around the include_file ... still the same error ... but testing show me that also the ; are not needed ...
Better if you could update the WiKi about the include_file directive.
Now it loads, have other errors ... but thats ok.
On 7/15/10 2:21 PM, Raúl Alexis Betancor Santana wrote:
On Thursday 15 July 2010 13:02:25 Daniel-Constantin Mierla wrote:
On 7/15/10 1:58 PM, Raúl Alexis Betancor Santana wrote:
On Thursday 15 July 2010 12:45:16 Daniel-Constantin Mierla wrote:
the printing of error messagess is done by parser generator (i.e., bison), following pretty much the pattern with line and column. This error comes from lexical analyzer/scanner (i.e., flex), so it is different.
I will add printing the line for this case as well, since it does not return to bison, but exits.
Umm ... so it's supposed to be my fault with something in the .cfg ? ... I was just trying to test the new include_file("file.cfg"); directive ...
you have an error in the config, include file does not take parenthesis.
Ejem, Ejem .... ;-)
http://by-miconda.blogspot.com/2009/12/best-of-new-in-kamailio-300-1-include... http://www.kamailio.org/dokuwiki/doku.php/features:new-in-3.0.x#cfg_include_...
hmm, seemed to be the same source of error, copy&pasted -- I fixed both.
The core cookbook was fine: http://www.kamailio.org/dokuwiki/doku.php/core-cookbook:3.0.x#include_file
Thanks, Daniel
No matter if I remove the () around the include_file ... still the same error ... but testing show me that also the ; are not needed ...
Better if you could update the WiKi about the include_file directive.
Now it loads, have other errors ... but thats ok.
On Thursday 15 July 2010 13:26:41 Daniel-Constantin Mierla wrote:
The core cookbook was fine: http://www.kamailio.org/dokuwiki/doku.php/core-cookbook:3.0.x#include_file
Thanks, Daniel
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
On Thursday 15 July 2010 13:55:37 Raúl Alexis Betancor Santana wrote:
So the obvious question is ... could named flags be used on the modparam declaration?
Could someone confirm this point? ... on the test I have been done ... appears not to be possible ... :-(
Best regards
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:
The core cookbook was fine: http://www.kamailio.org/dokuwiki/doku.php/core-cookbook:3.0.x#include_file
Thanks, Daniel
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
On Thursday 15 July 2010 16:04:47 Daniel-Constantin Mierla wrote:
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);
So then .. why define "flags" ... if then you could do it by using #!define sentences ? ... redundant ... IMHO
Continue with the testing ... now other "mistery" errors ...
0(14595) : <core> [cfg.y:3330]: parse error in config file /etc/kamailio/kamailio.cfg, line 161, column 13-20: syntax error 0(14595) : <core> [cfg.y:3330]: parse error in config file /etc/kamailio/kamailio.cfg, line 161, column 13-20: call params error
0(14595) : <core> [cfg.y:3330]: parse error in config file /etc/kamailio/kamailio.cfg, line 161, column 13-20: call params error
0(14595) : <core> [cfg.y:3333]: parse error in config file /etc/kamailio/kamailio.cfg, line 161, column 21: unknown command, missing loadmodule?
[kamailio.cfg] 155: #---- Request is behind NAT(NAT_FLAG) save with bflag NAT_FLAG ----# 156: #---- Use bflag NAT_PING to start SIP pinging (OPTIONS) ----# 157: if(isflagset(NAT_FLAG)) { 158: setbflag(NAT_FLAG); 159: setbflag(NAT_PING); 160: } 161: if(!save("location")) { 162: sl_reply_error(); 163: exit; 164: }
So I'm stucked ... why 161 it's wrong ? registrar module it's loaded
Best regards
On Thursday 15 July 2010 21:15:54 Raúl Alexis Betancor Santana wrote:
So I'm stucked ... why 161 it's wrong ? registrar module it's loaded
For sure it's loaded ....
sbc02:/etc/kamailio# strace kamailio -E -dddddddddddddddddddddddd -c 2>&1 | grep registra stat64("/usr/lib/kamailio/modules/registrar.so", 0xbfeee684) = -1 ENOENT (No such file or directory) stat64("/usr/lib/kamailio/modules/registrar/registrar.so", 0xbfeee684) = -1 ENOENT (No such file or directory) stat64("/usr/lib/kamailio/modules_k/registrar.so", {st_mode=S_IFREG|0644, st_size=214031, ...}) = 0 open("/usr/lib/kamailio/modules_k/registrar.so", O_RDONLY) = 7
So ... I don't know what I'm doing wrong ... is there any sample .cfg file for kamailio 3.0 ¿?
Best regards
On 7/15/10 10:52 PM, Raúl Alexis Betancor Santana wrote:
On Thursday 15 July 2010 21:15:54 Raúl Alexis Betancor Santana wrote:
So I'm stucked ... why 161 it's wrong ? registrar module it's loaded
For sure it's loaded ....
sbc02:/etc/kamailio# strace kamailio -E -dddddddddddddddddddddddd -c 2>&1 | grep registra stat64("/usr/lib/kamailio/modules/registrar.so", 0xbfeee684) = -1 ENOENT (No such file or directory) stat64("/usr/lib/kamailio/modules/registrar/registrar.so", 0xbfeee684) = -1 ENOENT (No such file or directory) stat64("/usr/lib/kamailio/modules_k/registrar.so", {st_mode=S_IFREG|0644, st_size=214031, ...}) = 0 open("/usr/lib/kamailio/modules_k/registrar.so", O_RDONLY) = 7
So ... I don't know what I'm doing wrong ... is there any sample .cfg file for kamailio 3.0 ¿?
the default config file coming with 3.0 is updated. The error might be due to expansion to the longest match attempt for parser, caused by wrong parameter for setbflag which has to be integer.
Cheers, Daniel
On 7/15/10 10:15 PM, Raúl Alexis Betancor Santana wrote:
On Thursday 15 July 2010 16:04:47 Daniel-Constantin Mierla wrote:
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);
So then .. why define "flags" ... if then you could do it by using #!define sentences ? ... redundant ... IMHO
names for flags were introduced in ser 2.0 and inherited in 3.0 -- since they come from ser side, kamailio modules do not support them yet.
setbflag() works on another set of flags -- branch flags -- and the respective functions are exported by kex module. So using flag names with these functions do not work.
On the other hand #!defined IDs are pre-processor replacements, therefore working with any kind of parameter, using them to name flags is just a use case.
Cheers, Daniel
Continue with the testing ... now other "mistery" errors ...
0(14595) :<core> [cfg.y:3330]: parse error in config file /etc/kamailio/kamailio.cfg, line 161, column 13-20: syntax error 0(14595) :<core> [cfg.y:3330]: parse error in config file /etc/kamailio/kamailio.cfg, line 161, column 13-20: call params error
0(14595) :<core> [cfg.y:3330]: parse error in config file /etc/kamailio/kamailio.cfg, line 161, column 13-20: call params error
0(14595) :<core> [cfg.y:3333]: parse error in config file /etc/kamailio/kamailio.cfg, line 161, column 21: unknown command, missing loadmodule?
[kamailio.cfg] 155: #---- Request is behind NAT(NAT_FLAG) save with bflag NAT_FLAG ----# 156: #---- Use bflag NAT_PING to start SIP pinging (OPTIONS) ----# 157: if(isflagset(NAT_FLAG)) { 158: setbflag(NAT_FLAG); 159: setbflag(NAT_PING); 160: } 161: if(!save("location")) { 162: sl_reply_error(); 163: exit; 164: }
So I'm stucked ... why 161 it's wrong ? registrar module it's loaded
Best regards