Re: [OpenSIPS-Users] dialog and accounting problem
Hi Denis, I agree with you on the 4th xlog - it should be printed only if the BYE matched the dialog - of course, if you identified the xlog sequence correctly :) If the BYE matched the dialog, then the dialog should be terminated and no timeout. What I can think of is that the BYE is not considered by opensips - do you see any errors in logs related to the BYE processing ? Regards, Bogdan On 03/30/2011 06:29 AM, Denis Putyato wrote: Hello Bogdan I have a lot of calls through Opensips. I found such call accidentally by looking another problem calls which has expired dialogs. I will try to use debug 4 but I want pay your attention to fourth xlog. This xlog appear only when condition if (!$DLG_status == NULL) is true. I see this xlog in log file, so Opensips as I understand, matched BYE to the dialog. -Original Message- From: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu Sent: Tuesday, March 29, 2011 6:01 PM To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] dialog and accounting problem Hi Denis, Indeed, the SIP capture looks like opensips is not matching the received BYE to the dialogThis is why the timeout is fired. But is strange, I do no see any obvious reason for the the matching to fail... If you can reproduce this case, could you enable full debug in opensips (debug=4) in order to get more info regarding the BYE processing...Assuming that what you say is true - you get all 4 xlogs for the BYE. Regards, Bogdan Denis Putyato wrote: Hello In SIP trace 1.1.1.1 – callee 2.2.2.2 – Opensips 3.3.3.3 – callee I have Opensips 1.6.4-2. …. modparam("dialog", "hash_size", 4096) modparam("dialog", "log_profile_hash_size", 12) modparam("dialog", "default_timeout", 1800) modparam("dialog", "timeout_avp", "$avp(i:995)") modparam("dialog", "dlg_match_mode", 1) modparam("dialog", "db_mode", 1) modparam("dialog", "db_url", "mysql://:@localhost/") modparam("dialog", "profiles_with_value", "client;tgrp;tgrpin;tgrpout;answer;outdir;outdiranswer") modparam("dialog", "profiles_no_value", "callin;callout") …. modparam("acc", "early_media", 0) modparam("acc", "report_ack", 0) modparam("acc", "report_cancels", 1) modparam("acc", "detect_direction", 1) modparam("acc", "db_flag", 15) modparam("acc", "db_missed_flag", 16) modparam("acc", "failed_transaction_flag", 17) modparam("acc", "db_table_acc", "acc") modparam("acc", "db_table_missed_calls", "acc") … modparam("acc", "cdr_flag", 22) modparam("acc", "db_url", "mysql://:@localhost/") modparam("acc", "db_extra","src_in=$avp(i:600);src_user=$avp(i:500);src_domain=$si; src_out=$avp(i:30);dst_in=$avp(s:dstin);dst_user=$avp(s:callee);dst_out=$avp(s:out);dst_domain=$avp(s:domain)") ….. route { if (is_method("BYE")) xlog("L_INFO", "…."); if (has_totag()) { if (is_method("BYE")) xlog("L_INFO", "…."); record_route(); if (loose_route()) { if (is_method("BYE")) xlog("L_INFO", "…."); if (!$DLG_status == NULL) { if (is_method("BYE")) { xlog("L_INFO", "…."); … } } … } For accounting purposes I am using cdr_flag. For the certain call, the SIP trace of which you can see in attachment, there is $avp(i:995) = . The call was successful, duration is about 50 s (if you see SIP trace). but in acc table I have a record with duration 10045. As you can see Opensips tries to finish the call by sending BYE to both callee and caller after timeout of $avp(i:995) expired although BYE from callee has been received before and has been successfully sent by Opensips to caller. And as I suppose Opensips for some reason didn’t indicate the end of call when received first BYE. All 4 xlog("L_INFO", "…."); for the first BYE I can see in log file of Opensips. Thank you for any help -- Bogdan-Andrei Iancu OpenSIPS eBootcamp - 2nd of May 2011 OpenSIPS solutions and "know-how" ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] dialog and accounting problem
Hello Bogdan I have a lot of calls through Opensips. I found such call accidentally by looking another problem calls which has expired dialogs. I will try to use debug 4 but I want pay your attention to fourth xlog. This xlog appear only when condition if (!$DLG_status == NULL) is true. I see this xlog in log file, so Opensips as I understand, matched BYE to the dialog. -Original Message- From: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu Sent: Tuesday, March 29, 2011 6:01 PM To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] dialog and accounting problem Hi Denis, Indeed, the SIP capture looks like opensips is not matching the received BYE to the dialogThis is why the timeout is fired. But is strange, I do no see any obvious reason for the the matching to fail... If you can reproduce this case, could you enable full debug in opensips (debug=4) in order to get more info regarding the BYE processing...Assuming that what you say is true - you get all 4 xlogs for the BYE. Regards, Bogdan Denis Putyato wrote: > > Hello > > In SIP trace > > 1.1.1.1 – callee > > 2.2.2.2 – Opensips > > 3.3.3.3 – callee > > I have Opensips 1.6.4-2. > > …. > > modparam("dialog", "hash_size", 4096) > > modparam("dialog", "log_profile_hash_size", 12) > > modparam("dialog", "default_timeout", 1800) > > modparam("dialog", "timeout_avp", "$avp(i:995)") > > modparam("dialog", "dlg_match_mode", 1) > > modparam("dialog", "db_mode", 1) > > modparam("dialog", "db_url", "mysql://:@localhost/") > > modparam("dialog", "profiles_with_value", > "client;tgrp;tgrpin;tgrpout;answer;outdir;outdiranswer") > > modparam("dialog", "profiles_no_value", "callin;callout") > > …. > > modparam("acc", "early_media", 0) > > modparam("acc", "report_ack", 0) > > modparam("acc", "report_cancels", 1) > > modparam("acc", "detect_direction", 1) > > modparam("acc", "db_flag", 15) > > modparam("acc", "db_missed_flag", 16) > > modparam("acc", "failed_transaction_flag", 17) > > modparam("acc", "db_table_acc", "acc") > > modparam("acc", "db_table_missed_calls", "acc") > > … > > modparam("acc", "cdr_flag", 22) > > modparam("acc", "db_url", "mysql://:@localhost/") > > modparam("acc", > "db_extra","src_in=$avp(i:600);src_user=$avp(i:500);src_domain=$si; > > src_out=$avp(i:30);dst_in=$avp(s:dstin);dst_user=$avp(s:callee);dst_out=$avp(s:out);dst_domain=$avp(s:domain)") > > ….. > > route { > > if (is_method("BYE")) xlog("L_INFO", "…."); > > if (has_totag()) { > > if (is_method("BYE")) xlog("L_INFO", "…."); > > record_route(); > > if (loose_route()) { > > if (is_method("BYE")) xlog("L_INFO", "…."); > > if (!$DLG_status == NULL) { > > if (is_method("BYE")) { > > xlog("L_INFO", "…."); > > … > > } > > } > > … > > } > > For accounting purposes I am using cdr_flag. > > For the certain call, the SIP trace of which you can see in > attachment, there is $avp(i:995) = . The call was successful, > duration is about 50 s (if you see SIP trace). but in acc table I have > a record with duration 10045. As you can see Opensips tries to finish > the call by sending BYE to both callee and caller after timeout of > $avp(i:995) expired although BYE from callee has been received before > and has been successfully sent by Opensips to caller. And as I suppose > Opensips for some reason didn’t indicate the end of call when received > first BYE. > > All 4 xlog("L_INFO", "…."); for the first BYE I can see in log file of > Opensips. > > Thank you for any help > > > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu OpenSIPS eBootcamp - 2nd May 2011 OpenSIPS solutions and "know-how" ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] dialog and accounting problem
Hi Denis, Indeed, the SIP capture looks like opensips is not matching the received BYE to the dialogThis is why the timeout is fired. But is strange, I do no see any obvious reason for the the matching to fail... If you can reproduce this case, could you enable full debug in opensips (debug=4) in order to get more info regarding the BYE processing...Assuming that what you say is true - you get all 4 xlogs for the BYE. Regards, Bogdan Denis Putyato wrote: Hello In SIP trace 1.1.1.1 – callee 2.2.2.2 – Opensips 3.3.3.3 – callee I have Opensips 1.6.4-2. …. modparam("dialog", "hash_size", 4096) modparam("dialog", "log_profile_hash_size", 12) modparam("dialog", "default_timeout", 1800) modparam("dialog", "timeout_avp", "$avp(i:995)") modparam("dialog", "dlg_match_mode", 1) modparam("dialog", "db_mode", 1) modparam("dialog", "db_url", "mysql://:@localhost/") modparam("dialog", "profiles_with_value", "client;tgrp;tgrpin;tgrpout;answer;outdir;outdiranswer") modparam("dialog", "profiles_no_value", "callin;callout") …. modparam("acc", "early_media", 0) modparam("acc", "report_ack", 0) modparam("acc", "report_cancels", 1) modparam("acc", "detect_direction", 1) modparam("acc", "db_flag", 15) modparam("acc", "db_missed_flag", 16) modparam("acc", "failed_transaction_flag", 17) modparam("acc", "db_table_acc", "acc") modparam("acc", "db_table_missed_calls", "acc") … modparam("acc", "cdr_flag", 22) modparam("acc", "db_url", "mysql://:@localhost/") modparam("acc", "db_extra","src_in=$avp(i:600);src_user=$avp(i:500);src_domain=$si; src_out=$avp(i:30);dst_in=$avp(s:dstin);dst_user=$avp(s:callee);dst_out=$avp(s:out);dst_domain=$avp(s:domain)") ….. route { if (is_method("BYE")) xlog("L_INFO", "…."); if (has_totag()) { if (is_method("BYE")) xlog("L_INFO", "…."); record_route(); if (loose_route()) { if (is_method("BYE")) xlog("L_INFO", "…."); if (!$DLG_status == NULL) { if (is_method("BYE")) { xlog("L_INFO", "…."); … } } … } For accounting purposes I am using cdr_flag. For the certain call, the SIP trace of which you can see in attachment, there is $avp(i:995) = . The call was successful, duration is about 50 s (if you see SIP trace). but in acc table I have a record with duration 10045. As you can see Opensips tries to finish the call by sending BYE to both callee and caller after timeout of $avp(i:995) expired although BYE from callee has been received before and has been successfully sent by Opensips to caller. And as I suppose Opensips for some reason didn’t indicate the end of call when received first BYE. All 4 xlog("L_INFO", "…."); for the first BYE I can see in log file of Opensips. Thank you for any help ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu OpenSIPS eBootcamp - 2nd May 2011 OpenSIPS solutions and "know-how" ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] dialog and accounting problem
Hello In SIP trace 1.1.1.1– callee 2.2.2.2 – Opensips 3.3.3.3 – callee I have Opensips 1.6.4-2. …. modparam("dialog", "hash_size", 4096) modparam("dialog", "log_profile_hash_size", 12) modparam("dialog", "default_timeout", 1800) modparam("dialog", "timeout_avp", "$avp(i:995)") modparam("dialog", "dlg_match_mode", 1) modparam("dialog", "db_mode", 1) modparam("dialog", "db_url", "mysql://:@localhost/") modparam("dialog", "profiles_with_value", "client;tgrp;tgrpin;tgrpout;answer;outdir;outdiranswer") modparam("dialog", "profiles_no_value", "callin;callout") …. modparam("acc", "early_media", 0) modparam("acc", "report_ack", 0) modparam("acc", "report_cancels", 1) modparam("acc", "detect_direction", 1) modparam("acc", "db_flag", 15) modparam("acc", "db_missed_flag", 16) modparam("acc", "failed_transaction_flag", 17) modparam("acc", "db_table_acc", "acc") modparam("acc", "db_table_missed_calls", "acc") … modparam("acc", "cdr_flag", 22) modparam("acc", "db_url", "mysql://:@localhost/") modparam("acc", "db_extra","src_in=$avp(i:600);src_user=$avp(i:500);src_domain=$si; src_out=$avp(i:30);dst_in=$avp(s:dstin);dst_user=$avp(s:callee);dst_out=$avp(s:out);dst_domain=$avp(s:domain)") ….. route { if (is_method("BYE")) xlog("L_INFO", "…."); if (has_totag()) { if (is_method("BYE")) xlog("L_INFO", "…."); record_route(); if (loose_route()) { if (is_method("BYE")) xlog("L_INFO", "…."); if (!$DLG_status == NULL) { if (is_method("BYE")) { xlog("L_INFO", "…."); … } } … } For accounting purposes I am using cdr_flag. For the certain call, the SIP trace of which you can see in attachment, there is $avp(i:995) = . The call was successful, duration is about 50 s (if you see SIP trace). but in acc table I have a record with duration 10045. As you can see Opensips tries to finish the call by sending BYE to both callee and caller after timeout of $avp(i:995) expired although BYE from callee has been received before and has been successfully sent by Opensips to caller. And as I suppose Opensips for some reason didn’t indicate the end of call when received first BYE. All 4 xlog("L_INFO", "…."); for the first BYE I can see in log file of Opensips. Thank you for any help U 2011/03/24 09:32:44.180633 1.1.1.1:59196 -> 2.2.2.2:5060 INVITE sip:78124485322@2.2.2.2:5060 SIP/2.0. Via: SIP/2.0/UDP 1.1.1.1:5060;x-route-tag="tgrp:TFOP";branch=z9hG4bK21E40ED7. From: ;tag=9CBBDF4-D2B. To: . Date: Thu, 24 Mar 2011 06:32:40 GMT. Call-ID: 59DD6AAB-551711E0-9BFBA2C8-C63BD640@1.1.1.1. Supported: 100rel,timer,resource-priority,replaces,sdp-anat. Min-SE: 1800. Cisco-Guid: 1507563059-1427575264-2679242786-2438473264. User-Agent: Cisco-SIPGateway/IOS-12.x. Accept-Language: ru. Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER. CSeq: 101 INVITE. Max-Forwards: 15. Timestamp: 1300948360. Contact: . Expires: 60. Allow-Events: telephone-event. P-Asserted-Identity: . Content-Type: application/sdp. Content-Disposition: session;handling=required. Content-Length: 422. . v=0. o=CiscoSystemsSIP-GW-UserAgent 9140 2676 IN IP4 1.1.1.1. s=SIP Call. c=IN IP4 1.1.1.1. t=0 0. m=audio 21598 RTP/AVP 8 0 18 4 98 3 101. c=IN IP4 1.1.1.1. a=rtpmap:8 PCMA/8000. a=rtpmap:0 PCMU/8000. a=rtpmap:18 G729/8000. a=fmtp:18 annexb=yes. a=rtpmap:4 G723/8000. a=fmtp:4 bitrate=6.3;annexa=yes. a=rtpmap:98 G726-32/8000. a=rtpmap:3 GSM/8000. a=rtpmap:101 telephone-event/8000. a=fmtp:101 0-16. U 2011/03/24 09:32:44.180909 2.2.2.2:5060 -> 1.1.1.1:5060 SIP/2.0 100 Giving a try. Via: SIP/2.0/UDP 1.1.1.1:5060;x-route-tag="tgrp:TFOP";branch=z9hG4bK21E40ED7. From: ;tag=9CBBDF4-D2B. To: . Call-ID: 59DD6AAB-551711E0-9BFBA2C8-C63BD640@1.1.1.1. CSeq: 101 INVITE. Content-Length: 0. . U 2011/03/24 09:32:44.181410 2.2.2.2:5060 -> 3.3.3.3:5060 INVITE sip:78124485322@3.3.3.3:5060 SIP/2.0. Record-Route: . Via: SIP/2.0/UDP 2.2.2.2;branch=z9hG4bKb72a.96697e7.0. Via: SIP/2.0/UDP 1.1.1.1:5060;x-route-tag="tgrp:TFOP";branch=z9hG4bK21E40ED7. From: ;tag=9CBBDF4-D2B. To: . Date: Thu, 24 Mar 2011 06:32:40 GMT. Call-ID: 59DD6AAB-551711E0-9BFBA2C8-C63BD640@1.1.1.1. Supported: 100rel,timer,resource-priority,replaces,sdp-anat. Min-SE: 1800. Cisco-Guid: 1507563059-1427575264-2679242786-2438473264. User-Agent: Cisco-SIPGateway/IOS-12.x. Accept-Language: ru. Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER. CSeq: 101 INVITE. Max-Forwards: 15. Timestamp: 1300948360. Contact: . Remote-Party-ID:;party=calling;screen=yes;privacy=off Expires: 60. Allow-Events: telephone-event. P-Asserted-Identity: . Content-Type: application/sdp. Content-Disposition: session;handling=required. Content-Length: 422. . v=0. o=CiscoSystemsSIP-GW-UserAgent 9140 2676 IN IP4 1.1.1.1. s=SIP Call. c=IN IP4 1.1.1.1. t=0 0. m=audio 21598 RTP/AVP 8 0 18 4 98 3 101. c=IN IP4 1.1.1.1. a=rtpmap: