<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi Bogdan,<br><br>I added <br><br>local_route {<br> xlog("================LOCAL_ROUTE============\n");<br> setflag(22);<br> sip_trace(); <br> if (is_method("BYE") ) {<br> xlog("================BYE============\n");<br> }<br>}<br><br>to the script but I'm running into a crash (see bellow the log excerpt) caused by the null value returned by ip_addr2a.<br><br>Please advise,<br>Bogdan<br><br>Jan 24 12:25:21 P4237 cdrtool[3919]: DebitBalance Duration=12 CallId=1378020100 From=sip:1000@localhost Gateway=127.0.0.1 To=sip:01234@localhost<br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:mi_datagram:mi_datagram_parse_node: 2 data->len is 1 <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:mi_datagram:mi_datagram_parse_tree:
adding node <> ; val <1093323345> <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:mi_datagram:mi_datagram_parse_tree: the remaining datagram has 1 bytes <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:mi_datagram:mi_datagram_parse_node: the remaining datagram to be parsed is and 1 in length <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:mi_datagram:mi_datagram_server: done parsing the mi tree <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:dialog:mi_terminate_dlg: h_entry 692 h_id 1093323345 <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:dialog:lookup_dlg: ref dlg 0xb5ae81dc with 1 -> 3 <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:dialog:lookup_dlg: dialog id=1093323345 found on entry 692 <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:dialog:send_leg_bye: sending BYE to caller (0) <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:dialog:ref_dlg: ref dlg 0xb5ae81dc with 1 -> 4 <br>Jan 24 12:25:21 P4237
./opensips[6821]: DBG:tm:t_uac: next_hop=<sip:1000@127.0.0.1:5061> <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:parse_uri: parsed uri: type=1 user=<1000>(4) passwd=<>(0) host=<127.0.0.1>(9) port=<5061>(4): 5061 params=<>(0) headers=<>(0) <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:parse_uri: uri params: transport=<>, val=<>, proto=0 <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:parse_uri: user-param=<>, val=<> <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:parse_uri: method=<>, val=<> <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:parse_uri: ttl=<>, val=<> <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:parse_uri: maddr=<>, val=<> <br>Jan 24 12:25:21 P4237 ./opensips[6821]:
DBG:core:parse_uri: lr=<>, val=<> <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:parse_uri: r2=<>, val=<> <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:mk_proxy: doing DNS lookup... <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:tm:dlg2hash: 18228 <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:tm:print_request_uri: sip:1000@127.0.0.1:5061 <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:tm:t_uac: building sip_msg from buffer <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:parse_msg: SIP Request: <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:parse_msg: method: <BYE> <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:parse_msg: uri: <sip:1000@127.0.0.1:5061> <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:parse_msg: version: <SIP/2.0> <br>Jan 24 12:25:21 P4237 ./opensips[6821]:
DBG:core:parse_headers: flags=2 <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:parse_via_param: found param type 232, <branch> = <z9hG4bK4374.083fa773.0>; state=16 <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:parse_via: end of header reached, state=5 <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:parse_headers: via found, flags=2 <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:parse_headers: this is the first via <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:parse_headers: header field type 1, name=<Via>, body=<SIP/2.0/UDP 127.0.0.1;branch=z9hG4bK4374.083fa773.0> <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:parse_msg: first via: <SIP/2.0/UDP> <127.0.0.1:(0)><br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:parse_msg: ;<><br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:parse_msg: <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:parse_msg:
exiting <br>Jan 24 12:25:21 P4237 ./opensips[6821]: INFO:core:buf_init: initializing... <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:pv_printf: final buffer length 40 <br>Jan 24 12:25:21 P4237 ./opensips[6821]: ================LOCAL_ROUTE============ <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:parse_headers: flags=10 <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:parse_to_param: tag=1779764692 <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:parse_to: end of header reached, state=29 <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:parse_to: display={}, ruri={sip:1000@localhost} <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:get_hdr_field: <To> [37]; uri=[sip:1000@localhost] <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:get_hdr_field: to body [<sip:1000@localhost>] <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:parse_headers: header field type 3, name=<To>,
body=<<sip:1000@localhost>;tag=1779764692> <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:parse_headers: header field type 4, name=<From>, body=<<sip:01234@localhost>;tag=1130602078> <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:parse_to_param: tag=1130602078 <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:parse_to: end of header reached, state=29 <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:parse_to: display={}, ruri={sip:01234@localhost} <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:parse_headers: flags=40 <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:get_hdr_field: cseq <CSeq>: <21> <BYE> <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:parse_headers: header field type 5, name=<CSeq>, body=<21 BYE> <br>Jan 24 12:25:21 P4237 ./opensips[6821]: DBG:core:parse_headers: header field type 6, name=<Call-ID>, body=<1378020100> <br>Jan 24
12:25:21 P4237 ./opensips[6821]: CRITICAL:siptrace:ip_addr2a: unknown address family 0 <br>Jan 24 12:25:21 P4237 cdrtool[3919]: ConnectFee=0.0000 CallId=1378020100 Span=1 Duration=12 DestId=31 default Profile=grn_premium Period=weekday Rate=grn_premium Interval=0-24 Cost=0.1000/6 Price=0.2000 PriceIn=0.0000<br>Jan 24 12:25:21 P4237 cdrtool[3919]: Price=0.2000 Duration=12 CallId=1378020100 BillingParty=1000@localhost DestId=31 MaxSessionTime=0<br>Jan 24 12:25:21 P4237 call-control[3909]: Call id 1378020100 of 1000@localhost to sip:01234@localhost disconnected by call control after 12 seconds, call price is 0.2000<br>Jan 24 12:25:21 P4237 kernel: [10135.307026] opensips[6821]: segfault at 0 ip b7dd7bb9 sp bf800d08 error 4 in libc-2.11.2.so[b7d65000+140000]<br>Jan 24 12:25:21 P4237 ./opensips[6850]: CRITICAL:core:receive_fd: EOF on 11<br><br><br>--- On <b>Fri, 1/21/11, Bogdan-Andrei Iancu <i><bogdan@opensips.org></i></b> wrote:<br><blockquote
style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Bogdan-Andrei Iancu <bogdan@opensips.org><br>Subject: Re: [OpenSIPS-Users] BYE msg not inserted into sip_trace<br>To: "OpenSIPS users mailling list" <users@lists.opensips.org><br>Date: Friday, January 21, 2011, 7:31 PM<br><br><div class="plainMail">take care that the BYEs which are generated by opensips do not go <br>through the opensips main route, you need to configure a local_route{} <br>to get them...and make there a sip_trace()<br><br>Regards,<br>Bogdan<br><br><br>rad bogdan wrote:<br>> Bogdan,<br>><br>> The lines related to siptrace are these:<br>> modparam("siptrace", "db_url", "mysql://user:password@localhost/opensips")<br>> modparam("siptrace", "trace_on", 1)<br>> modparam("siptrace", "trace_flag",22)<br>> modparam("siptrace", "trace_local_ip", "localhost")<br>> modparam("siptrace", "traced_user_avp",
"$avp(s:traced_user)")<br>><br>> route{<br>> setflag(22);<br>> sip_trace();<br>><br>> Thanks,<br>> Bogdan<br>><br>> --- On *Fri, 1/21/11, Bogdan-Andrei Iancu /<<a ymailto="mailto:bogdan@opensips.org" href="/mc/compose?to=bogdan@opensips.org">bogdan@opensips.org</a>>/* wrote:<br>><br>><br>> From: Bogdan-Andrei Iancu <<a ymailto="mailto:bogdan@opensips.org" href="/mc/compose?to=bogdan@opensips.org">bogdan@opensips.org</a>><br>> Subject: Re: [OpenSIPS-Users] BYE msg not inserted into sip_trace<br>> To: "OpenSIPS users mailling list" <<a ymailto="mailto:users@lists.opensips.org" href="/mc/compose?to=users@lists.opensips.org">users@lists.opensips.org</a>><br>> Date: Friday, January 21, 2011, 6:38 PM<br>><br>> Hi
Bogdan,<br>><br>> What kind of tracing do you do? dialog based? with flags ?<br>><br>> Regards,<br>> Bogdan<br>><br>> rad bogdan wrote:<br>> > Hi Bogdan,<br>> ><br>> > I've seen that when CallControl notifies OpenSIPS (1.6.4) that a<br>> call must be interrupted because the balance is 0, OpenSIPS sends<br>> BYE to both the caller and the callee but the messages are not<br>> being written into sip_trace.<br>> ><br>> > Is this a normal behavior or it is a bug ?<br>> ><br>> > Thanks,<br>> > Bogdan<br>>
><br>> ><br>> ><br>> ------------------------------------------------------------------------<br>> ><br>> > _______________________________________________<br>> > Users mailing list<br>> > <a ymailto="mailto:Users@lists.opensips.org" href="/mc/compose?to=Users@lists.opensips.org">Users@lists.opensips.org</a> </mc/compose?to=<a ymailto="mailto:Users@lists.opensips.org" href="/mc/compose?to=Users@lists.opensips.org">Users@lists.opensips.org</a>><br>> > <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>> > <br>><br>><br>>
-- Bogdan-Andrei Iancu<br>> OpenSIPS Event - expo, conf, social, bootcamp<br>> 2 - 4 February 2011, ITExpo, Miami, USA<br>> OpenSIPS solutions and "know-how"<br>><br>><br>> _______________________________________________<br>> Users mailing list<br>> <a ymailto="mailto:Users@lists.opensips.org" href="/mc/compose?to=Users@lists.opensips.org">Users@lists.opensips.org</a> </mc/compose?to=<a ymailto="mailto:Users@lists.opensips.org" href="/mc/compose?to=Users@lists.opensips.org">Users@lists.opensips.org</a>><br>> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>><br>><br>>
------------------------------------------------------------------------<br>><br>> _______________________________________________<br>> Users mailing list<br>> <a ymailto="mailto:Users@lists.opensips.org" href="/mc/compose?to=Users@lists.opensips.org">Users@lists.opensips.org</a><br>> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>> <br><br><br>-- <br>Bogdan-Andrei Iancu<br>OpenSIPS Event - expo, conf, social, bootcamp<br>2 - 4 February 2011, ITExpo, Miami, USA<br>OpenSIPS solutions and "know-how"<br><br><br>_______________________________________________<br>Users mailing list<br><a ymailto="mailto:Users@lists.opensips.org" href="/mc/compose?to=Users@lists.opensips.org">Users@lists.opensips.org</a><br><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br></div></blockquote></td></tr></table><br>