Hello,
I am currently working on porting Kamailio 4.0.2 to the
FreeBSD ports collection: /usr/ports, and I just have a
few general questions regarding compilation with regard
to the extra modules.
There are 172 modules that come with Kamailio, and most,
however not all of them are compiled by default:
# gmake all
The base server and the base modules compile fine on
my 9.1 release.
To really compile all of the 172 modules, Kamailio_4_0_2/INSTALL
says that the following external libraries (LIB_DEPENDS I assume)
are needed:
/usr/ports/databases/mysql-client-*
/usr/ports/databases/postgresql-libpqxx
/usr/ports/textproc/expat2
/usr/ports/textproc/libxml2
/usr/ports/net/radiusclient
This is put down as information for FreeBSD 5.4. Does that still hold
current for 9.1?
Is there an exhaustive list of all the modules that the all target
does/does not compile and - apart from mysql, postgresql - which of the
extra modules require which libraries?
I would set compile time options accordingly.
This would greatly facilitate my work!
Oliver Mahmoudi
Hi, I installed the latest version 4.0 on CentOS release 5.9 , and when running any fifo command that accesses a module's table (lcr, address etc.) or when a call comes in an there is a need to access a table the app crashes. Example:
Jul 23 09:07:55 proxy01 kernel: kamailio[16608]: segfault at 0000000000000000 rip 00002b3bcd39a36c rsp 00007fff28ef40d0 error 4
Jul 23 09:07:55 proxy01 ./kamailio[16565]: ALERT: <core> [main.c:788]: handle_sigs(): child process 16608 exited by a signal 11
Jul 23 09:07:55 proxy01 ./kamailio[16639]: : <core> [pass_fd.c:293]: receive_fd(): ERROR: receive_fd: EOF on 41
Jul 23 09:07:55 proxy01 ./kamailio[16565]: ALERT: <core> [main.c:791]: handle_sigs(): core was generated
has any one seen this? Is there something new on this version that I am missing?
thank you a lot
fabian
Hello All,
Is there no straight forward way of getting the ACC module CDR values into
the DB. I mean logging the start_time, end_time and duration in DB directly
using some pseudo variables from the config script !!
I think, if a dialog is maintained, all the values related to that dialog
is anyways available and a manual insert on dlg_end event can be called.
But I am only missing the milli-second precision that the CDR module
provides !!
Thanks for any pointers.
--- Jayesh
Well, can't stand needing to ask for help...
So, I keep trying . found it, well it works now.
This is the concurrent route that works:
route[CONCURRENT]
{
xlog("SCRIPT: Conccurrent call check");
if(!get_profile_size("caller","$fu","$avp(nrcalls)"))
{
sl_send_reply("403", "Call not matching profile");
exit;
}
xlog("SCRIPT: caller value for $fu is $avp(nrcalls)");
if($avp(nrcalls)>= 1)
{
sl_send_reply("403", "Active calls limit exceeded");
exit;
}
dlg_manage();
if(!set_dlg_profile("caller","$fu"))
{
sl_send_reply("500", "No new channels in this profile");
exit;
}
xlog("SCRIPT: caller value for $fu is now $avp(nrcalls)");
}
Maybe someone else can be helped by it.
Thanks.
From: sr-users-bounces(a)lists.sip-router.org
[mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Gertjan Wolzak
Sent: dinsdag 23 juli 2013 7:58
To: sr-users(a)lists.sip-router.org
Subject: [SR-Users] trouble counting dialogs
Hello,
I am trying to limit the number of concurrent calls to 1 per user..
But I can't get the dialogs to be counted.
Can anybody tell me what I am doing wrong..?
Kamailio version 3.2.3
# ------ dialog params -------
modparam("dialog", "enable_stats", 1)
modparam("dialog", "profiles_with_value", "caller")
modparam("dialog", "dlg_flag", 24)
modparam("dialog", "dlg_match_mode", 1)
modparam("dialog", "default_timeout", 3600)
modparam("dialog", "db_url", "mysql://xxxxx:xxxxxx@127.0.0.1/dbname")
modparam("dialog", "db_mode", 1)
request_route {
.
# Check if caller is in call
if(is_method("INVITE") && !has_totag())
{
route(CONCURRENT);
}
.
}
route[CONCURRENT]
{
xlog("SCRIPT: Conccurrent call check");
get_profile_size("caller", "$fu", "$var(SIZE)");
xlog("SCRIPT: profile size is $var(SIZE)");
if( $var(SIZE) >= 1 )
{
sl_send_reply("503", "Simultaneous calls limit reached");
exit;
}
set_dlg_profile("caller","$fu");
get_profile_size("caller", "$fu", "$var(SIZE)");
xlog("SCRIPT: profile size is now $var(SIZE)");
xlog("SCRIPT: No concurrent call");
}
I feel I should do a dlg_setflag(), but I am not sure and even if I have to,
not sure where to place it. Hope someone can point me in the right
direction.
Thanks.
Gertjan Wolzak
Hello,
I am trying to limit the number of concurrent calls to 1 per user..
But I can't get the dialogs to be counted.
Can anybody tell me what I am doing wrong..?
Kamailio version 3.2.3
# ------ dialog params -------
modparam("dialog", "enable_stats", 1)
modparam("dialog", "profiles_with_value", "caller")
modparam("dialog", "dlg_flag", 24)
modparam("dialog", "dlg_match_mode", 1)
modparam("dialog", "default_timeout", 3600)
modparam("dialog", "db_url", "mysql://xxxxx:xxxxxx@127.0.0.1/dbname")
modparam("dialog", "db_mode", 1)
request_route {
.
# Check if caller is in call
if(is_method("INVITE") && !has_totag())
{
route(CONCURRENT);
}
.
}
route[CONCURRENT]
{
xlog("SCRIPT: Conccurrent call check");
get_profile_size("caller", "$fu", "$var(SIZE)");
xlog("SCRIPT: profile size is $var(SIZE)");
if( $var(SIZE) >= 1 )
{
sl_send_reply("503", "Simultaneous calls limit reached");
exit;
}
set_dlg_profile("caller","$fu");
get_profile_size("caller", "$fu", "$var(SIZE)");
xlog("SCRIPT: profile size is now $var(SIZE)");
xlog("SCRIPT: No concurrent call");
}
I feel I should do a dlg_setflag(), but I am not sure and even if I have to,
not sure where to place it. Hope someone can point me in the right
direction.
Thanks.
Gertjan Wolzak
Hi
I am trying to make a kamailio script which gets a uri from the database
and then directs the call to that uri. Setting the uri with a string (not
derived from the database) works just fine:
append_branch();
seturi("sip:user@domain");
But I can not seem to pass anything to seturi other than a string. Here are
some examples:
$var(branch_uri) = $dbr(ra=>[0,0]);
append_branch();
seturi($var(branch_uri));
# kamailio won't even start when I try to pass the uri from a variable
$var(branch_uri) = $dbr(ra=>[0,0]);
append_branch();
seturi("$var(branch_uri)");
# treats the "$var(branch_uri)" as a literal string -- does not evaluate to
the the value of the variable
$var(branch_uri) = $dbr(ra=>[0,0]);
append_branch();
seturi((str)$var(branch_uri));
# kamailio won't start with this syntax inplace
The errors that kamailio gives on start up when I have a variable in passed
into seturi are as follows
0(16145) : <core> [cfg.y:3567]: yyerror_at(): parse error in config file
/usr/local/kamailio-4.0/etc/kamailio/kamailio.cfg, line 647, column 12-27:
syntax error
0(16145) : <core> [cfg.y:3570]: yyerror_at(): parse error in config file
/usr/local/kamailio-4.0/etc/kamailio/kamailio.cfg, line 647, column 28: bad
argument, string expected
0(16145) DEBUG: <core> [sr_module.c:674]: find_mod_export_record():
find_export_record: found <sl_reply_error> in module sl
[/usr/local/kamailio-4.0/lib64/kamailio/modules/sl.so]
0(16145) DEBUG: <core> [sr_module.c:674]: find_mod_export_record():
find_export_record: found <sl_reply_error> in module sl
[/usr/local/kamailio-4.0/lib64/kamailio/modules/sl.so]
0(16145) DEBUG: <core> [sr_module.c:674]: find_mod_export_record():
find_export_record: found <sl_reply_error> in module sl
[/usr/local/kamailio-4.0/lib64/kamailio/modules/sl.so]
ERROR: bad config file (2 errors)
I also tried to accomplish this
append_branch($var(branch_uri), "0.0");
t_load_contacts();
t_next_contacts();
# No errors but didn't work
I found a way around the problem by making a perl script to allow me set
the uri:
Perl script:
sub rewrite_uri {
my $m = shift;
my $uri = shift;
$m->rewrite_ruri($uri);
return -1;
}
Then I call it like this:
$var(branch_uri) = $dbr(ra=>[0,0]);
append_branch();
perl_exec("rewrite_uri", $var(branch_uri));
# this works
So I have a viable work around but it seems like there is probably
something simple I am missing which should let me accomplish this with out
having to do a call into perl.
Any advice any one can give me would be greatly appreciated.
Best regards
Will Ferrer
Thanks Daniel, your help was very useful.
With this I created a header by append_hf () before calling the function
t_replicate and standby server retrieved the value of this header and
assigns this value to the parameter avp
Example
$avp(s:rcv) = $hdr(IP-source);
Best regards
Raphael
Hello,
>
> the received is taken from an avp specified by parameter received_avp of
> registrar module:
>
> http://kamailio.org/docs/modules/devel/modules/registrar.html#idp4433296
>
> You can carry the original details via a header on the replicated REGISTER
> (using append_hf()), then take the header on the second server and store
> its value in the avp.
>
> Cheers,
> Daniel
>
>
> On 7/18/13 9:05 PM, Raphael Borges wrote:
>
> *Hello,*
>
>
> I have two servers in kamailio duality, I am using the function
> t_replicate () for replication log as below:
> Server 1 active
> t_replicate ("xxx.xxx.xxx.2", "5060");
> Server 2 reserves
> t_replicate ("xxx.xxx.xxx.1", "5060");
>
> But when the record is replicated to the standby server the parameter
> received is being filled with the active server IP, where the IP would
> Correro UAC, registry problems generating the backup server.
>
> Example
> Server 1 active xxx.xxx.xxx.1
>
> $ Kamctl ul show
> Domain :: location table = 512 records = 1 = 1 max_slot
> AOR :: 4301
> Contact :: sip: 4301(a)yyy.yyy.yyy.100; transport = udp Q =
> Expires :: 4566
> Callid :: ccd0431c-6a4c-1231-0a94-7356c4f466e6
> CSeq :: 46740150
> User-agent :: stepo_LITE
> Received :: sip: yyy.yyy.yyy.100: 5060
> State :: CS_SYNC
> Flags :: 0
> CFLAG :: 0
> Socket :: udp: xxx.xxx.xxx.1: 5060
> Methods :: 8159
>
> Server 2 Reserve xxx.xxx.xxx.2
>
> $ Kamctl ul show
> Domain :: location table = 512 records = 1 = 1 max_slot
> AOR :: 4301
> Contact :: sip: 4301(a)yyy.yyy.yyy.100; transport = udp Q =
> Expires :: 6665
> Callid :: ec7cfd42-6a7c-1231-0f94-7356c4f466e6
> CSeq :: 46750472
> User-agent :: stepo_LITE
> Received :: sip: xxx.xxx.xxx.1: 5060
> State :: CS_SYNC
> Flags :: 0
> CFLAG :: 0
> Socket :: udp: xxx.xxx.xxx.2: 5060
> Methods :: 8159
>
>
>
> Tkanks
>
> Raphael
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users(a)lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
>
Is there a plan to support floating point arithmetic operations in kamailio
in the near future. I am looking at something similar to mathops module in
opensips.
Thanks,
--- Jayesh
Hello,
I am pleased to announce a new developer for the Kamailio project: Lucian
Balaceanu. Lucian works in our 1&1 office in Bucharest and is for some years
with us in the company. He worked on several internal projects with our
Kamailio stack and will contribute some fixes to the sipcapture and
carrierroute module. He will also probably commit some other smaller fixes from
time to time.
Welcome Lucian and all the best,
Henning
Hi,
After few crashes of the Kamailio during prcessing of the messages,
Kamailio fails to start
I see rtimer is failing. Here is the log
0(20082) DEBUG: <core> [sr_module.c:892]: DEBUG: init_mod_child (0): sqlops
0(20082) DEBUG: <core> [sr_module.c:892]: DEBUG: init_mod_child (0):
app_lua
0(20082) DEBUG: <core> [sr_module.c:892]: DEBUG: init_mod_child (0): rtimer
0(20082) ERROR: rtimer [rtimer_mod.c:162]: failed to start timer routine
as process
0(20082) ERROR: <core> [sr_module.c:896]: init_mod_child(): Error while
initializing module rtimer (/usr/local/lib64/imckamailio/modules/rtimer.so)
0(20082) ERROR: <core> [main.c:1716]: ERROR: main: error in init_child
6(20091) INFO: <core> [main.c:854]: INFO: signal 15 received
What can I do to fix this issue?
Thanks
Krish