Hi Developers,
I need help to log the call flow in a file. Our purpose to have only one
entry per call in a file based system at the end of the call.
For example:
CALL-ID TO FROM START
TIME END TIME .... MISSED COMPLETED
1 sip:1@abc.com sip:100@abc.com 2017-07-28
18:29:14 2017-07-28 18:29:14 yes no
2 sip:2@abc.com sip:100@abc.com 2017-07-28
18:29:14 2017-07-28 18:29:14 no yes
3 sip:3@abc.com sip:100@abc.com 2017-07-28
18:29:14 2017-07-28 18:29:14 no yes
I have gone through various trace module, but its appear that all module
record the call flow/logs in database. ie siptrace,acc,dialoge module.
Could you please help me to log the information. one of the approach I have
thought to store all the variable in AVP variables in
request_route,failure_route,on_reply route..etc
For ex.
$avp(from)=$fu;
$avp(to)=$tu;
$avp(starttime)=startime
$avp(endtime)=endtime
etc...
//log at call end in a seperate logs file
and xlog("LOG_INFO",$avp(from),,$avp(to),$avp(starttime),$avp(endtime))
Please let know if this approach is correct or any other way to achieve
this,
Thanks,
Amit
Hello all,
I have been toying with kamailio lately, and I thought I had gotten to the
point where I had a mostly working (tm) prototype. I gave it a test drive
with some real calls, however, and an issue manifested at least once, where
homer received packets originating from the kamailio host, and whose
destination was also the kamailio host.
The dialog this manifested in is a generally problematic one, with many
retransmissions occurring because of slow database access (I haven't
implemented htable caching yet). No packet capture over the network is
actually taking place, I'm copying everything to homer with "trace_mode"set
to 1.
Homer shows these messages like in the screenshot:
https://imagebin.ca/v/3VGJAmovRBmo. Here's an example of a packet:
2017-07-28 14:32:29 +0300 : 2.3.4.5:5060 -> 2.3.4.5:5060
INVITE sip:1234567890@kamailio-server.org SIP/2.0
Record-Route: <sip:2.3.4.5;lr;ftag=as491cec82>
Via: SIP/2.0/UDP
2.3.4.5;branch=z9hG4bK0cf.07799e3eb71f33a9ef91178ac760ebd2.0
Via: SIP/2.0/UDP
2.3.4.5;branch=z9hG4bKsr-BnCVyrWoUladI14pU7Pry-Pzy-ONy-VSQ74NU7HzeYazq2nFU2Oc5FIWiGIKq-HXex1oONpam-C6IrIXkr4FQxZRh7sM
Max-Forwards: 69
From: <sip:subscriber@5.4.3.2:5061>;tag=as491cec82
To: <sip:1234567890@kamailio-server.org>
Contact:
<sip:2.3.4.5;line=sr-eNC05xhKefQnON1EglFrOkF0OfpzV2s9UzM9UXMNQXMn5-B0Q-s*>
Call-ID: 4e5d22c3369704b97d866c8d0f3798f8@192.168.201.2:5061
CSeq: 103 INVITE
User-Agent: Asterisk PBX 11.13.1~dfsg-2~bpo70+1
Date: Fri, 28 Jul 2017 11:32:24 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH, MESSAGE
Supported: replaces, timer
Remote-Party-ID: "9876543210" <sip:9876543210@192.168.201.2
>;party=calling;privacy=off;screen=yes
Content-Type: application/sdp
Content-Length: 500
v=0
o=root 242468242 242468243 IN IP4 172.17.130.13
s=Asterisk PBX 11.13.1~dfsg-2~bpo70+1
c=IN IP4 172.17.130.13
t=0 0
m=audio 59426 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:50
a=sendrecv
a=rtcp:59427
a=ice-ufrag:hffIoy6x
a=ice-pwd:nXB8ip7Qz8ZG5yyZRr97kGJbej
a=candidate:igct4zWHEzhGCjWc 1 UDP 2130706431 172.17.130.13 59426 typ host
a=candidate:igct4zWHEzhGCjWc 2 UDP 2130706430 172.17.130.13 59427 typ host
Can something like this be triggered by misconfiguration in the routing
scripts? Should it worry me and should I dig into it more? Could it be a
bug of the siptrace module and nothing bad actually took place? I'm not
sure where to start with this, so any input would be greatly appreciated.
Thanks!
Hello,
I plan to add some rate limiting in the Kamailio. I'm already using Pike to rate limit based on the source IP.
But in this case, i want to do the rate limiting per customer(regardless of the source IP), I can identify the customer based on a custom
header in the INVITE, idea is to limit the customer to 'x' number of requests per second.
Nitesh
Hello,
We're configuring Kamailio 4.2 with rtpengine to act as a midpoint between
a telephone using TLS/SRTP and Asterisk. There are examples out there for
TLS/SRTP with WebRTC, but we're using a plain hard phone, not WebRTC.
Would anyone be able to point us towards a Kamaiio configuration which:
a) Tests if the destination phone (stored using usrloc) uses TLS.
b) Sends RTP for calls to a TLS phone to rtpengine to be encrypted. We can
assume all phones using TLS want to use SRTP.
Thanks very much in advance.
--
David Cunningham, Voisonics Limited
http://voisonics.com/
USA: +1 213 221 1092
Australia: +61 (0) 2 8063 9019
Hi,
I have been trying to install kamaiio and its dependencies but its giving
the same error everytime i try to install it via apt. Following is my
terminal error message.
sudo apt install kamailio kamailio-mysql-modules
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer
required:
apache2-data apache2-utils
Use 'sudo apt autoremove' to remove them.
Suggested packages:
kamailio-berkeley-modules kamailio-carrierroute-modules
kamailio-cpl-modules kamailio-ldap-modules kamailio-lua-modules
kamailio-mono-modules kamailio-perl-modules kamailio-postgres-modules
kamailio-presence-modules kamailio-python-modules kamailio-radius-modules
kamailio-redis-modules kamailio-snmpstats-modules kamailio-unixodbc-modules
kamailio-xml-modules kamailio-xmpp-modules
stun-server | turn-server
The following NEW packages will be installed:
kamailio kamailio-mysql-modules
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 6,859 kB of archives.
After this operation, 20.7 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial/universe amd64 kamailio amd64
4.3.4-1.1ubuntu2 [6,772 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial/universe amd64
kamailio-mysql-modules amd64 4.3.4-1.1ubuntu2 [87.8 kB]
Fetched 6,859 kB in 28s (240 kB/s)
Selecting previously unselected package kamailio.
(Reading database ... 249000 files and directories currently installed.)
Preparing to unpack .../kamailio_4.3.4-1.1ubuntu2_amd64.deb ...
Unpacking kamailio (4.3.4-1.1ubuntu2) ...
Selecting previously unselected package kamailio-mysql-modules:amd64.
Preparing to unpack .../kamailio-mysql-modules_4.3.4-1.1ubuntu2_amd64.deb
...
Unpacking kamailio-mysql-modules:amd64 (4.3.4-1.1ubuntu2) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Processing triggers for systemd (229-4ubuntu17) ...
Processing triggers for ureadahead (0.100.0-19) ...
ureadahead will be reprofiled on next reboot
Processing triggers for man-db (2.7.5-1) ...
Setting up kamailio (4.3.4-1.1ubuntu2) ...
Job for kamailio.service failed because the control process exited with
error code. See "systemctl status kamailio.service" and "journalctl -xe"
for details.
invoke-rc.d: initscript kamailio, action "start" failed.
● kamailio.service - Kamailio (OpenSER) - the Open Source SIP Server
Loaded: loaded (/etc/systemd/system/kamailio.service; enabled; vendor
preset: enabled)
Active: failed (Result: exit-code) since Fri 2017-07-28 11:37:22 IST;
24ms ago
Process: 5293 ExecStart=/usr/sbin/kamailio -P
/var/run/kamailio/kamailio.pid -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY -u
$USER -g $GROUP (code=exited, status=255)
Jul 28 11:37:22 coditas-Vostro-3446 systemd[1]: Starting Kamailio (OpenSER)
- the Open Source SIP Server...
Jul 28 11:37:22 coditas-Vostro-3446 kamailio[5293]: ERROR: loading config
file(/usr/local/kamailio-4.4/etc/kamailio/kamailio.cfg): No such file or
directory
Jul 28 11:37:22 coditas-Vostro-3446 systemd[1]: kamailio.service: Control
process exited, code=exited status=255
Jul 28 11:37:22 coditas-Vostro-3446 systemd[1]: Failed to start Kamailio
(OpenSER) - the Open Source SIP Server.
Jul 28 11:37:22 coditas-Vostro-3446 systemd[1]: kamailio.service: Unit
entered failed state.
Jul 28 11:37:22 coditas-Vostro-3446 systemd[1]: kamailio.service: Failed
with result 'exit-code'.
dpkg: error processing package kamailio (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of
kamailio-mysql-modules:amd64:
kamailio-mysql-modules:amd64 depends on kamailio (= 4.3.4-1.1ubuntu2);
however:
Package kamailio is not configured yet.
dpkg: error processing package kamailio-mysql-modules:amd64 (--configure):
dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.23-0ubuntu9) ...
No apport report written because the error message indicates its a followup
error from a previous failure.
Errors were encountered while processing:
kamailio
kamailio-mysql-modules:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
And following is my output when i try to reconfiggure dpkg
sudo dpkg --configure -a
Setting up kamailio (4.3.4-1.1ubuntu2) ...
Job for kamailio.service failed because the control process exited with
error code. See "systemctl status kamailio.service" and "journalctl -xe"
for details.
invoke-rc.d: initscript kamailio, action "start" failed.
● kamailio.service - Kamailio (OpenSER) - the Open Source SIP Server
Loaded: loaded (/etc/systemd/system/kamailio.service; enabled; vendor
preset: enabled)
Active: failed (Result: exit-code) since Fri 2017-07-28 11:39:48 IST;
9ms ago
Process: 5527 ExecStart=/usr/sbin/kamailio -P
/var/run/kamailio/kamailio.pid -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY -u
$USER -g $GROUP (code=exited, status=255)
Jul 28 11:39:48 coditas-Vostro-3446 systemd[1]: Starting Kamailio (OpenSER)
- the Open Source SIP Server...
Jul 28 11:39:48 coditas-Vostro-3446 kamailio[5527]: ERROR: loading config
file(/usr/local/kamailio-4.4/etc/kamailio/kamailio.cfg): No such file or
directory
Jul 28 11:39:48 coditas-Vostro-3446 systemd[1]: kamailio.service: Control
process exited, code=exited status=255
Jul 28 11:39:48 coditas-Vostro-3446 systemd[1]: Failed to start Kamailio
(OpenSER) - the Open Source SIP Server.
Jul 28 11:39:48 coditas-Vostro-3446 systemd[1]: kamailio.service: Unit
entered failed state.
Jul 28 11:39:48 coditas-Vostro-3446 systemd[1]: kamailio.service: Failed
with result 'exit-code'.
dpkg: error processing package kamailio (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of
kamailio-mysql-modules:amd64:
kamailio-mysql-modules:amd64 depends on kamailio (= 4.3.4-1.1ubuntu2);
however:
Package kamailio is not configured yet.
dpkg: error processing package kamailio-mysql-modules:amd64 (--configure):
dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Errors were encountered while processing:
kamailio
kamailio-mysql-modules:amd64
Hello Daniel,
We have upgraded the kamailio version to 5.0.2, But, still kamailio is crashing inconsistent with core dump back trace same as i sent before
can you please help me to resolve this issue
Thanks & Regards
Hemanth
-----Original Message-----
From: "Daniel-Constantin Mierla" <miconda(a)gmail.com>
Sent: Wed, 5 Jul, 2017 at 3:07 pm
To: "hemanth(a)advaitamtech.com" <hemanth(a)advaitamtech.com>
Subject: Re: [SR-Users] Kamailio Crashing inconsistently
Hello,
but you said you run 4.4 series, the version output shows a devel
snapshot from 5.0:
version: kamailio 5.0.0-dev5 (x86_64/linux) 750f98-dirty
You have to upgrade to latest stable 5.0.x, the version you run is not
supposed to be used for production.
Cheers,
Daniel
On 05.07.17 11:22, hemanth(a)advaitamtech.com wrote:
>
>
> Hello Daniel,
>
>
>
> Out put of the command kamailio -v is as below,
>
>
> version: kamailio 5.0.0-dev5 (x86_64/linux) 750f98-dirty
> flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS,
> USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM,
> SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY,
> TIMER_DEBUG, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE,
> USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
> ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
> MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 12MB
> poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
> id: 750f98 -dirty
> compiled on 18:21:17 Jul 4 2017 with gcc 4.8.4
>
>
>
>
>
> I have attached my kamailio.cfg file along with this mail please check
> and help me to resolve this issue
>
>
>
> Thanks & Regards
>
> Hemanth
>
>
>
>
>
>
>
> -----Original Message-----
> From: "Daniel-Constantin Mierla"
> Sent: Wednesday, 5 July, 2017 2:10pm
> To: "Kamailio (SER) - Users Mailing List"
> , "hemanth(a)advaitamtech.com"
>
> Subject: Re: [SR-Users] Kamailio Crashing inconsistently
>
> Hello,
>
> what is the exact version you run (kamailio -v)?
>
> Do you have any custom/private module used in the config?
>
> Cheers,
> Daniel
>
>
> On 05.07.17 09:04, hemanth(a)advaitamtech.com wrote:
>
> Hello,
>
>
>
> I am using Kamailio 4.4, Kamailio is crashing inconsistently, I am
> not able find the root cause of the issue, Error which i get for
> the process which crashed at multiple occations
>
>
>
> kamailio[9137]: : [mem/q_malloc.c:145]: qm_debug_frag():
> BUG: qm_*: prev. fragm. tail overwritten(6363e160b12,
> abcdefed)[0x7f205db59070:0x7f205db590a8]! Memory allocator was
> called from tm: h_table.c:152. Fragment marked by tm: t_reply.c:1903.
>
>
>
> kamailio[21724]: : [mem/q_malloc.c:134]: qm_debug_frag():
> BUG: qm_*: fragm. 0x7f1fe804a1e8 (address 0x7f1fe804a220) end
> overwritten (4ae8cfaec87c0a27, 192f1270797ac90b)! Memory allocator
> was called from tm: h_table.c:179. Fragment marked by core:
> msg_translator.c:2153.
>
>
>
> kamailio[21950]: : [mem/q_malloc.c:134]: qm_debug_frag():
> BUG: qm_*: fragm. 0x7fe541a2cd68 (address 0x7fe541a2cda0) end
> overwritten (c0082c06, abcdefed)! Memory allocator was called from
> tm: h_table.c:179. Fragment marked by core: msg_translator.c:2153.
>
>
>
> kamailio[23200]: : [mem/q_malloc.c:134]: qm_debug_frag():
> BUG: qm_*: fragm. 0x7f1fae7fa260 (address 0x7f1fae7fa298) end
> overwritten (3a46e86e1b362938, 7260f1875617e)! Memory allocator
> was called from tm: h_table.c:179. Fragment marked by core:
> msg_translator.c:2153.
>
>
>
>
>
> There are 2 cores generated whenever it crashes, I have given the
> backtrace of the core generated,
>
>
>
> (gdb) bt
> #0 0x00007fe16aca4c37 in __GI_raise (sig=sig@entry=6) at
> ../nptl/sysdeps/unix/sysv/linux/raise.c:56
> #1 0x00007fe16aca8028 in __GI_abort () at abort.c:89
> #2 0x000000000066b4ac in qm_debug_frag (qm=0x7fe160bc2000,
> f=0x7fe160ec9108, file=0x7fe1684dc84e "tm: h_table.c", line=179)
> at mem/q_malloc.c:147
> #3 0x000000000066e255 in qm_free (qmp=0x7fe160bc2000,
> p=0x7fe160ec9140, file=0x7fe1684dc84e "tm: h_table.c",
> func=0x7fe1684dcb00 "free_cell_helper",
> line=179, mname=0x7fe1684dc250 "tm") at mem/q_malloc.c:480
> #4 0x00007fe16840cab9 in free_cell_helper
> (dead_cell=0x7fe160f09e50, silent=0, fname=0x7fe1684eeb8c
> "timer.c", fline=648) at h_table.c:179
> #5 0x00007fe1684584a7 in wait_handler (ti=1156027084,
> wait_tl=0x7fe160f09ed0, data=0x7fe160f09e50) at timer.c:648
> #6 0x000000000063a329 in timer_list_expire (t=1156027084,
> h=0x7fe160c3faf0, slow_l=0x7fe160c42da8, slow_mark=776) at timer.c:874
> #7 0x000000000063a79d in timer_handler () at timer.c:939
> #8 0x000000000063ac3d in timer_main () at timer.c:978
> #9 0x00000000004c2550 in main_loop () at main.c:1683
> #10 0x00000000004c9211 in main (argc=13, argv=0x7ffe6bf7da98) at
> main.c:2627
>
>
>
> (gdb) bt
> #0 0x00007fe16aca4c37 in __GI_raise (sig=sig@entry=6) at
> ../nptl/sysdeps/unix/sysv/linux/raise.c:56
> #1 0x00007fe16aca8028 in __GI_abort () at abort.c:89
> #2 0x000000000066b02c in qm_debug_frag (qm=0x7fe160bc2000,
> f=0x7fe160ec8de0, file=0x7fe1684dc84e "tm: h_table.c", line=179)
> at mem/q_malloc.c:136
> #3 0x000000000066e255 in qm_free (qmp=0x7fe160bc2000,
> p=0x7fe160ec8e18, file=0x7fe1684dc84e "tm: h_table.c",
> func=0x7fe1684dcb00 "free_cell_helper",
> line=179, mname=0x7fe1684dc250 "tm") at mem/q_malloc.c:480
> #4 0x00007fe16840cab9 in free_cell_helper
> (dead_cell=0x7fe160ed6a28, silent=1, fname=0x7fe1684dc9c1
> "h_table.c", fline=449) at h_table.c:179
> #5 0x00007fe16840e491 in free_hash_table () at h_table.c:449
> #6 0x00007fe168436141 in tm_shutdown () at t_funcs.c:90
> #7 0x00000000005c0a50 in destroy_modules () at sr_module.c:811
> #8 0x00000000004b6449 in cleanup (show_status=1) at main.c:525
> #9 0x00000000004b7ad6 in shutdown_children (sig=15,
> show_status=1) at main.c:667
> #10 0x00000000004ba428 in handle_sigs () at main.c:759
> #11 0x00000000004c343e in main_loop () at main.c:1744
> #12 0x00000000004c9211 in main (argc=13, argv=0x7ffe6bf7da98) at
> main.c:2627
>
>
>
> Thanks & Regards
>
> Hemanth
>
>
>
> _______________________________________________ Kamailio (SER) -
> Users Mailing List sr-users(a)lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
> -- Daniel-Constantin Mierla www.twitter.com/miconda --
> www.linkedin.com/in/miconda Kamailio Advanced Training -
> www.asipto.com Kamailio World Conference - www.kamailioworld.com
>
--
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - www.kamailioworld.com
I'm trying to understand the scenario when `tcp_no_connect` should ever be
set to `no`.
Kamailio comes with `tcp_no_connect=no` by default which means it will try
(and seemingly always fail) to create an outbound tcp connection when a
UAC's tcp connection is lost. This in-turn could start building up the tcp
write queue and can be disastrous at scale.
So why would this setting (`tcp_no_connect=no`) ever be useful?
Thanks
Hello,
I'm trying to add a SDP Body on 183 replies.
>From some carriers I don't get any SDP.
The goal is to add SDP , Engage PROXY & stream2uac on all 183 packets without SDP
Do you think it's possible ? :)