Hello Daniel
I do have quite a few core files, please send me the gdb commands.
Regards
Panagiotis.
Daniel-Constantin Mierla wrote:
Hello Panagiotis,
On 03/16/2010 02:21 PM, Panagiotis Skoulikaritis wrote:
Hello Daniel
I will need time to recreate the problem, attached are the only traces I kept. on the amaze-4.cap the calls are originated by a softphone registered on the kamailio on the crash.cap the calls are originated from the "PSTN".
we do account the $pd and the $pn
I reply to you directly since i don't want to give the traces on the mailing list, I hope you will understand.
I asked to be sent private, it is ok.
Also for workaround Alex took out the PDT module from the route and the kamailio do not crash anymore.
Hmm, so you say pdt module is related? That is pretty small and old module...
Do you still have the core file? I can send you some gdb commands to get more details out of it.
Thanks, Daniel
Regards
Panagiotis
Daniel-Constantin Mierla wrote:
Hello,
can you send me ngrep/pcap file with ip addresses so I can match which 200ok is causing the problem (coming from B or coming from Asterisk)? The backtrace shows ip while the sip trace is masked.
Also, I would need a bit more info from the core file. Please keep one around. The issue seems to be related to P-Asserted-Identity header, but I couldn't find any such header in the sip trace you sent.
Are you accounting the PAI header?
Thanks, Daniel
On 03/10/2010 03:30 PM, Panagiotis Skoulikaritis wrote:
Dear Marius
The scenario is as follows:
- A Call is placed by a sip subscriber "A"
- kamailio forwards the call to the asterisk server
- Asterisk plays an IVR message on the subscriber "A", creates a
new call to a "virtual" number which is forwarded to the kamailio server, and plays an ivr to this leg as well when the call is answered, then it connects the two calls. 4. Kamailio translates the "virtual" number to the pstn number of subscriber B
I have attached a picture of the above scenario.
The modules that are loaded are:
loadmodule "db_mysql.so" loadmodule "mi_fifo.so" loadmodule "mi_datagram.so" loadmodule "sl.so" loadmodule "tm.so" loadmodule "rr.so" loadmodule "pv.so" loadmodule "maxfwd.so" loadmodule "usrloc.so" loadmodule "registrar.so" loadmodule "textops.so" loadmodule "uri_db.so" loadmodule "siputils.so" loadmodule "xlog.so" loadmodule "acc.so" loadmodule "dispatcher.so" loadmodule "pdt.so" loadmodule "dialplan.so" loadmodule "siptrace.so" loadmodule "dialog.so" loadmodule "sqlops.so" loadmodule "userblacklist.so" loadmodule "htable.so" loadmodule "uac.so"
The config that does all the routing is :
route[10] {
xlog("alx ------- This is Route 10 -------"); if($rU =~ "^.*%+") { xlog("alx ------- The number contains %23 "); $rU = $(rU{re.subst,/^(.*)%23(.*)/\1\2/}); #$rU = $(rU{s.unescape.user}); #It changes the %23
to # !! xlog("alx ------- The perl $rU ------- "); }
if($rU =~ "^.*#+") { xlog("alx ------- The number contains #"); $rU = $(rU{re.subst,/^(.*)#(.*)/\1\2/}); #$rU = $(rU{s.unescape.user}); #It changes the %23
to # !! xlog("alx ------- The perl $rU ------- "); }
if(prefix2domain("2", "0")) { $var(dial_grp) = $(rd{s.select,0,.}{s.int}); #
Dialplan group prefix for routing $var(num_pr) = $(rd{s.select,1,.}{s.int}); # The number of digits that prefix has $var(num_translation) = $(rd{s.select,2,.}{s.int}); # Called number translation $avp(s:port_translation) = $(rd{s.select,3,.}{s.int}); # Port number translation #$var(test_var) = $(rd{s.select,4,.}{s.int}); # Future property
$avp(s:cust_prefix) = $(rU{s.substr,0,$var(num_pr)}); $rU = $(rU{s.substr,$var(num_pr),0}); xlog("alx ------- The new rU is $rU and properties $rd
-------");
if($var(num_translation) == 1) { if($sht(a=>$rU)!=null){ $rU = $sht(a=>$rU); xlog("alx ------- Translation Done. DST
num=$rU ----------");
} else { xlog("alx ------- Translation NOT Done
----------"); }
#xlog("alx ------- We have DST number
translation for user fU $avp(s:frm_user_name) ----------"); #if(dp_translate("31", "$rU/$rU")) #{ # xlog("alx ------- Translation Done. DST num=$rU ----------"); #} else { # xlog("alx ------- Translation NOT Done ----------"); #} }
if(dp_translate("$var(dial_grp)", "$rU/$rU")) { xlog("alx ------- The $rU and with
attributes :$avp(s:dest) -------\n");
$var(i) = 0; while($(avp(s:dest){s.select,$var(i),.})!="#") { $avp(s:dstgrp) =
$(avp(s:dest){s.select,$var(i),.}{s.int}); $var(i) = $var(i) + 1; xlog("alx ------- The avp(s:dstgrp)=$avp(s:dstgrp) var(i)=$var(i) -------"); }
# backup the username so we can use
different prefixes $avp(s:user) = $rU;
# select destination from first group
if(ds_select_domain("$avp(s:dstgrp)", "4")) {
if($(ru{uri.param,prefix})!=null) { $ru = "sip:" + $(ru{uri.param,prefix}) + $avp(s:user) + "@" + $rd;
} else { $ru
= "sip:" + $avp(s:user) + "@" + $rd; } }
$avp(s:dstgrp) = null; xlog("alx ------- The final
RURI is $ru ------- "); if($avp(s:port_translation) == 1) { rewriteport("5061"); } t_on_failure("3"); t_relay(); exit;
} }
}
Attached is the trace
Regards.
P.
marius zbihlei wrote:
Panagiotis Skoulikaritis wrote:
Hello Daniel
the kamailio version is 1.5.3
Regards
P.
Hello,
Can you give us more details like the sip message that generates the coredump (or if every sip message received generates the core), if your config does something more out of the ordinary(let's say exotic). Can we reproduce it ?
It would also be helpful if you specify the list of modules you have loaded.
Cheers, Marius
Daniel-Constantin Mierla wrote: > Hello, http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
-- Daniel-Constantin Mierla Kamailio SIP Router Masterclass, Berlin, March 22-26, 2010
-- Daniel-Constantin Mierla Kamailio SIP Router Masterclass, Berlin, March 22-26, 2010
Hello Panagiotis,
getting the at least the call-ind in headers of sip reply would be good, do it by chunks (I do not know other option), in gdb:
$ frame 7 $ print *(buf+100) $ print *(buf+200) $ print *(buf+300) $ print *(buf+400)
Then more or less same to get the request:
$ frame 2 $ print *(req->buf) $ print *(req->buf+100) $ print *(req->buf+200) $ print *(req->buf+300) $ print *(req->buf+400)
$ frame 1 $ print *hf
Make sure you pick a core that gives a backtrace like: (gdb) backtrace #0 free_to (tb=0x775c00) at parser/parse_to.c:79 #1 0x000000000047fd42 in clean_hdr_field (hf=0x2ad2432de100) at parser/hf.c:187 #2 0x00002ad23fe3e525 in run_trans_callbacks (type=<value optimized out>, trans=<value optimized out>, req=0x2ad2432dcf58, rpl=0x772d28, code=<value optimized out>) at sip_msg.h:54 #3 0x00002ad23fe47b46 in t_reply_matching (p_msg=0x772d28, p_branch=<value optimized out>) at t_lookup.c:888 #4 0x00002ad23fe47fa2 in t_check (p_msg=0x772d28, param_branch=0x7ffff9c016bc) at t_lookup.c:964 #5 0x00002ad23fe58ac2 in reply_received (p_msg=0x73a040) at t_reply.c:1395 #6 0x000000000041eebc in forward_reply (msg=0x772d28) at forward.c:521 #7 0x0000000000445313 in receive_msg ( buf=0x718dc0 "SIP/2.0 200 OK\r\nVia: SIP/2.0/UDP 77.247.97.11;branch=z9hG4bK45f7.70f91294.0;received=77.247.97.11\r\nV", len=920, rcv_info=0x7ffff9c017a0) at receive.c:212 #8 0x00000000004794ae in udp_rcv_loop () at udp_server.c:449 #9 0x000000000042760e in main (argc=3, argv=0x7ffff9c019b8) at main.c:774
Would be good if we get on irc together, if you have time, to do a more realtime debugging -- will be faster. Let me know if you can do it today. I am on #kamailio or #sip-router channels on irc.freenode.net with id miconda.
Thanks, Daniel
On 03/17/2010 11:56 AM, Panagiotis Skoulikaritis wrote:
Hello Daniel
I do have quite a few core files, please send me the gdb commands.
Regards
Panagiotis.