The new accounting system gives you a choice: a dialog-level approach,
by enabling "cdr", which results in a single table row containing all
relevant info for a CDR (start time, pick up time, end time, etc.) or a
transaction-level approach which allows you to log each request that is
relevant to your accounting.
By enabling the "cdr" flag, and calling do_accounting() for both INVITEs
and BYEs, you seem to be doing both dialog and transaction accounting at
the same time, and the module silently discards the BYE.
If you really need those BYEs in there, however, you can force them in
with acc_db_request() instead. Mind you that they might get inserted
before the INVITE rows, since the INVITE CDR is really only completed
when the in-dialog BYE reply arrives.
The documentation might use some updates to more clearly reflect the
above, so thanks for the report!
Regards,
Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com
On 15.08.2017 15:52, Jonathan Mabrito wrote:
HI Liviu,
I am not sure attachments work on this list system, so let me know if
it doesn't. In the meantime...assuming they do, I am attaching a
~205KB zip with the debug log. Just do a text search from the bottom
of the log for "BYE" and you will see my last attempt. It was a
inbound attempt from the PSTN to our PBX and I dialed +1 6504526830. I
verified the INVITE was in the ACC table in the MYSQL database, but
not the BYE.
On Mon, Aug 14, 2017 at 12:28 PM Liviu Chircu <[email protected]
<mailto:[email protected]>> wrote:
Hi Jonathan,
Tried to reproduce it on 2.3.1 - no success. Can you also provide
the debug logs between the last two statements you posted?
Regards,
Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com
On 11.08.2017 15:43, Jonathan Mabrito wrote:
I recently upgraded from OpenSIPS 2.2 to 2.3.1. Within the ACC
module, I would get accounting information in the DB on the
INVITES and the BYES on 2.2. After the upgrade to 2.3.1, I am
getting the INVITES, but not the BYES. I made the adjustments per
the migration guide for the extra_fields modparam that was
introduced.
Here is the script clause I am using for BYE's:
/ if(loose_route())/
/{/
/xlog("Transaction is a loose route \n");/
/
/
/if(is_method("BYE")){/
/#Accounting/
/xlog("Processing BYE Message")/
/if((!($ru =~ 'sip:05.*')) && (!($ru =~ '172.18.24.102.*')) &&
(!($ru =~ 'sip.*@172.18.24.102:5060
<mailto:sip.*@172.18.24.102:5060>')))/
/{/
/xlog("Processing BYE Accounting")/
/$acc_extra(FROM) = $fu;/
/$acc_extra(TO) = $tu;/
/$acc_extra(RULE) = $avp(dr_rule_id);/
/$acc_extra(DEST) = $avp(dr_gw_id);/
/$acc_extra(REQURI) = $ru;/
/do_accounting("db", "cdr|missed|failed", "acc");/
/}/
/}/
/
/
/route(relay);/
/}/
/
/
In the syslog, I see these 4 statements back to back consecutively :
/Aug 10 15:54:16 VOPS /usr/sbin/opensips[8980]: Transaction is a
loose route/
/Aug 10 15:54:16 VOPS /usr/sbin/opensips[8980]: Processing BYE
Message/
/Aug 10 15:54:16 VOPS /usr/sbin/opensips[8980]: Processing BYE
Accounting/
/Aug 10 15:54:16 VOPS /usr/sbin/opensips[8980]: route[relay]/
/
/
So from what I can tell, when the BYE happens, it is making it
into the proper section of the script. Any idea why the BYE isn't
being accounted?
/
/
/
/
--
-Jonathan
_______________________________________________
Users mailing list
[email protected] <mailto:[email protected]>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected] <mailto:[email protected]>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
--
-Jonathan
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users