Kamailio 1.5.4 crashes with the following backtrace.
(gdb) bt
#0 free_to_params (tb=0x79ffc0) at parser/parse_to.c:79
#1 free_to (tb=0x79ffc0) at parser/parse_to.c:88
#2 0x000000000047fe82 in clean_hdr_field (hf=0x2b32776ec6a0) at parser/hf.c:187
#3 0x00002b327492f525 in clean_msg_clone (type=<value optimized out>, trans=<value optimized out>, req=0x2b32776eb510, rpl=0x79f220, code=<value optimized out>) at sip_msg.h:54
#4 run_trans_callbacks (type=<value optimized out>, trans=<value optimized out>, req=0x2b32776eb510, rpl=0x79f220, code=<value optimized out>) at t_hooks.c:245
#5 0x00002b3274949a1d in relay_reply (t=0x2b32776ed130, p_msg=0x79f220, branch=<value optimized out>, msg_status=200, cancel_bitmap=0x7fff5438ecf8) at t_reply.c:1163
#6 0x00002b327494a123 in reply_received (p_msg=0x79f220) at t_reply.c:1511
#7 0x000000000041f08b in forward_reply (msg=0x79f220) at forward.c:576
#8 0x0000000000445453 in receive_msg (
buf=0x719200 "SIP/2.0 200 OK\r\nVia: SIP/2.0/UDP xxx.xxx.xxx.114;branch=z9hG4bKb415.46c549d2.0\r\nVia: SIP/2.0/UDP xx.xxx.xx.xxx:5060;received=xxx.xxx.xx.xxx;branch=z9hG4bK6cd2ebfb;rport=5060\r\nRecord-Route: <sip:xxx.xxx.xxx.x"..., len=1106, rcv_info=0x7fff5438ede0) at receive.c:212
#9 0x00000000004795ee in udp_rcv_loop () at udp_server.c:449
#10 0x000000000042774e in main_loop (argc=3, argv=0x7fff5438eff8) at main.c:774
#11 main (argc=3, argv=0x7fff5438eff8) at main.c:1321
This is occuring on a centos box, 2.6.18-164.11.1.el5 #1 SMP Wed Jan 20 07:32:21 EST 2010 x86_64 x86_64 x86_64 GNU/Linux
The really strange thing is the source of the problem appears to be in clean_hdr_field (hf=0x2b32776ec6a0) at parser/hf.c:187
void clean_hdr_field(struct hdr_field* hf)
{
if (hf->parsed){
switch(hf->type){
...
case HDR_RPID_T:
free_to(hf->parsed);
break;
...
output from gdb shows hf->parsed to be NULL, however the call to free_to(hf->parsed) is being called, from there bad things happen.
Thanks in advance.
Gene
Hello,
I have a question about what the proper way to handle a duplicate
presentation of an INVITE is. On occasion I am seeing some packet loss
and/or timing issues which are causing some of my end-points to retransmit
the INVITE. Here is what I am doing in the most basic sense:
ITSP (Bandwidth.com) --> INVITE --> KAMAILIO --> DISPATCHER --> Asterisk
(B2BUA)
I am seeing Bandwidth.com send an INVITE which I already received. I keep
track of all running transactions in a htable which has a key of
$ci::$cs::$ft (as per RFC 3261).
If I get an invite for something which already has a key in the hashmap, I
am currently sending a "482 Loop Detected", but I don't think that is
correct as it causes the whole call to tear down instead of letting it
continue and assuring Bandwidth.com that I received the initial INVITE and
am currently working on it.
This is what I am currently doing:
##
## Check to make sure we don't already have an active
## transaction for this call-id, c-seq, and from-tag
## RFC3261 - 8.2.2.2
##
## We are going to add a key for this unique record if one
## doesn't already exist. The key automatically times out
## after 30 seconds, so we need not worry about cleanup
##
if($sht(loop_check=>$ci::$cs::$ft) == null){
xlog("L_INFO","No transaction found, adding to our hashtable\n");
$sht(loop_check=>$ci::$cs::$ft) = 1;
}else{
xlog("L_ERR","Loop Detected: $ci::$cs::$ft\n");
sl_send_reply("482","Loop Detected - Duplicate Session
Presentation");
exit;
}
Can I just swallow the second INVITE and do an exit; in my script?
Should I do an sl_send_reply(100,"Trying")?
Any advice would be greatly appreciated.
Thanks,
Please, replies to the maillist.
2010/8/30 <chuks(a)cybernergies.com>:
> I have just that on asterisk, host = kamailio IP and insecure=host,invite. I
> don't think this is asterisk related.
If you have "insecure=host,invite" then it's wrong.
--
Iñaki Baz Castillo
<ibc(a)aliax.net>
Is there a particular reason why in the 'load_credentials' parameter
to the 'auth_db' module, one can only store values in AVPs, not script
variables?
e.g. this works:
modparam("auth_db", "load_credentials", "$avp(s:var1)=column")
But not this:
modparam("auth_db", "load_credentials", "$var(var1)=column");
it results in an error like this:
Aug 28 19:00:54 diminuendo-1 /usr/local/sbin/kamailio[19651]: ERROR:
auth_db [aaa_avps.h:113]: malformed or non AVP $var(auth_user_id) AVP
definition
Aug 28 19:00:54 diminuendo-1 /usr/local/sbin/kamailio[19651]: ERROR:
auth_db [aaa_avps.h:179]: parse failed in "$var(auth_user_id)" at pos
0($var(auth_user_id))
Aug 28 19:00:54 diminuendo-1 /usr/local/sbin/kamailio[19651]: ERROR:
auth_db [authdb_mod.c:208]: failed to parse credentials
Aug 28 19:00:54 diminuendo-1 /usr/local/sbin/kamailio[19651]: ERROR:
<core> [sr_module.c:874]: init_mod(): Error while initializing module
auth_db
--
Alex Balashov - Principal
Evariste Systems LLC
1170 Peachtree Street
12th Floor, Suite 1200
Atlanta, GA 30309
Tel: +1-678-954-0670
Fax: +1-404-961-1892
Web: http://www.evaristesys.com/
On 8/17/10 7:14 PM, KevinJin wrote:
> Hello Daniel,
>
> What does the nathelper error messages mean?
> ==========
> hmm, invalid argurment ... try with this line:
>
> LM_ERR("can't send command to a RTP proxy (%s/%d) [sock %d (%d), vcnt
> %d]\n",
> strerror(errno), errno, rtpp_socks[node->idx], node->idx, vcnt);
>
> maybe will give some hints about which value is invalid.
>
> Here's the log after the change:
> 4(14415) ERROR: nathelper [nathelper.c:2457]: can't send command to a
> RTP proxy (Invalid argument/22) [sock 7 (0), vcnt 18]
can you check the manual page for writev on your system to see what are
possible reasons for 'Invalid argument' error (error code 22)? The
values in between [...] are just some debug values I wanted to see, not
error codes or so.
Cheers,
Daniel
> 4(14415) ERROR: nathelper [nathelper.c:2492]: proxy
> <udp:210.13.x.y:7722> does not respond, disable it
> 4(14415) ERROR: nathelper [nathelper.c:3144]: no available proxies
>
> Thanks,
> Kevin
> ------------------------------------------------------------------------
> From: kevin.jzh(a)hotmail.com
> To: miconda(a)gmail.com
> Subject: RE: [SR-Users] Kamailio 3.0 cann't access the RTPProxy
> Date: Tue, 17 Aug 2010 18:51:02 +0800
>
>
> Hi Daniel,
>
> Attached are the two kamailio logs,
> unix_socket_log --- run rtp proxy wth -s unix:/tmp/rtpproxy.sock
> udp_rtpproxy_log --- run rtp proxy with -s udp:*:7722
>
> Please help to check what's wrong with it.
>
> Thanks,
> Kevin
> ------------------------------------------------------------------------
> Date: Tue, 17 Aug 2010 11:29:46 +0200
> From: miconda(a)gmail.com
> To: kevin.jzh(a)hotmail.com
> CC: sr-users(a)lists.sip-router.org
> Subject: Re: [SR-Users] Kamailio 3.0 cann't access the RTPProxy
>
> Hello,
>
> please send full log at startup, your snippets include just few lines
> per process, being mixed from different processes.
>
> Cheers,
> Daniel
>
>
> On 8/14/10 3:54 AM, KevinJin wrote:
>
> Hello,
>
> ------------------------------------------------------------------------
> Date: Thu, 12 Aug 2010 22:16:18 +0200
> From: miconda(a)gmail.com <mailto:miconda@gmail.com>
> To: kevin.jzh(a)hotmail.com <mailto:kevin.jzh@hotmail.com>
> CC: sr-users(a)lists.sip-router.org
> <mailto:sr-users@lists.sip-router.org>
> Subject: Re: [SR-Users] Kamailio 3.0 cann't access the RTPProxy
>
> Hello,
>
> On 8/12/10 8:34 PM, KevinJin wrote:
>
> Hello,
>
> ------------------------------------------------------------------------
> Date: Thu, 12 Aug 2010 18:46:19 +0200
> From: miconda(a)gmail.com <mailto:miconda@gmail.com>
> To: kevin.jzh(a)hotmail.com <mailto:kevin.jzh@hotmail.com>
> CC: sr-users(a)lists.sip-router.org
> <mailto:sr-users@lists.sip-router.org>
> Subject: Re: [SR-Users] Kamailio 3.0 cann't access the RTPProxy
>
> Hello,
>
> On 8/12/10 4:47 PM, KevinJin wrote:
>
> Hi Daniel,
>
> What does the log below means? Does it mean nathelper has
> issue to send the request to RTP proxy first or nathelper
> doesn't receive a response after sending a request to the
> rtp proxy?
> 0(27429) ERROR: nathelper [nathelper.c:2457]: can't send
> command to a RTP proxy
>
> this error is printed when write to socket fails. Do you have
> any firewall running on the system? Is the user under which
> kamailio runs allowed to write to sockets?
>
>
> There's no firewall on the system, and I run the kamailio
> as root,
> root 26310 1 0 02:24:19 ? 0:00
> /usr/local/kamailio-3.0.2/sbin/kamailio -f
> /usr/local/kamailio-3.0.2/etc/kamail
>
> You can edit module_k/nathelper/nathelper.c and replace
> the line 2457 with:
>
> LM_ERR("can't send command to a RTP proxy (%s/%d)\n",
> strerror(errno), errno);
>
> Recompile and reinstall. Hopefully will get more hints
> about what happens.
>
>
> Here is the error message after the change:
> 2(26312) ERROR: nathelper [nathelper.c:2457]: can't send
> command to a RTP proxy(Invalid argument/22)
> 2(26312) ERROR: nathelper [nathelper.c:2492]: proxy
> <udp:210.13.124.15:7722> does not respond, disable it
> 2(26312) ERROR: nathelper [nathelper.c:3144]: no available proxies
> what could be the cause?
>
> hmm, invalid argurment ... try with this line:
>
> LM_ERR("can't send command to a RTP proxy (%s/%d) [sock %d (%d),
> vcnt %d]\n",
> strerror(errno), errno, rtpp_socks[node->idx], node->idx, vcnt);
>
> maybe will give some hints about which value is invalid.
>
> Here's the log after the change:
> 4(14415) ERROR: nathelper [nathelper.c:2457]: can't send command
> to a RTP proxy (Invalid argument/22) [sock 7 (0), vcnt 18]
> 4(14415) ERROR: nathelper [nathelper.c:2492]: proxy
> <udp:210.13.x.y:7722> does not respond, disable it
> 4(14415) ERROR: nathelper [nathelper.c:3144]: no available proxies
>
>
> Can you try as well with an unix file socket:
>
> modparam("nathelper", "rtpproxy_sock", "unix:/tmp/rtpproxy.sock")
>
> then start rtpproxy with -s unix:/tmp/rtpproxy.sock
>
>
> 4(17530) INFO: nathelper [nathelper.c:2369]: rtp proxy
> <unix:/tmp/rtpproxy.sock> found, support for it re-enabled
> 3(17529) ERROR: nathelper [nathelper.c:2429]: can't send command
> to a RTP proxy
> 3(17529) ERROR: nathelper [nathelper.c:2492]: proxy
> <unix:/tmp/rtpproxy.sock> does not respond, disable it
> 3(17529) ERROR: nathelper [nathelper.c:3144]: no available proxies
>
> Thanks,
> Kevin
>
> I have no solaris (sparc) to try myself...
>
> Cheers,
> Daniel
>
>
>
> Test env:
> UA1 (Behind NAT) --------> Kamailio & RTPproxy (Public IP)
> --------->UA2 (Public IP)
>
> Thanks,
> Kevin
> Cheers,
> Daniel
>
>
>
> 0(27429) ERROR: nathelper [nathelper.c:2492]: proxy
> <udp:210.13.124.15:7722> does not respond, disable it
>
> There's no problem for the resource(CPU, mem etc.) on the
> server, the load is very low.
>
> Thanks in advance!
> ----------
> 0(27429) DEBUG: nathelper [nhelpr_funcs.c:148]: type
> <application/sdp> found valid
> 0(27429) ERROR: nathelper [nathelper.c:3144]: no available
> proxies
> 0(27429) ERROR: nathelper [nathelper.c:2627]: no available
> proxies
> 0(27429) DEBUG: nathelper [nhelpr_funcs.c:148]: type
> <application/sdp> found valid
> 0(27429) INFO: nathelper [nathelper.c:2369]: rtp proxy
> <udp:210.13.124.15:7722> found, support for it re-enabled
> 0(27429) DEBUG: nathelper [nathelper.c:3196]: proxy reply:
> 42040 210.13.124.14
> 0(27429) DEBUG: nathelper [nhelpr_funcs.c:148]: type
> <application/sdp> found valid
> 0(27429) ERROR: nathelper [nathelper.c:2457]: can't send
> command to a RTP proxy
> 0(27429) ERROR: nathelper [nathelper.c:2492]: proxy
> <udp:210.13.124.15:7722> does not respond, disable it
> 0(27429) ERROR: nathelper [nathelper.c:3144]: no available
> proxies
> 0(27429) ERROR: nathelper [nathelper.c:2627]: no available
> proxies
>
> Thanks,
> Kevin
> ------------------------------------------------------------------------
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users(a)lists.sip-router.org <mailto:sr-users@lists.sip-router.org>
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierla
> http://www.asipto.com/
>
>
> --
> Daniel-Constantin Mierla
> http://www.asipto.com/
>
>
> --
> Daniel-Constantin Mierla
> http://www.asipto.com/
--
Daniel-Constantin Mierla
http://www.asipto.com/
Hello, My name is Stefan, I am from Brazil
I created a Iptel SIP account, but I would like to know if is possible make
to call to the phone number...Could you help me with this doubt?
Regards.
Stefan
Hi,
I some calls to a specific `sub-region` that I want to limit to a
specific trunk. Example.
Region 1: prefix 55, trunk 1, priority 10
Region 1: prefix 55, trunk 2, priority 20
Sub-region A: prefix 5512, trunk 1, priority 30
I do not want the calls to prefix 5512 to fail-over to trunk 2 in case
of 404, 503 or the like. So I have tried to put priority 30 on
sub-region A and a lower priority on Region 1, but it still fails over
to trunk 2 - can I prevent this?
Thanks!
//Anders
hi all,
I hae configure RTP proxy it work ok.
please help me to configure that :
if sip client is in the same NAT(same LAN network) , they can make call directly
(RTP go direct without through RTP proxy).
thanks so much.
ThanhTruong
HTK-INC Co.,Ltd VN
www.htk-inc.comhttp://pbxvn.com/forum/
hi all,
I have configure nathelper in kamailio, but it does not work as I expect.
I using function : force_rpt_proxy("","115.X.X.190") to change ip_add of SDP
packet. But I see that value c= <ip add > not change to c=<115.X.X.190>.
thanks for help.
ThanhTruong
HTK-INC Co.,Ltd
http://www.htk-inc.com/http://pbxvn.com/forum/