when using mongodb with jansson, intermittent failures will be seen because
jansson would change the order of keys inside a json object. mongodb would
expect the first key to be a command, for example "insert". this is
disastrous! below is a fix for jansson which will preserve the order on
which the json object was created.
--- modules/jansson/jansson_utils.c.old 2015-07-06 17:41:25.852770681 +0800
+++ modules/jansson/jansson_utils.c 2015-07-06 17:42:27.384769579 +0800
@@ -33,7 +33,7 @@
val->flags = 0;
if(json_is_object(v) || json_is_array(v)) {
- const char* value = json_dumps(v, JSON_COMPACT);
+ const char* value = json_dumps(v, JSON_COMPACT|JSON_PRESERVE_ORDER);
*freeme = (char*)value;
val->rs.s = (char*)value;
val->rs.len = strlen(value);
Kelvin Chua
Hello Daniel,
Thank you for reply, based on you example. Can I do some thing like that.
modparam("dispatcher", "dstid_avp", "$avp(dsdst_id)")
switch ($fd) {
case "domain1.tld":
$avp(dsdst_id)=1;
break;
case "domain2.tld":
$avp(dsdst_id)=2;
break;
}
ds_select_dst($avp(dsdst_id),4);
Slava.
From: "Daniel Tryba" <d.tryba(a)pocos.nl>
To: "sr-users" <sr-users(a)lists.sip-router.org>
Sent: Friday, July 3, 2015 6:18:03 AM
Subject: Re: [SR-Users] dispather
On Thursday 02 July 2015 09:12:41 Slava Bendersky wrote:
> Is dispatcher module can do call routing based on domain ?
> This only inbound traffic.
> So if call come from @domain1.tld -----> asterisk box 1 @domain2.tld ----->
> asterisk box 2.
Sure, just make the dispatcher target dynamic with an avp:
if($fd=="domain1.tld")
{
$avp(dispatcher_id)=1;
}
...
ds_select_dst($avp(dispatcher_id),4);
_______________________________________________
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
Hey guys, new to kamailio, keep getting stuck on step 7 - creating first
database.Can you assist? see below:
root@telephonepros:~# /usr/local/sbin/kamdbctl create
/usr/local/etc/kamailio//kamctlrc: line 13: =/path/to/chrooted/directory:
No such file or directory
MySQL password for root:
INFO: test server charset
/usr/local/lib/kamailio//kamctl/kamdbctl.mysql: line 105: mysql: command
not found
/usr/local/lib/kamailio//kamctl/kamdbctl.mysql: line 106: mysql: command
not found
Usage: grep [OPTION]... PATTERN [FILE]...
Try 'grep --help' for more information.
/usr/local/lib/kamailio//kamctl/kamdbctl.mysql: line 112: [: =: unary
operator expected
INFO: creating database kamailio ...
/usr/local/lib/kamailio//kamctl/kamdbctl.mysql: line 71: mysql: command not
found
ERROR: Creating database kamailio failed!
root@telephonepros:~#
Hi
Im installing Siremis 4.2 and getting this error when login. INstallation
Wizard was fine and all dependencies are installed following Asipto Guide
for Siremis.
Any idea what could be wrong?
Popup i get is..
{"target":"ERROR","content":"
\n[2015-07-03 10:04:05 (GMT)] An exception occurred while executing this
script:
\nError message: #8192, Non-static method BizSystem::getConfiguration()
should not be called statically, assuming $this from incompatible
context<\/font>
\nScript name and line number of error:
\/var\/www\/siremis-4.2.0\/openbiz\/bin\/data\/BizDataObj_Abstract.php:268<\/font>
\n
*function:<\/b> errorHandler ( 8192, \"Non-static method
BizSystem::getConfiguration() should not be ca...\",
\"\/var\/www\/siremis-4.2.0\/openbiz\/bin\/data\/BizDataObj_Abstract.php\",
268, Array(0) ) @ \/var\/www\/siremis-4.2.0\/openbiz\/bin\/sysheader.inc
117\nfunction:<\/b> userErrorHandler ( 8192, \"Non-static method
BizSystem::getConfiguration() should not be ca...\",
\"\/var\/www\/siremis-4.2.0\/openbiz\/bin\/data\/BizDataObj_Abstract.php\",
268, Array(0) ) @
\/var\/www\/siremis-4.2.0\/openbiz\/bin\/data\/BizDataObj_Abstract.php
268\nfunction:<\/b> setQuoteIdentifiers ( ) @
\/var\/www\/siremis-4.2.0\/openbiz\/bin\/data\/BizDataObj_Abstract.php
177\nfunction:<\/b> __construct ( Array(1) ) @
\/var\/www\/siremis-4.2.0\/openbiz\/bin\/data\/BizDataObj.php
37\nfunction:<\/b> __construct ( Array(1) ) @
\/var\/www\/siremis-4.2.0\/openbiz\/bin\/ObjectFactory.php
166\nfunction:<\/b> constructObject ( \"system.do.UserDO\" ) @
\/var\/www\/siremis-4.2.0\/openbiz\/bin\/ObjectFactory.php
56\nfunction:<\/b> getObject ( \"system.do.UserDO\", 0 ) @
\/var\/www\/siremis-4.2.0\/openbiz\/bin\/BizSystem.php 252\nfunction:<\/b>
getObject ( \"system.do.UserDO\" ) @
\/var\/www\/siremis-4.2.0\/siremis\/modules\/service\/authService.php
92\nfunction:<\/b> authDBUser ( \"admin\", \"admin\" ) @
\/var\/www\/siremis-4.2.0\/siremis\/modules\/service\/authService.php
66\nfunction:<\/b> authenticateUser ( \"admin\", \"admin\" ) @
\/var\/www\/siremis-4.2.0\/siremis\/modules\/user\/form\/LoginForm.php
92\nfunction:<\/b> Login ( ) @
\/var\/www\/siremis-4.2.0\/openbiz\/bin\/BizController.php
310\nfunction:<\/b> invoke ( ) @
\/var\/www\/siremis-4.2.0\/openbiz\/bin\/BizController.php
110\nfunction:<\/b> dispatchRequest ( ) @
\/var\/www\/siremis-4.2.0\/openbiz\/bin\/BizController.php
32\nfunction:<\/b> include_once (
\"\/var\/www\/siremis-4.2.0\/openbiz\/bin\/BizController.php\" ) @
\/var\/www\/siremis-4.2.0\/siremis\/bin\/controller.php
6<\/div>\n------------------------------Please ask system administrator for
help...<\/div>\n"}]*
*BR*
Hello,
I'm doing a subst on the From header for some particular cases, like this
one: subst('/^(From|f):(.*)<sip:(.*)@/\1: "Anonymous" <sip:\3@/g');
In the same route (REQUEST_ROUTE called "INVITE"), I do the following:
insert_hf("X-CarrierName: $avp(s:carrier_id)\r\n");
For many User-Agent, the X-CarrierName header is inserted after the @ into
the user part of the From. So the From: looks like this:
From:"Anonymous" <sip:0123456789@X-CarrierName: ABCDE\r\n
The domain name part of the From is on the next line:
<domain>:5060>;tag=3fdce0-a658bfa-13c4-50029-55941ccd-5eab9369-55941ccd\r\n
I can't reproduce.
The only potential explanation is that this impact the User-Agent that have
the From at the top of the headers.
If someone know what could going wrong here.
Regards,
Igor
Hi All,
I am trying to use Cx (Diameter) interface via TCP towards our HSS
according to Carsten Bock example.
However kamailio client obtain TCP RST from HSS because a kamailio source
port is different than port where kamailio is listen. I do not know if this
is Diameter/Cx requirement or not. I did not find it in specifications. Is
there any way how to ensure that kamailio use same port number for source
and destination (3869)?.
<?xml version="1.0" encoding="UTF-8"?>
<DiameterPeer
FQDN="...3gppnetwork.org"
Realm="...3gppnetwork.org"
Vendor_Id="10415"
Product_Name="CDiameterPeer"
AcceptUnknownPeers="1"
DropUnknownOnDisconnect="1"
Tc="30"
Workers="4"
QueueLength="8"
TransactionTimeout="5"
SessionsHashSize="128"
DefaultAuthSessionTimeout="3600"
MaxAuthSessionTimeout="3600"
>
<Peer FQDN="hss....3gppnetwork.org" Realm=".3gppnetwork.org"
port="3868"/>
<Acceptor port="3869" />
<Auth id="16777216" vendor="10415"/> <!--3GPP CxDX -->
<Realm name="....3gppnetwork.org">
<Route FQDN="hss...3gppnetwork.org" metric="10"/>
</Realm>
<DefaultRoute FQDN="hss.....3gppnetwork.org" metric="10"/>
</DiameterPeer>
Thanks
Peter
Hi,
Can anyone help with a segment fault we had today please?
Our Kamailio has been running for months with no problem but today we received this error 3 times and Kamailio stopped.
Jul 1 12:48:43 sipa kernel: kamailio[2853]: segfault at 7f516819f6fc ip 00007f516a51c4a6 sp 00007fffd0fbe420 error 7 in pv.so[7f516a510000+36000]
The full log files are attached for the three seg faults.
Regards,
[cid:image001.jpg@01CFEF9D.A1F537A0]
Nick Raper
Infrastructure Engineer
4th Dimension Technology | South Africa
Office: +27 21 506 6260 | 24 hour helpline: +27 21 506 6260 | Fax: +27 86 610 5792
Email: nick(a)4dt.co.za<mailto:nick@4dt.co.za> | Web: www.4dt.co.za<http://www.4dt.co.za/>
P Please consider the environment before printing this email
Hello Everyone,
Is dispatcher module can do call routing based on domain ?
This only inbound traffic.
So if call come from @domain1.tld -----> asterisk box 1 @domain2.tld -----> asterisk box 2.
Or which way is better to achieve it ?
Thank you.
Hello,
If the 'wdir' (or 'workdir') is not set in kamctl.cfg or WITH_AUTH feature
is not defined,
kamailio can normally be started.
Actually , the purpose is thatI want to add the 'wdir' to set the path
coredump file...
And ther error logs like following: (modified for hiding private info)
./kamailio[3565]: ERROR: <core> [sr_module.c:923]: init_mod_child(): Error
while initializing module auth_db
(/xxx/kamailio/lib/kamailio/modules/auth_db.so)
./kamailio[3565]: ERROR: <core> [pt.c:341]: fork_process(): init_child
failed for process 2, pid 3565, "udp receiver child=0 sock=10.100.90.62:5060
(10.100.90.62:5060)"
./kamailio[3565]: CRITICAL: <core> [main.c:1621]: main_loop(): Cannot fork
./kamailio[3568]: ERROR: db_sqlite [dbase.c:67]:
db_sqlite_new_connection(): failed to open sqlite database 'tmp/SQLITE_DB'
./kamailio[3564]: ERROR: db_sqlite [dbase.c:67]:
db_sqlite_new_connection(): failed to open sqlite database 'tmp/SQLITE_DB'
./kamailio[3568]: ERROR: <core> [db.c:322]: db_do_init2(): could not add
connection to the pool
./kamailio[3568]: ERROR: auth_db [authdb_mod.c:172]: child_init(): unable
to connect to the database
./kamailio[3568]: ERROR: <core> [sr_module.c:923]: init_mod_child(): Error
while initializing module auth_db
(/xxx/kamailio/lib/kamailio/modules/auth_db.so)
./kamailio[3568]: ERROR: <core> [mi.c:128]: init_mi_child(): failed to init
proc rpc for sip handling
./kamailio[3564]: ERROR: <core> [db.c:322]: db_do_init2(): could not add
connection to the pool
./kamailio[3564]: ERROR: auth_db [authdb_mod.c:172]: child_init(): unable
to connect to the database
./kamailio[3568]: CRITICAL: mi_fifo [mi_fifo.c:233]: fifo_process(): Failed
to init the mi process
./kamailio[3564]: ERROR: <core> [sr_module.c:923]: init_mod_child(): Error
while initializing module auth_db
(/xxx/kamailio/lib/kamailio/modules/auth_db.so)
./kamailio[3564]: ERROR: <core> [pt.c:341]: fork_process(): init_child
failed for process 1, pid 3564, "udp receiver child=0
sock=[2010:0:0:0:0:0:0:1]:5060"
./kamailio[3567]: CRITICAL: <core> [main.c:1693]: main_loop(): cannot fork
timer process
./kamailio[3569]: ERROR: db_sqlite [dbase.c:67]:
db_sqlite_new_connection(): failed to open sqlite database 'tmp/SQLITE_DB'
./kamailio[3569]: ERROR: <core> [db.c:322]: db_do_init2(): could not add
connection to the pool
./kamailio[3564]: CRITICAL: <core> [main.c:1621]: main_loop(): Cannot fork
./kamailio[3569]: ERROR: auth_db [authdb_mod.c:172]: child_init(): unable
to connect to the database
./kamailio[3569]: ERROR: <core> [sr_module.c:923]: init_mod_child(): Error
while initializing module auth_db
(/xxx/kamailio/lib/kamailio/modules/auth_db.so)
./kamailio[3569]: ERROR: <core> [pt.c:341]: fork_process(): init_child
failed for process 6, pid 3569, "ctl handler"
./kamailio[3569]: ERROR: <core> [sr_module.c:923]: init_mod_child(): Error
while initializing module ctl (/xxx/kamailio/lib/kamailio/modules/ctl.so)
./kamailio[3569]: ERROR: <core> [main.c:1707]: main_loop(): error in
init_child
./kamailio[3563]: ALERT: <core> [main.c:781]: handle_sigs(): child process
3565 exited normally, status=255
./kamailio[3563]: ALERT: <core> [main.c:781]: handle_sigs(): child process
3566 exited normally, status=255
./kamailio[3572]: ERROR: db_sqlite [dbase.c:67]:
db_sqlite_new_connection(): failed to open sqlite database 'tmp/SQLITE_DB'
./kamailio[3572]: ERROR: <core> [db.c:322]: db_do_init2(): could not add
connection to the pool
./kamailio[3572]: ERROR: auth_db [authdb_mod.c:172]: child_init(): unable
to connect to the database
./kamailio[3572]: ERROR: <core> [sr_module.c:923]: init_mod_child(): Error
while initializing module auth_db
(/xxx/kamailio/lib/kamailio/modules/auth_db.so)
./kamailio[3572]: ERROR: <core> [pt.c:341]: fork_process(): init_child
failed for process 9, pid 3572, "RTIMER SEC EXEC"
./kamailio[3572]: ERROR: rtimer [rtimer_mod.c:164]: child_init(): failed to
start timer routine as process
./kamailio[3572]: ERROR: <core> [sr_module.c:923]: init_mod_child(): Error
while initializing module rtimer
(/xxx/kamailio/lib/kamailio/modules/rtimer.so)
./kamailio[3572]: ERROR: <core> [main.c:1707]: main_loop(): error in
init_child
./kamailio[3573]: ERROR: db_sqlite [dbase.c:67]:
db_sqlite_new_connection(): failed to open sqlite database 'tmp/SQLITE_DB'
./kamailio[3573]: ERROR: <core> [db.c:322]: db_do_init2(): could not add
connection to the pool
./kamailio[3573]: ERROR: auth_db [authdb_mod.c:172]: child_init(): unable
to connect to the database
./kamailio[3573]: ERROR: <core> [sr_module.c:923]: init_mod_child(): Error
while initializing module auth_db
(/xxx/kamailio/lib/kamailio/modules/auth_db.so)
./kamailio[3571]: ERROR: db_sqlite [dbase.c:67]:
db_sqlite_new_connection(): failed to open sqlite database 'tmp/SQLITE_DB'
./kamailio[3573]: ERROR: <core> [pt.c:479]: fork_tcp_process(): init_child
failed for process 10, pid 3573, "tcp receiver (generic) child=0"
./kamailio[3571]: ERROR: <core> [db.c:322]: db_do_init2(): could not add
connection to the pool
./kamailio[3573]: ERROR: <core> [tcp_main.c:4869]: tcp_init_children():
fork failed: No such file or directory
./kamailio[3571]: ERROR: auth_db [authdb_mod.c:172]: child_init(): unable
to connect to the database
./kamailio[3571]: ERROR: <core> [sr_module.c:923]: init_mod_child(): Error
while initializing module auth_db
(/xxx/kamailio/lib/kamailio/modules/auth_db.so)
./kamailio[3571]: ERROR: <core> [pt.c:341]: fork_process(): init_child
failed for process 8, pid 3571, "Dialog Clean Timer"
./kamailio[3571]: ERROR: dialog [dialog.c:742]: child_init(): failed to
start clean timer routine as process
./kamailio[3571]: ERROR: <core> [sr_module.c:923]: init_mod_child(): Error
while initializing module dialog
(/xxx/kamailio/lib/kamailio/modules/dialog.so)
./kamailio[3571]: ERROR: <core> [main.c:1707]: main_loop(): error in
init_child
Thanks in advance. :)