Hi all,
I am exploring the use of the ims_charging module having set up a freediameter server (all very new to me). I have loaded and configured the dependencies i.e. cdp, dialog_ng, tm, cdp_avp but the startup gets stuck on:
Jan 26 03:57:05 host-172-16-0-82 /usr/sbin/kamailio[2931]: ERROR: ims_charging [mod.c:269]: mod_init(): Could not import ul_register_ulcb
Jan 26 03:57:05 host-172-16-0-82 /usr/sbin/kamailio[2931]: ERROR: <core> [sr_module.c:968]: init_mod(): Error while initializing module ims_charging (/usr/lib64/kamailio/modules/ims_charging.so)
The corresponding code in mod.c is:
/*Register for callback of URECORD being deleted - so we can send a SAR*/
if (ul.register_ulcb == NULL) {
LM_ERR("Could not import ul_register_ulcb\n");
return -1;
}
But unfortunately this doesn't mean much to me - what is a URECORD, what is a SAR? Any words of wisdom around what a "ul.register_ulcb" is about would be appreciated.
Kind regards
Shane
Shane Harrison
Senior Software Engineer
Imagination Technologies NZ Limited
Level 2
1 Market Grove
Lower Hutt, 5010
New Zealand
PO Box 30-449
Lower Hutt, 5040
New Zealand
Phone: +64 4 890-3681 ext 3361
We want to implement the following topology :
INVITE--->kamailio1-----forward--->kamailio2--->route[NATMANAGE]--->Next
Sip endpoint
Client <----
route[NATMANAGE]<--------kamailio1<------forward-----kamailio2<---- reply
with SDP
So the caller to callee will be processed by one kamailio and callee to
caller will be processed by another kamailio. Both kamailio will be up with
a public IP. How this can be achieved?
Hello. I need parallel forking calls with the same username. (Call to all
contacts with name for example User123), my endpoints may be WebSocket
based and standart UDP endpoints. And I use rtpengine_manage for nmanaging
calls wor webphones and standart softh/hard phones.
I get all contacts manually and than at the branch route set
rtpengine_manage settings for every call.
It works fine but it works for one kamailio server.
When I use 2 kamailio servers as load balansers Server that handle call get
all endpoints from location but call to only one, that registred only at
ths server
for example I call user123
I have 3 contacts
user123(a)1.2.3.4 - was registered at kamailio 1
user123(a)3.2.1.4 - was registered at kamailio 2
user123(a)4.3.2.1 - was registered at kamailio 1
So if call goes through kamailio 1 it call only to user123(a)1.2.3.4 and
user123(a)4.3.2.1
I use this settings for usrloc at 2 kamailios to share all table between 2
servers
modparam("usrloc", "db_url", DBURL)
modparam("usrloc", "db_mode", 3)
modparam("usrloc", "user_column", "username")
modparam("usrloc", "contact_column", "contact")
modparam("usrloc", "expires_column", "expires")
modparam("usrloc", "q_column", "q")
modparam("usrloc", "callid_column", "callid")
modparam("usrloc", "cseq_column", "cseq")
modparam("usrloc", "methods_column", "methods")
modparam("usrloc", "cflags_column", "cflags")
modparam("usrloc", "user_agent_column", "user_agent")
modparam("usrloc", "received_column", "received")
modparam("usrloc", "socket_column", "socket")
modparam("usrloc", "path_column", "path")
modparam("usrloc", "ruid_column", "ruid")
modparam("usrloc", "instance_column", "instance")
modparam("usrloc", "use_domain", 1)
and this code for calling them
[GET_CONTACTS]
{
sql_query("ca", "select contact from location where username='$tU'", "ra");
xlog("rows: $dbr(ra=>rows) cols: $dbr(ra=>cols)\n");
if($dbr(ra=>rows)>0){
$var(i)=0;
while($var(i)<$dbr(ra=>rows)){
xlog("L_INFO","SQL query return contact {$dbr(ra=>[$var(i),0])} for {$tU}
at step {$var(i)}\n");
if ($dbr(ra=>[$var(i),0])=~"transport=ws"){
xlog("L_INFO", "This is a Websocket call to endpoint");
sql_pvquery("ca", "select received from location where
contact='$dbr(ra=>[$var(i),0])'","$var(recieved)");
$du=$var(recieved);
xlog("L_INFO","SQL query return recieved {$var(recieved)} for {$tU}.
Destination is {$du}\n");
append_branch("sip:$tU@$(du{s.select,1,:})");
}
else
{
xlog("L_INFO", "This is a classic UDP call to endpoint");
$var(recieved)='';
sql_pvquery("ca", "select received from location where
contact='$dbr(ra=>[$var(i),0])'","$var(recieved)");
xlog("L_INFO", "SQL query return RECIEVED {$var(recieved)}");
if ($var(recieved)==0){
xlog("L_INFO", "Recieved string is EMPTY");
$du="sip:"+$(dbr(ra=>[$var(i),0]){s.select,1,@});
}
else {
xlog("L_INFO", "Recieved string is {$var(recieved)}");
$du=$var(recieved);
}
$var(UDP_contact)="sip:"+$(dbr(ra=>[$var(i),0]){s.select,1,@});
append_branch("sip:$tU@$(du{s.select,1,:})");
xlog("L_INFO","Classic Destination URI is {$dbr(ra=>[$var(i),0])} for
{$tU}}. Destination is {$du}\n");
}
$var(i) = $var(i) + 1;
}
}
t_on_branch("1");
return;
}
}
}
branch_route[1]{
if($du=~"transport=ws"){
xlog("L_INFO","Websocket Branch is {$du} for {$tU}\n");
rtpengine_manage("internal extenal force trust-address replace-origin
replace-session-connection ICE=force RTP/SAVPF");
t_on_reply("REPLY_FROM_WS");
}
else{
xlog("L_INFO","UDP Branch is {$du)} for {$tU}\n");
rtpengine_manage("replace-origin replace-session-connection ICE=remove
RTP/AVP");
t_on_reply("MANAGE_CLASSIC_REPLY");
}
}
When it try to branch endpoint without registration at server that handle
call I get errors that tm module can not build Via header
**via_builder(): TCP/TLS connection (id: 0) for WebSocket could not be
found*
*ERROR: <core> [msg_translator.c:1725]: build_req_buf_from_sip_req():
could not create Via header*
*ERROR: <core> [forward.c:607]: forward_request(): ERROR:
forward_request: building failed*
*
UDP calls get errors something like above (sorry than can not share
error code, This situation not often).
So I think I have this trouble because I use manually handling call
and tried to substitute to lookup_branches function. but I have no
Idea how to set rtpengine_manage paraments for each endpoint depending
this is websocket or standart call.
IF there is write problem for callings thhrough 2 kamailios as
loadbalansers pleas let me know about how to set rtpengine_manage
parametrs wor endpoints for every fork. If not- can you tell me how I
can call to all endpoints endepending of registration server (kamailio
1 or 2).
Thanks.
Hello Everyone,
Thank you for help, fixed by adding to dialog module parameters.
modparam("dialog", "db_url", DBURL)
Slava.
From: "Carsten Bock" <carsten(a)ng-voice.com>
To: "sr-users" <sr-users(a)lists.sip-router.org>
Sent: Sunday, January 25, 2015 8:36:52 AM
Subject: Re: [SR-Users] remote mysql server
Hi Slava,
is most modules a default database connection is defined. Probably
this is the case here.
As this error is coming from the dialog module: Did you configure some
sort of "db_mode"?
e.g.:
modparam("dialog", "db_mode", 1)
Thanks,
Carsten
2015-01-25 9:27 GMT+02:00 Slava Bendersky <volga629(a)skillsearch.ca>:
> Hello Everyone,
>
> I am trying start kamailio 4.2 with remote mysql server and on debug I see
> DEBUG: db_mysql [km_my_con.c:94]: db_mysql_new_connection(): opening
> connection: mysql://xxxx:xxxx@localhost/kamailio
> but in cfg defined actual mysql server ip and not localhost
>
> 0(28885) DEBUG: <core> [sr_module.c:695]: find_mod_export_record():
> find_export_record: found <db_bind_api> in module db_mysql
> [/usr/lib64/kamailio/modules/db_mysql.so]
> 0(28885) DEBUG: <core> [db.c:213]: db_bind_mod(): using db bind api for
> db_mysql
> 0(28885) DEBUG: <core> [db.c:318]: db_do_init2(): connection 0x7faca59eced8
> not found in pool
> 0(28885) DEBUG: db_mysql [km_my_con.c:94]: db_mysql_new_connection():
> opening connection: mysql://xxxx:xxxx@localhost/kamailio
> 0(28885) ERROR: db_mysql [km_my_con.c:109]: db_mysql_new_connection():
> driver error: Can't connect to local MySQL server through socket
> '/var/lib/mysql/mysql.sock' (2 "No such file or directory")
> 0(28885) ERROR: <core> [db.c:322]: db_do_init2(): could not add connection
> to the pool 0(28885) ERROR: dialog [dlg_db_handler.c:147]: init_dlg_db():
> unable to connect to the database
>
>
> Slava.
>
> _______________________________________________
> 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
>
--
Carsten Bock
CEO (Geschäftsführer)
ng-voice GmbH
Schomburgstr. 80
D-22767 Hamburg / Germany
http://www.ng-voice.com
mailto:carsten@ng-voice.com
Office +49 40 5247593-0
Fax +49 40 5247593-99
Sitz der Gesellschaft: Hamburg
Registergericht: Amtsgericht Hamburg, HRB 120189
Geschäftsführer: Carsten Bock
Ust-ID: DE279344284
Hier finden Sie unsere handelsrechtlichen Pflichtangaben:
http://www.ng-voice.com/imprint/
_______________________________________________
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
oon why I see in log connection attempt to localhost ?
From: "Carsten Bock" <carsten(a)ng-voice.com>
To: "sr-users" <sr-users(a)lists.sip-router.org>
Sent: Sunday, January 25, 2015 8:36:52 AM
Subject: Re: [SR-Users] remote mysql server
Hi Slava,
is most modules a default database connection is defined. Probably
this is the case here.
As this error is coming from the dialog module: Did you configure some
sort of "db_mode"?
e.g.:
modparam("dialog", "db_mode", 1)
Thanks,
Carsten
2015-01-25 9:27 GMT+02:00 Slava Bendersky <volga629(a)skillsearch.ca>:
> Hello Everyone,
>
> I am trying start kamailio 4.2 with remote mysql server and on debug I see
> DEBUG: db_mysql [km_my_con.c:94]: db_mysql_new_connection(): opening
> connection: mysql://xxxx:xxxx@localhost/kamailio
> but in cfg defined actual mysql server ip and not localhost
>
> 0(28885) DEBUG: <core> [sr_module.c:695]: find_mod_export_record():
> find_export_record: found <db_bind_api> in module db_mysql
> [/usr/lib64/kamailio/modules/db_mysql.so]
> 0(28885) DEBUG: <core> [db.c:213]: db_bind_mod(): using db bind api for
> db_mysql
> 0(28885) DEBUG: <core> [db.c:318]: db_do_init2(): connection 0x7faca59eced8
> not found in pool
> 0(28885) DEBUG: db_mysql [km_my_con.c:94]: db_mysql_new_connection():
> opening connection: mysql://xxxx:xxxx@localhost/kamailio
> 0(28885) ERROR: db_mysql [km_my_con.c:109]: db_mysql_new_connection():
> driver error: Can't connect to local MySQL server through socket
> '/var/lib/mysql/mysql.sock' (2 "No such file or directory")
> 0(28885) ERROR: <core> [db.c:322]: db_do_init2(): could not add connection
> to the pool 0(28885) ERROR: dialog [dlg_db_handler.c:147]: init_dlg_db():
> unable to connect to the database
>
>
> Slava.
>
> _______________________________________________
> 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
>
--
Carsten Bock
CEO (Geschäftsführer)
ng-voice GmbH
Schomburgstr. 80
D-22767 Hamburg / Germany
http://www.ng-voice.com
mailto:carsten@ng-voice.com
Office +49 40 5247593-0
Fax +49 40 5247593-99
Sitz der Gesellschaft: Hamburg
Registergericht: Amtsgericht Hamburg, HRB 120189
Geschäftsführer: Carsten Bock
Ust-ID: DE279344284
Hier finden Sie unsere handelsrechtlichen Pflichtangaben:
http://www.ng-voice.com/imprint/
_______________________________________________
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
Hello Everyone,
I am trying start kamailio 4.2 with remote mysql server and on debug I see
DEBUG: db_mysql [km_my_con.c:94]: db_mysql_new_connection(): opening connection: mysql://xxxx:xxxx@localhost/kamailio
but in cfg defined actual mysql server ip and not localhost
Any help thank you,
Slava.
Hi,
Is it possible to write CDRs directly to MongoDB using the new db_mongodb
module?
modparam("acc", "db_url", DB_MONGO_URL)
modparam("acc", "cdr_enable", 1)
modparam("acc", "cdr_extra", " . ")
modparam("acc", "cdr_log_enable", 0)
modparam("acc", "cdrs_table", "cdrs")
In the acc module documentation, I found the following statement:
Note that CDR generation does not involve any kind of database storage
(yet). In order to persist the CDRs into a database you will have to set up
an exterior process (i.e., a script living outside of Kamailio) and
implement the storage task yourself.
Thanks,
Mickael
Hi,
it looks to me that Kamailio detects NAT without NAT being there, when used
in IPv6 scenarios.
I have a register, which comes in like this:
U 2015/01/23 11:42:31.013284 2a01:1234:123:1234::2:16732 ->
2001:9876:98:9876::aa01:5060
REGISTER sip:domain SIP/2.0
Via: SIP/2.0/UDP [2a01:1234:123:1234::2]:16732;branch=z9hG4bK45528eba
After it has run through Kamailio, the packet is sent out like this:
U 2015/01/23 11:42:31.015126 1.2.3.4:5060 -> 9.8.7.6:5060
REGISTER sip:domain SIP/2.0
Via: SIP/2.0/UDP
1.2.3.4;branch=z9hG4bK8d21.7fa5fb060c2acc9583f05a93b93f9873.0
Via: SIP/2.0/UDP
[2a01:1234:123:1234::2]:16732;received=2A01:1234:123:1234:0:0:0:2;branch=z9hG4bK45528eba
As far as I know, the received part should only get appended, if the source
IP of the packet differs from the IP advertised in the topmost Via header.
But to me it looks like it always gets appended. In just IPv4 scenarios,
the received parameter only gets appended if a difference is detected.
And if it gets appended, shouldn't the received parameter IP be in square
brackets, too?
Later on, we have something like this in our code:
if(method=="REGISTER") {
if (nat_uac_test("23")) {
append_hf("X-nathint: nat\r\n");
force_rport();
if (!add_path_received()) {
sl_send_reply("503", "Internal Path
Error");
};
} else {
if (!add_path()) {
sl_send_reply("503", "Internal Path
Error");
};
};
}
In our code, Kamailio always jumps into the add_path_received() part, so I
guess, NAT detection triggers. But why?
And then the Path header appended looks like this:
Path: <sip:1.2.3.4;lr;received=sip:2A01:1234:123:1234:0:0:0:2:16732>
The path module probably doesn't know anything about IPv6, too, so the IP
in the received parameter is not enclosed in square brackets. When using
the Path header later to send packets to the client, Kamailio complains
about a parse error for the destination URI again.
I tried looking into the path module, but I guess my C skills aren't
sufficient to submit a patch.
Best regards,
Sebastian
Hi Dears,
I'm trying to install Siremis 4.1 on Debian and whenever i open the URL in
IE i get location.href='$url'"; exit; } ?> and in Firefox i see
<?php
if(is_file(dirname(__FILE__).'/install.lock')){
include 'bin/_forward.php';
}else{
$script_name = $_SERVER['SCRIPT_NAME'];
$url = str_replace("index.php","install/",$script_name);
echo "<script>location.href='$url'</script>";
exit;
}
?>
I've verified the permissions of
- siremis/log
- siremis/session
- siremis/files
- siremis/themes/default/template/cpl
files without success also no logs gets written to the logs file...please
help to fix this issue...
Thanks in advance
Hi!
I use the dialog module to count and limit concurrent calls per user. It
worked fine with 4.1.7 but fails with 4.2.2.
My config basically looks like:
route{
...
dlg_manage()
...
authentication (stateless replies + exit)
...
t_on_reply()
t_on_branch()
...
t_relay()
exit;
}
initial_cbs_inscript uses the default value 1.
Using 4.1.7, after stateless reply+exit, Kamailio executes dialog
callbacks and deletes the dialog:
[dlg_var.c:55]: dlg_cfg_cb(): new dialog with no trasaction after config
execution
[dlg_hash.c:872]: dlg_unref(): unref dlg 0xb233c3a0 with 1 -> 1
[dlg_hash.c:872]: dlg_unref(): unref dlg 0xb233c3a0 with 1 -> 0
[dlg_hash.c:872]: dlg_unref(): ref <=0 for dialog 0xb233c3a0
[dlg_hash.c:355]: destroy_dlg(): destroying dialog 0xb233c3a0 (ref 0)
With 4.2.2, after stateless reply+exit, Kamailio just exits without
calling any dialog callback (to destroy the dialog)
I think I could work around the problem by creating the transaction
later. Here are some ideas and I would be happy about your comments and
best practices.
- set initial_cbs_inscript to 0
- call dlg_manage() just before t_relay
- do not use dlg_manage() but use the dialog flag and set the flag
somewhere before t_relay
Finally, do t_on_reply() and t_on_branch() already create the
transaction or is it created with t_relay()?
Thanks
Klaus