I have deployed two kamailio servers with independent domain names, BOTH
sharing the same database.
When an "INVITE" packet approaches one server from a user. As per my
understanding it checks "Location Table" (containing online users) to find
about status (online or not) of called user.
If user is present in LOCATION TABLE, kamailio server sends INVITE to callee
else it disconnects the call.
In LOCATION TABLE, DOMAIN NAME is also mentioned along with user name, I
want to extract that domain name of callee user from LOCATION TABLE with
every INVITE packet. What variable stores this information ?? How can it be
extracted ??
I have tried using "$du". It consumes RURI and gives domain name, it picks
domain name from invite packet, which is not required here. Requirement is
to pick domain name from LOCATION TABLE, by which user is logged into the
system. (In multidomain setup, they both can be different).
I have also tried "$td", they also pick domain name from INVITE packet
header. I want to print (i.e xlog) value of domain from the LOCATION TABLE.
And it is bothering for quite a few days now. Any help will be much
appreciated.
Thanks.
Regards,
Aawaise.
--
View this message in context: http://sip-router.1086192.n5.nabble.com/Issue-in-Multi-Domain-Environment-t…
Sent from the Users mailing list archive at Nabble.com.
Hi,
After few days of running kamailio (I am using TLS for client), suddenly I
see that the connections are being dropped.
When I restart kamailio, I see following errors:
Stopping kamailio: [FAILED]
Not starting : invalid configuration file!
0(20563) : <core> [mem/shm_mem.c:168]: shm_getmem(): ERROR: shm_mem_init:
could not attach shared memory segment: Cannot allocate memory
0(20563) : <core> [mem/mem.c:125]: init_shm_mallocs(): could not
initialize shared memory pool, exiting...
Too much shared memory demanded: 4294967296
0(20563) ERROR: <core> [sr_module.c:627]: load_module(): ERROR:
load_module: /usr/lib64/kamailio/modules/tls.so: mod_register failed
0(20563) : <core> [cfg.y:3408]: yyerror_at(): parse error in config file
/etc/kamailio/kamailio.cfg, line 328, column 12-19: failed to load module
0(20563) : <core> [mem/shm_mem.c:168]: shm_getmem(): ERROR: shm_mem_init:
could not attach shared memory segment: Cannot allocate memory
0(20563) : <core> [mem/mem.c:125]: init_shm_mallocs(): could not
initialize shared memory pool, exiting...
Too much shared memory demanded: 4294967296
0(20563) : <core> [cfg.y:3411]: yyerror_at(): parse error in config file
/etc/kamailio/kamailio.cfg, line 357, column 71: Can't initialize shared
memory
ERROR: bad config file (2 errors)
0(20563) ERROR: mi_fifo [mi_fifo.c:271]: mi_destroy(): FIFO stat failed:
Bad address
My shared memory size for the kamailio is 4096M.
It started fine initially. However, after I noticed connection drops, I see
the above
issue.
THen I reduced shared memory to 2048M and it started fine.
I am under the impression that shared memory is just a filed I/O mapped
which can be several hundred gigs.
I looked at my filesystem. It looks fine
df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda3 958788080 200734800 709349640 23% /
tmpfs 3975996 0 3975996 0% /dev/shm
/dev/sda1 495844 37498 432746 8% /boot
What could be wrong here?
Any help greatly appreciated.
Krish Kurapati
Hello,
I had a memory issue this morning.
First, I could see the following logs in /var/log/message :
May 12 11:08:21 localhost /usr/local/sbin/kamailio[30268]: ERROR: <core>
[rvalue.c:2370]: rval_expr_eval(): rv eval int expression: out of memory
May 12 11:08:25 localhost /usr/local/sbin/kamailio[30268]: ERROR: <core>
[msg_translator.c:2164]: build_res_buf_from_sip_req(): ERROR:
build_res_buf_from_sip_req: out of memory ; needs 482
May 12 11:08:26 localhost /usr/local/sbin/kamailio[30268]: ERROR: <core>
[msg_translator.c:2012]: build_res_buf_from_sip_res(): ERROR:
build_res_buf_from_sip_res: out of mem
May 12 11:08:27 localhost /usr/local/sbin/kamailio[30268]: ERROR: <core>
[msg_translator.c:1910]: build_req_buf_from_sip_req(): ERROR:
build_req_buf_from_sip_req: out of memory
May 12 11:08:28 localhost /usr/local/sbin/kamailio[30268]: ERROR: <core>
[rvalue.c:2370]: rval_expr_eval(): rv eval int expression: out of memory
May 12 11:08:31 localhost /usr/local/sbin/kamailio[30268]: ERROR: <core>
[msg_translator.c:1910]: build_req_buf_from_sip_req(): ERROR:
build_req_buf_from_sip_req: out of memory
May 12 11:08:32 localhost /usr/local/sbin/kamailio[30268]: ERROR: <core>
[db_res.c:181]: db_allocate_rows(): no private memory left
May 12 11:08:32 localhost /usr/local/sbin/kamailio[30268]: ERROR: db_mysql
[km_res.c:175]: db_mysql_convert_rows(): could not allocate rows
May 12 11:08:32 localhost /usr/local/sbin/kamailio[30268]: ERROR: db_mysql
[km_res.c:217]: db_mysql_convert_result(): error while converting rows
May 12 11:08:32 localhost /usr/local/sbin/kamailio[30268]: ERROR: db_mysql
[km_dbase.c:191]: db_mysql_store_result(): error while converting result
May 12 11:08:33 localhost kernel: kamailio[30268]: segfault at 30 ip
00007ff44dd93f93 sp 00007fffcb00a200 error 4 in
db_mysql.so[7ff44dd8f000+19000]
May 12 11:08:37 localhost /usr/local/sbin/kamailio[30235]: ALERT: <core>
[main.c:788]: handle_sigs(): child process 30268 exited by a signal 11
May 12 11:08:37 localhost /usr/local/sbin/kamailio[30235]: ALERT: <core>
[main.c:791]: handle_sigs(): core was generated
May 12 11:08:37 localhost /usr/local/sbin/kamailio[30235]: INFO: <core>
[main.c:803]: handle_sigs(): INFO: terminating due to SIGCHLD
This problem have already occurred and I have set -M 64 to avoid it. It
looks that it's not enough anymore.
What is the next increment recommended after 64M?
On the contrary of the first occurrence, Kamailio crash with coredump just
after these errors. I'm not sure that the memory message errors are linked
to the crash. I have tried a "bt full":
(gdb) bt full
#0 db_mysql_store_result (_h=0x7ff44e0e70e0, _r=0x7fffcb00a408) at
km_dbase.c:198
code = <value optimized out>
__FUNCTION__ = "db_mysql_store_result"
#1 0x00007ff44d971e72 in db_do_query_internal (_h=0x7ff44e0e70e0,
_k=0x7fffcb00a3e0, _op=0x0, _v=0x7fffcb00a3a0, _c=<value optimized out>,
_n=<value optimized out>, _nc=2, _o=0x0, _r=0x7fffcb00a408,
val2str=0x7ff44dd97fa0 <db_mysql_val2str>,
submit_query=0x7ff44dd92ed0 <db_mysql_submit_query>,
store_result=0x7ff44dd93d80 <db_mysql_store_result>, _l=0) at db_query.c:137
tmp = <value optimized out>
off = <value optimized out>
ret = <value optimized out>
__FUNCTION__ = "db_do_query_internal"
#2 0x00007ff44d97269a in db_do_query (_h=<value optimized out>, _k=<value
optimized out>, _op=<value optimized out>,
_v=<value optimized out>, _c=<value optimized out>, _n=<value optimized
out>, _nc=2, _o=0x0, _r=0x7fffcb00a408,
val2str=0x7ff44dd97fa0 <db_mysql_val2str>, submit_query=0x7ff44dd92ed0
<db_mysql_submit_query>,
store_result=0x7ff44dd93d80 <db_mysql_store_result>) at db_query.c:156
Thanks in advance for your help.
Regards,
Igor.
HI ,
How do I find out which udp ports my kamailio server is using. In
Kamailio.cfg I am using socket like below.
#!ifdef WITH_NAT
# ----- rtpproxy params -----
#modparam("rtpproxy", "rtpproxy_sock", "udp:127.0.0.1:7722")
modparam("rtpproxy", "rtpproxy_sock",
"unix:/var/run/rtpproxy/rtpproxy.sock")
I need to know the exact port range to open ports on my firewall if
necessary. Our Kamailio server works just fine outside our network, but when
I try to make calls through linphone client using a android device inside
our network, as soon as I pick up the call it gets disconnected. The same
thing happens when someone from outside tries to call in to our network.
Funny part is when I use a desktop client like jitsi the calls between 2
users in the network or with someone outside the network work fine. I am
guessing the rtp traffic is being dropped by the firewall when using
linphone android client. It was working fine previously but after a firewall
OS update it stopped working.
Best Regards,
Neville D'Souza
Network Administrator
r_gogopay_96x73
Gogopay Online Pvt Ltd.
India +91 832 222 0119
ncd(a)gogopay.com
www.gogopay.com
Hi, all.
I has set up a Kamailio server with TLS & compression enabled, I
thought I set most things suitable ,
I has set
modparam("tls","tls_disable_compression",0)
I can find such log records as below when Kamailio boost:
0(10905) INFO: tls [tls_init.c:549]: init_tls_h(): tls: _init_tls_h:
compiled with openssl version "OpenSSL 1.0.0-fips 29 Mar 2010"
(0x10000003), kerberos support: on, compression: on
0(10905) INFO: tls [tls_init.c:557]: init_tls_h(): tls: init_tls_h:
installed openssl library version "OpenSSL 1.0.0-fips 29 Mar 2010"
(0x10000003), kerberos support: on, zlib compression: on
compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT
-DDSO_DLFCN -DHAVE_DLFCN_H -DKRB5_MIT -m64 -DL_ENDIAN -DTERMIO -Wall -O2 -g
-pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -Wa,--noexecstack
-DMD32_REG_T=int -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DSHA1_ASM
-DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DWHIRLPOOL_ASM
0(10905) WARNING: tls [tls_init.c:611]: init_tls_h(): tls: openssl bug
#1491 (crash/mem leaks on low memory) workaround enabled (on low memory tls
operations will fail preemptively) with free memory thresholds 11534336 and
5767168 bytes
0(10905) INFO: <core> [cfg/cfg_ctx.c:613]: cfg_set_now(): INFO:
cfg_set_now(): tls.low_mem_threshold1 has been changed to 11534336
0(10905) INFO: <core> [cfg/cfg_ctx.c:613]: cfg_set_now(): INFO:
cfg_set_now(): tls.low_mem_threshold2 has been changed to 5767168
And I run
kamcmd tls.options,
I got:
{
force_run: 0
method: TLSv1
verify_certificate: 0
verify_depth: 9
require_certificate: 0
private_key: /ca/cert.pem
ca_list:
certificate: /ca/cert.pem
cipher_list:
session_cache: 1
session_id: vic22
config: /etc/kamailio/tls.cfg
log: 3
debug: 3
connection_timeout: 600
disable_compression: 0
ssl_release_buffers: -1
ssl_freelist_max: -1
ssl_max_send_fragment: -1
ssl_read_ahead: 0
send_close_notify: 0
low_mem_threshold1: 11534336
low_mem_threshold2: 5767168
ct_wq_max: 10485760
con_ct_wq_max: 65536
ct_wq_blk_size: 4096
}
But when My UA connect to this server, when TLS handshake, I can find that
the clienthello with two compression method :1 (deflate) and 0 (null), but
the server side reply with just one compression method: 0( null), thus the
compression was disabled through the following communication.
Why? are there any others issue can impact the behavior of Kamailio?
Any hints will be appreciated.
B.R.
Rixin liu
Hi all,
i'm a little bit confused about the #children/PKG_MEM mechanism: in my
setup (a simple IMS core with one P-CSCF, one I-CSCF, one dispatcher and 2
S-CSCFs) i wish to manage the highest possible #calls, but i don't know
which is the ideal setup. I mean, i'm running all this components in VMs
(with mem = 2048MB and smp = 8) inside a desktop machine with RAM = 32 GB
and 8 processors; is it worth to define #children = #processors and setting
an high value of PKG_MEM (for example 128MB) or use an higher #children
(for example 64) with less PKG_MEM (for example 16MB)? Someone could
explain me better how the mechanism works? Thank you,
Andrea
Hello,
Which versions of Kamailio (OpenSER) are officially supported (e.g.
actively patched) ?
Is there a list of EOL dates for all versions or what is the general rule?
Kind regards
Jan
--
*Jan **Gaida*
Ingeniero Desarrollo Software C/ Marconi 3 (PTM)
28760 Tres Cantos
Spain
jan.gaida(a)grupoamper.com | www.grupoamper.com
--
This message and any attachments are intended only for the use of the
individual to whom they are addressed and it may contain information that
is privileged or confidential. If you have received this communication by
mistake, please notify us immediately by e-mail or telephone.The storage,
recording, use or disclosure of this e-mail and its attachments by anyone
other than the intended recipient is strictly prohibited. This message has
been verified using antivirus software; however, the sender is not
responsible for any damage to hardware or software resulting from the
presence of any virus.
Este mensaje y cualquier anexo son exclusivamente para la persona a quien
van dirigidos y pueden contener información privilegiada o confidencial. Si
usted ha recibido esta comunicación por error, le agradecemos notificarlo
de inmediato por esta misma vía o por teléfono. Está prohibida su
retención, grabación, utilización o divulgación con cualquier propósito.
Este mensaje ha sido verificado con software antivirus; sin embargo, el
remitente no se hace responsable en caso de que en éste o en los archivos
adjuntos haya presencia de algún virus que pueda generar daños en los
equipos o programas del destinatario.
Hi,
I'm using kamailio from latest git-HEAD. The rtpproxy i'm using also
from latest git.
Our network topology is following :
sip-softphone--------->kamailio/rtpproxy-------->softswitch---->gateway
Because of saving bandwidth we need to use the "re-packetization"
feature of rtpproxy.
When we don't use it, it works perfectly without any glitches.
Now if we use the repacketization feature like following :
if (is_request()) {
rtpproxy_manage("co");
}
if (is_reply()) {
rtpproxy_manage("z80");
}
Then a bizzare thing happens. Suddenly rtp packets from gateway stops
coming. So we don't have any voice in softphone, although everything
seems ok at the "mobile phone's end."
This is bizzare at multiple levels, as you can see we are using
repacketize feature to increase the payload size from "proxy to
softphone" leg. So we actually don't touch the packets from "softphone
to proxy" leg. So how the gateway predicts this and decides not to
send packets is beyond my understanding.
As far as i can understand, rtpproxy_manage() is doing something to
SDP which makes it impossible to send packets through the proxy.
I will provide further information if anybody wants to look at it.
Thanks in advance.
--
-Cheers
-Arif
Hello, all of users:
I am confused here, my kamalio is stopped, but kamctl online and ul show
still can see the user info:
============================================
root@kamailio:/home/admin_1# kamctl online
102
root@kamailio:/home/admin_1# kamctl online
102
root@kamailio:/home/admin_1# kamctl online
102
root@kamailio:/home/admin_1# service kamailio status
Status of Kamailio: kamailio is not running.
root@kamailio:/home/admin_1# kamctl ul show
Domain:: location table=512 records=1 max_slot=1
AOR:: 102
Contact:: sip:102@192.168.1.105:5060 Q=
Expires:: 313
Callid:: 363490571-5060-1(a)BJC.BGI.B.BAF
Cseq:: 2117
User-agent:: Grandstream GXP2124 1.0.4.10
State:: CS_SYNC
Flags:: 0
Cflag:: 0
Socket:: udp:192.168.1.116:5060
Methods:: 7135
Ruid:: uloc-536d9a68-6a5-1
Instance::
<urn:uuid:00000000-0000-1000-8000-000B824017A0>
Reg-Id:: 1
root@kamailio:/home/admin_1#
==========================================
Does kamctl only receive the data from mysql, no matter kamctl status?
--
*Best regards*
Hi,
I am having a slight issue with Kamilio server. How do I disconnect users
without restarting the server. When I run the command kamctl ul users i get
the list of users connected, some that are already disconnected. I am using
the Linphone android client to coonect through 5060 port. Kindly advise
Best Regards,
Neville D'Souza
Network Administrator
r_gogopay_96x73
Gogopay Online Pvt Ltd.
India +91 832 222 0119
ncd(a)gogopay.com
www.gogopay.com