[OpenSIPS-Users] dialog and accounting problem

Denis Putyato denis7979 at mail.ru
Thu Mar 24 11:27:36 CET 2011


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://xxxx:xxxx@localhost/xxxx")

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://xxxx:xxxx@localhost/xxxx")

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) = 9999. 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

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20110324/07a026b5/attachment-0001.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: trace.txt
URL: <http://lists.opensips.org/pipermail/users/attachments/20110324/07a026b5/attachment-0001.txt>


More information about the Users mailing list