Hello Guys,
I'm wondering how do I get destination IP on a reply?
Regards,
David Villasmil
email: david.villasmil.work(a)gmail.com
phone: +34669448337
ᐧ
OK thank you Alex. I will look into your suggestions next time the problem
arises. Each call does generate one SQL LCR lookup, one CDR INSERT, and
also a timer route that runs 3 queries every few minutes. Once Kamailio
stops responding it will continue that way indefinitely until a process
restart. Will report back. Thanks.
Pete D
Local messages are malformed in Kamailio 4.4.X. For example after receiving
an error response (603) to an INVITE message, the ACK is generated with
header Max-Forwards concatenated to header CSeq and double CRLF, which is
wrong.
Via: SIP/2.0/TLS 173.16.10.61:5061
;branch=z9hG4bKc782.5b960c7c48a4363a0126963daa797eb0.0;i=7
From: "22861"<sip:22861@173.16.10.61;transport=tls>;tag=snl_OIPEOzJUNy
Call-ID: 61b500a71b510a1Pj61qq1k9dPW
To: <sip:551138174108@174.16.4.108:5061;transport=tls>;tag=435012226
CSeq: 2351 ACKMax-Forwards: 70
User-Agent:...
The fix for that seems to be just the order of append_str in function
build_local() from tm\t_msgbuilder.c.
append_str( p, method, method_len );
+ append_str( p, CRLF, CRLF_LEN );
append_str( p, MAXFWD_HEADER, MAXFWD_HEADER_LEN );
- append_str( p, CRLF, CRLF_LEN );
Hello All.
I have some troubles with upstream sip switch.
It ignores SIP packets which contains:
User-Agent: FPBX-2.11.0(11.17.1)
or
Server: User-Agent: FPBX-2.11.0(11.17.1)
If space is present before first "(" then sip switch works as expected
So my question is: how corektly make analyze and modify this headers
using kamailio?
In which routes i must parse it?
i need such modifications:
User-Agent: FPBX-2.11.0(11.17.1) -> User-Agent: FPBX-2.11.0 (11.17.1)
Server: User-Agent: FPBX-2.11.0(11.17.1) -> Server: User-Agent:
FPBX-2.11.0 (11.17.1)
Thank you.
--
Best regards,
Sergey Basov e-mail: sergey.v.basov(a)gmail.com
We have a Kamailio 4.2 machine with a custom config file we've been using
for the better part of two years without issue. Suddenly we've run into an
issue where Kamailio just stops responding to any INVITEs, and stops any
logging. The processes keep running but stop doing anything. It is a full
production machine which naturally causes problems. I have the memlog from
the restart after a hang if that helps, but I presume it is too large for
this list. We have increased shared memory to 1536 and Pkg memory to 32
but that didn't help, and in any case the shmem stats look OK to us. It is
a full production machine doing about 200 CPS, the load is barely
measurable but turning logging to debug will surely kill it.
We use TOPOH and do get lots of log entries like :
/usr/sbin/kamailio[17865]: ERROR: <core> [parser/parse_via.c:2048]:
parse_via(): ERROR: parse_via: bad char <▒> on state 100
/usr/sbin/kamailio[17865]: ERROR: <core> [parser/parse_via.c:2738]:
parse_via(): ERROR: parse_via on: <▒#010d▒▒_▒#0117Jt▒#015#012X>
/usr/sbin/kamailio[17865]: ERROR: <core> [parser/parse_via.c:2744]:
parse_via(): ERROR: parse_via: via parse error
/usr/sbin/kamailio[17865]: ERROR: topoh [th_msg.c:438]: th_unmask_via():
cannot find cookie in via2
/usr/sbin/kamailio[17865]: ERROR: topoh [th_mask.c:165]: th_mask_decode():
invalid input string"642525435_130081688(a)xxx.xxx.xxx.xxx"
/usr/sbin/kamailio[17865]: ERROR: topoh [th_msg.c:484]: th_unmask_callid():
cannot decode callid
and
CRITICAL: sl [../../forward.h:279]: msg_send(): unknown proto 0
However, I believe these are not new and do not seem to affect overall call
processing.
Anyone have any idea what to look for or how to figure this out?
shmem:fragments = 4019
shmem:free_size = 1538943936
shmem:max_used_size = 84349120
shmem:real_used_size = 71668800
shmem:total_size = 1610612736
shmem:used_size = 54855384
Hi,
I'm trying to understand the best (or reasonable) approach of offloading
SSL encryption from backend to Kamailio. Let me simplify a little bit:
UAC == SIP/TLS ==> Kamailio == SIP/UDP ==> FreeSWITCH
My main problem is in Contact header of SIP packet which passes through
Kamailio SIP proxy and remains unmodified.
For example, REGISTER request. There is FreeSWITCH backend which is
registrar server as well. UAC send REGISTER request to it through Kamailio
SIP proxy via SIP/TLS. This request dispatches to backend(s) by Kamailio
with dispatcher module. Backend does not configured to support TLS.
In this case everything works fine: I see REGISTER requests on FreeSWITCH.
But Contact header of SIP message which is passing Kamailio remains
unmodified. And as result I see on FreeSWITCH something like the following:
Call-ID: Jpmjp4ruHI
User: user_name@domain_name
Contact: "" <sip:user_name@uac_ip
:27026;transport=tls;fs_path=sip%3Akamailio_ip%3A5060>
Agent: Linphone/3.10.2 (belle-sip/1.5.0)
Status: Registered(TLS)(unknown) EXP(2016-11-28 11:48:28) EXPSECS(110)
Ping-Status: Reachable
Ping-Time: 0.00
Host: kamailio_host
IP: kamailio_ip
Port: 5060
Auth-User: unknown
Auth-Realm: domain_name
MWI-Account: user_name@domain_name
As a result FreeSWITCH tries to originate call over SIP/TLS and it fails
because FreeSWITCH does not configured to work with TLS.
I want to understand what is correct workaraound of this issue. Do I need
to modify Contact header manually on kamailio host and this is right
approach? Or kamailio in case of correct config rewrites this header itself?
If parts of my kamailio config would be useful I will post it later.
Thanks in advance.
--
С уважением,
Владислав Захожай
Hello,
I am trying to install kazoo module.
According to documentation I have installed libraries : librabbitmq,
libjson, libuuid, but It always fails on missing json.h :
CC (gcc) [M kazoo.so] kz_trans.o
In file included from kz_trans.c:53:0:
kz_json.h:12:18: fatal error: json.h: No such file or directory
#include <json.h>
^
compilation terminated.
../../Makefile.rules:97: recipe for target 'kz_trans.o' failed
make[1]: *** [kz_trans.o] Error 1
Makefile:511: recipe for target 'modules' failed
make: *** [modules] Error 1
Can anybody help me ?
BR Jan
Hi Rafael,
There should not be a problem with the VMware mage.
Regarding your question: you have to check kamailio-pcscf.cfg to recognize
when and it how forward the SIP message towards the I-CSCF.
I guess it is the statement "t_relay();" in line 896.
You may provide a core tracefile (generated with tcpdump), then I may have
aquick look ate your ise.
BR Franz
Von: Rafi Aizenstain [mailto:rafi_a@cellowireless.com]
Gesendet: Montag, 28. November 2016 16:12
An: franz.edler(a)technikum-wien.at
Betreff: Kamailio IMS virtual machine
Hello Mr. Franz
I'm trying to build a testbed using the VMware image you kindly have shared
here: https://www.kamailio.org/w/2016/02/kamailio-ims-getting-started-box/
But when running the machine as-is I keep getting errors from the P-CSCF
module and it doesn't forward the SIP message towards the I-CSCF. Please see
the following log:
root@server:~# kamailio -f /usr/local/etc/kamailio/kamailio-pcscf.cfg
loading modules under config path: /usr/local/lib64/kamailio/modules/
0(2096) INFO: <core> [sctp_core.c:75]: sctp_core_check_support(): SCTP API
not enabled - if you want to use it, load sctp module
Listening on
udp: server.net1.test [10.0.0.9]:4060
Aliases:
*: pcscf.net1.test:*
WARNING: no fork mode
0(2096) INFO: rr [../outbound/api.h:54]: ob_load_api(): Failed to import
bind_ob
0(2096) INFO: rr [rr_mod.c:174]: mod_init(): outbound module not available
0(2096) INFO: ims_usrloc_pcscf [hslot.c:62]: ul_init_locks(): locks array
size 512
0(2096) INFO: <core> [udp_server.c:150]: probe_max_receive_buffer():
SO_RCVBUF is initially 212992
0(2096) INFO: <core> [udp_server.c:200]: probe_max_receive_buffer():
SO_RCVBUF is finally 425984
0(2096) WARNING: ims_usrloc_pcscf [usrloc_db.c:59]: connect_db(): DB
connection already open... continuing
0(2096) INFO: <script>: [REGISTER] from [sip:bob@net1.test] to
[sip:bob@net1.test]
0(2096) ERROR: <script>: REGISTER (sip:bob@net1.test (10.0.0.200:59721) to
sip:bob@net1.test, 7013b8fc-11a0-2b70-3654-9ce68424e9a7)
Looking into the configuration files I couldn't understand how does the
P-CSCF determine that it has to forward the SIP message towards the I-CSCF
module.
Are you aware of any issue with the VMware machine you have shared.
Please advise.
Best Regards,
Rafael A.
Dear list,
i have a strange situation with module LCR on kamailio 4.3.6.
A customer send a call to my first kamailio and i forward it with some
tech prefix to my supplier.
Here the 2 correct invites.. customer is sending to me with prefix 9001
14:34:29.155719 CUSTOMER_IP.101:5060 -> EU_KMAILIO_IP.40:5060
INVITE sip:900133139864069@EU_KMAILIO_IP.40 SIP/2.0.
Record-Route:
<sip:CUSTOMER_IP.101;lr;ftag=33F431FC-2103;vst=AAAAAAwFBQQFAwEACgkFDQgADXADCG4DDQEABQUWHwYGLjEwMQ-->.
Via: SIP/2.0/UDP
CUSTOMER_IP.101;branch=z9hG4bK2d4.4853821c2be0bf7d75377fce7683f593.0.
Via: SIP/2.0/UDP CUSTOMER_IP.108:5060;branch=z9hG4bK504DC634.
Remote-Party-ID:
<sip:441753825186@CUSTOMER_IP.108>;party=calling;screen=yes;privacy=off.
From: <sip:441753825186@CUSTOMER_IP.108>;tag=33F431FC-2103.
To: <sip:900133139864069@EU_KMAILIO_IP.40>.
Date: Mon, 28 Nov 2016 14:34:29 GMT.
Call-ID: 9A8A4545-B4AE11E6-9238E2D3-6BBD43E(a)CUSTOMER_IP.108.
Supported: 100rel,timer,resource-priority,replaces,sdp-anat.
Min-SE: 1800.
Cisco-Guid: 2592672861-3031306726-2677997592-0419390928.
User-Agent: Cisco-SIPGateway/IOS-12.x.
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER,
SUBSCRIBE, NOTIFY, INFO, REGISTER.
CSeq: 101 INVITE.
Max-Forwards: 69.
.....
and i forward to my supplier
U 2016/11/28 14:34:29.157516 EU_KMAILIO_IP.40:5060 ->
EU_SUPPLIER_IP.198:5060
INVITE sip:00233139864069@EU_SUPPLIER_IP.198 SIP/2.0.
Record-Route:
<sip:EU_KMAILIO_IP.40;lr;ftag=33F431FC-2103;did=ff5.6f01;vst=AAAAAAkAAgIAAgIKAQ4CBAYPeXIECQAABAcAAwQIAAUJOA--;nat=yes>.
Record-Route:
<sip:CUSTOMER_IP.101;lr;ftag=33F431FC-2103;vst=AAAAAAwFBQQFAwEACgkFDQgADXADCG4DDQEABQUWHwYGLjEwMQ-->.
Via: SIP/2.0/UDP
EU_KMAILIO_IP.40:5060;branch=z9hG4bK2d4.782830bfdde5e873d3dc6a71bcbba70f.0.
Via: SIP/2.0/UDP
CUSTOMER_IP.101;rport=5060;branch=z9hG4bK2d4.4853821c2be0bf7d75377fce7683f593.0.
Via: SIP/2.0/UDP CUSTOMER_IP.108:5060;branch=z9hG4bK504DC634.
Remote-Party-ID:
<sip:441753825186@CUSTOMER_IP.108>;party=calling;screen=yes;privacy=off.
From: <sip:441753825186@CUSTOMER_IP.108>;tag=33F431FC-2103.
To: <sip:00233139864069@EU_SUPPLIER_IP.198>.
Date: Mon, 28 Nov 2016 14:34:29 GMT.
Call-ID: 9A8A4545-B4AE11E6-9238E2D3-6BBD43E(a)CUSTOMER_IP.108.
Supported: 100rel,timer,resource-priority,replaces,sdp-anat.
Min-SE: 1800.
Cisco-Guid: 2592672861-3031306726-2677997592-0419390928.
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER,
SUBSCRIBE, NOTIFY, INFO, REGISTER.
CSeq: 101 INVITE.
Max-Forwards: 68.
Timestamp: 1480343669.
Contact: <sip:441753825186@CUSTOMER_IP.108:5060>.
Expires: 180.
Allow-Events: telephone-event.
Content-Type: application/sdp.
Content-Disposition: session;handling=required.
Content-Length: 310.
On both invites the To field respect the correct information from INVITE
so that the kamailio CDR is working correct.
After that the supplier reply me 503 and call is come back to my kamailio.
LCR modules send the call to second supplier that on this case is my
second box kamailio on another countrie..
Here there is this problem that i signed on RED
U 2016/11/28 14:34:43.191618 EU_KMAILIO_IP.40:5060 ->
EU_SUPPLIER2_IP.242:5060
*INVITE sip:905233139864069@EU_SUPPLIER2_IP.242 SIP/2.0.*
Record-Route: <sip:EU_KMAILIO_IP.40;lr;ftag=33F431FC-2103;did=ff5.6f01>.
Record-Route:
<sip:CUSTOMER_IP.101;lr;ftag=33F431FC-2103;vst=AAAAAAwFBQQFAwEACgkFDQgADXADCG4DDQEABQUWHwYGLjEwMQ-->.
Via: SIP/2.0/UDP
EU_KMAILIO_IP.40:5060;branch=z9hG4bK2d4.782830bfdde5e873d3dc6a71bcbba70f.1.
Via: SIP/2.0/UDP
CUSTOMER_IP.101;rport=5060;branch=z9hG4bK2d4.4853821c2be0bf7d75377fce7683f593.0.
Via: SIP/2.0/UDP CUSTOMER_IP.108:5060;branch=z9hG4bK504DC634.
Remote-Party-ID:
<sip:441753825186@CUSTOMER_IP.108>;party=calling;screen=yes;privacy=off.
From: <sip:441753825186@CUSTOMER_IP.108>;tag=33F431FC-2103.
*To: <sip:900133139864069@EU_KMAILIO_IP.40>.*
Date: Mon, 28 Nov 2016 14:34:29 GMT.
Call-ID: 9A8A4545-B4AE11E6-9238E2D3-6BBD43E(a)CUSTOMER_IP.108.
Supported: 100rel,timer,resource-priority,replaces,sdp-anat.
Min-SE: 1800.
Cisco-Guid: 2592672861-3031306726-2677997592-0419390928.
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER,
SUBSCRIBE, NOTIFY, INFO, REGISTER.
CSeq: 101 INVITE.
Max-Forwards: 68.
Timestamp: 1480343669.
Contact: <sip:441753825186@CUSTOMER_IP.108:5060>.
Expires: 180.
Allow-Events: telephone-event.
Content-Type: application/sdp.
Content-Disposition: session;handling=required.
....
The LCR modules make the new INVITE using the original To field and
don't rewrite it like on the first request..
How is that possibile ?
Any idea ?
Best regards
Laura
Hi,
I am sure i am doing something very basic wrongly.
Here is my config file snippet
$xavp(caller_peer[0]=>accountname) = "AAA";
xlog("L_WARN", "XAVP ACCOUNT NAME $xavp(caller_peer[0]=>accountname) \n");
No matter what i set this XAVP at, it always prints null in log file as
below
WARNING: <script>: XAVP ACCOUNT NAME <null>
Please help how i can set XAVP and use it further in config file.