ACC module
Admin Guide
Section titled “Admin Guide”Overview
Section titled “Overview”ACC module is used to account transactions information to different backends like syslog, SQL, AAA and DIAMETER (beta version).
To account a transaction and to choose which set of backends to be used, the script writer just has to use mark the transaction for accouting by using the do accounting script function. Note that the function is not actually doing the accounting at that very process, it is just setting a marker - the actual accouting will be done later when the transaction or dialog will be completed.
Even so, the module allows the script writter to force accounting on the spot in special cases via some other script functions.
The accounting module will log by default a fixed set of attributes for the transaction - if you customize your accounting by adding more information to be logged, please see the next chapter about extra accounting - ACC extra id.
The fixed minimal accounting information is:
- Request Method name
- From header TAG parameter
- To header TAG parameter
- Call-Id
- 3-digit Status code from final reply
- Reason phrase from final reply
- Time stamp when transaction was completed
If a value is not present in request, the empty string is accounted instead.
Note that:
- A single INVITE may produce multiple accounting reports — that’s due to SIP forking feature.
- Since version 2.2 all flags used for accounting have been replaced by the do_accounting function. No need to worry anymore of whether you have set the flags or not, or be confused by various flag names, now you only have to call the function and it will do all the work for you.
- OpenSIPS now supports session/dialog accounting. It can automatically correlate INVITEs with BYEs for generating proper CDRs, for example for purpose of billing.
- If a UA fails in middle of conversation, a proxy will never find out about it. In general, a better practice is to account from an end-device (such as PSTN gateway), which best knows about call status (including media status and PSTN status in case of the gateway).
The SQL, Event Interface and AAA backend support are compiled in the module.
A very comprehensive description of how the accounting module works in terms accounting scope, accounting events and accounting backends can be found in this online Advanced Accounting Tutorial.
General Example
Section titled “General Example”loadmodule "modules/acc/acc.so"
if (uri=~"sip:+40") /* calls to Romania */ { if (!proxy_authorize("sip_domain.net" /* realm */, "subscriber" /* table name */)) { proxy_challenge("sip_domain.net" /* realm */, "0" /* no qop */ ); exit; }
if (is_method("INVITE") && !db_check_from()) { xlog("FROM URI != digest username\n"); sl_send_reply("403","Forbidden"); }
do_accounting("log"); /* set for accounting via syslog */ t_relay(); /* enter stateful mode now */};Extra accounting
Section titled “Extra accounting”Overview
Section titled “Overview”Along the static default information, ACC modules allows dynamical selection of extra information to be logged. This allows you to log any pseudo-variable (AVPs, parts of the request, parts of the reply, etc).
Definitions and syntax
Section titled “Definitions and syntax”Selection of extra information is done via xxx_extra parameters by specifying the names of additional information you want to log. This information is defined via pseudo-variables and may include headers, AVPs values or other message or system values. The syntax of the parameter is:
- xxx_extra = extra_definition (’;‘extra_definition)*
- extra_definition = log_name ’=’ pseudo_variable [‘/reply’]
Each PV (pseudo variable) may be evaluated in the context of the request message (to access info from it) or in the context of the reply message (final reply for the request).
Using “/reply” marker, the PV will be evaluated in the context of the reply; by default (without the marker), the evaluation is done in the contect of the request. This will allow you to automatically account information (message or network related) from both request and reply in the same time.
The full list of supported pseudo-variables in OpenSIPS is availabe at: /manual/2-2/script-corevar/
Via log_name you define how/where the data will be logged. Its meaning depends of the accounting support which is used:
-
LOG accounting - log_name will be just printed along with the data in log_name=data format;
-
DB accounting - log_name will be the name of the DB column where the data will be stored.
-
AAA accounting - log_name will be the AVP name used for packing the data into AAA message. The log_name will be translated to AVP number via the dictionary.
-
DIAMETER accounting - log_name will be the AVP code used for packing the data into DIAMETER message. The AVP code is given directly as integer, since DIAMETER has no dictionary support yet.
-
Events accounting - log_name will be the name of the parameter in the event raised.
How it works
Section titled “How it works”Some pseudo variables may return more than one value (like headers or AVPs). In this case, the returned values are embedded in a single string in a comma-separated format.
Radius accounting dependencies
Section titled “Radius accounting dependencies”If radius accounting is used, except from a radius client library which is mandatory, dictionary.rfc2866 must be included for the module to work properly.
Multi Call-Legs accounting
Section titled “Multi Call-Legs accounting”Overview
Section titled “Overview”A SIP call can have multiple legs due forwarding actions. For example user A calls user B which forwards the call to user C. There is only one SIP call but with 2 legs ( A to B and B to C). Accounting the legs of a call is required for proper billing of the calls (if C is a PSTN number and the call is billed, user B must pay for the call - as last party modifing the call destination-, and not A - as initiator of the call. Call forwarding on server is only one example which shows the necessity of the having an accounting engine with multiple legs support.
Configuration
Section titled “Configuration”First how it works: The idea is to have a set of AVPs and for each call leg to store a set of values in the AVPs. The meaning of the AVP content is stricly decided by the script writer - it can be the origin and source of the leg, its status or any other related information. If you have a set of 4 AVPS (AVP1, AVP2, AVP3, AVP4), then for the “A call B and B forwards to C” example, you need to set a different set of values for the AVPs for each leg ([A,B] and [B,C]) . The script writer must take care and properly insert all these AVP from the script (in proper order and with the correct type).
When the accounting information for the call will be written/sent, all the call-leg pairs will be added (based on the found AVP sets).
By default, the multiple call-leg support is disabled - it can be
enabled just by setting the per-leg set of AVPs via the
multi_leg_info and/or
multi_leg_bye_info module parameters. Note that
the last one only makes sense only for CDRs that are generated
automatically by OpenSIPS.
Important: when both multi-leg accounting is done (for INVITE and BYE), you have to make sure that the AVPs are populated with the same number of legs, otherwise the multi-leg accounting will have an unexpected behavior (values may no longer match the leg number).
Logged data
Section titled “Logged data”For each call, all the values of the AVP set (which defines a call-leg) will be logged. How the information will be actually logged, depends of the data backend:
- syslog — all leg-sets will be added to one record string as AVP1=xxx, AVP2=xxxx ,… sets.
- database — each pair will be separately logged (due DB data structure constraints); several records will be written, the difference between them being only the fields corresponding to the call-leg info.
- AAA — all sets will be added to the same AAA accounting message as AAA AVPs - for each call-leg a set of AAA AVPs will be added (corresponding to the per-leg AVP set)
- Diameter same as for AAA.
- events — each pair will appear as a different parameter-value pair in the event. Similar to the database behavior, multiple events will be raised, and the only difference between them is the leg information.
CDRs accounting
Section titled “CDRs accounting”Overview
Section titled “Overview”ACC module can now also maintain session/dialog accounting. This allows you to log useful information like call duration, call start time and setup time.
Configuration
Section titled “Configuration”In order to have CDRs accounting, first you need to set the cdr flag when calling do accounting script function for the initial INVITE of the dialog.
How it works
Section titled “How it works”This type of accounting is based on the dialog module. When an initial INVITE is received, if the cdr flag is set, then the dialog creation time is saved. Once the call is answered and the ACK is received, other information like extra values or leg values are saved. When the corresponding BYE is received, the call duration is computed and all information is stored to the desired backend.
Dependencies
Section titled “Dependencies”OpenSIPS Modules
Section titled “OpenSIPS Modules”The module depends on the following modules (in the other words the listed modules must be loaded before this module):
- tm — Transaction Manager
- a database module — If SQL support is used.
- rr — Record Route, if “detect_direction” module parameter is enabled.
- an aaa module
- dialog — Dialog, if “cdr” option is used
External Libraries or Applications
Section titled “External Libraries or Applications”The following libraries or applications must be installed before running OpenSIPS with this module loaded:
- none.
Exported Parameters
Section titled “Exported Parameters”early_media (integer)
Section titled “early_media (integer)”Should be early media (any provisional reply with body) accounted too ?
Default value is 0 (no).
modparam("acc", "early_media", 1)report_cancels (integer)
Section titled “report_cancels (integer)”By default, CANCEL reporting is disabled — most accounting applications wants to see INVITE’s cancellation status. Turn on if you explicitly want to account CANCEL transactions.
Default value is 0 (no).
modparam("acc", "report_cancels", 1)detect_direction (integer)
Section titled “detect_direction (integer)”Controls the direction detection for sequential requests. If enabled (non zero value), for sequential requests with upstream direction (from callee to caller), the FROM and TO will be swapped (the direction will be preserved as in the original request).
It affects all values related to TO and FROM headers (body, URI, username, domain, TAG).
Default value is 0 (disabled).
modparam("acc", "detect_direction", 1)multi_leg_info (string)
Section titled “multi_leg_info (string)”Defines the AVP set to be used in per-call-leg accounting. See multi call legs for a detailed description of the Multi Call-Legs accounting.
If empty, the multi-leg accounting support will be disabled.
Default value is 0 (disabled).
# for syslog-based accounting, use any text you want to be printedmodparam("acc", "multi_leg_info", "text1=$avp(src);text2=$avp(dst)")# for mysql-based accounting, use the names of the columnsmodparam("acc", "multi_leg_info", "leg_src=$avp(src);leg_dst=$avp(dst)")# for AAA-based accounting, use the names of the AAA AVPsmodparam("acc", "multi_leg_info", "AAA_LEG_SRC=$avp(src);AAA_LEG_DST=$avp(dst)")# for DIAMETER-based accounting, use the DIAMETER AVP ID (as integer)modparam("acc", "multi_leg_info", "2345=$avp(src);2346=$avp(dst)")multi_leg_bye_info (string)
Section titled “multi_leg_bye_info (string)”Defines the AVP set to be used in per-call-leg accounting. See multi call legs for a detailed description of the Multi Call-Legs accounting. This parameter evaluates the AVPs set for BYE requests. It makes sense only when the CDRs are automatically generated, using the dialog support. Note: since the CDR is generated when the BYE message matches the dialog, these variables need to be populated before calling loose_route() or match_dialog().
If empty, the multi-leg support for BYE requests is disabled.
Default value is 0 (disabled).
# for syslog-based accounting, use any text you want to be printedmodparam("acc", "multi_leg_bye_info", "text1=$avp(src);text2=$avp(dst)")# for mysql-based accounting, use the names of the columnsmodparam("acc", "multi_leg_bye_info", "leg_src=$avp(src);leg_dst=$avp(dst)")# for AAA-based accounting, use the names of the AAA AVPsmodparam("acc", "multi_leg_bye_info", "AAA_LEG_SRC=$avp(src);AAA_LEG_SRC=$avp(dst)")log_level (integer)
Section titled “log_level (integer)”Log level at which accounting messages are issued to syslog.
Default value is L_NOTICE.
modparam("acc", "log_level", 2) # Set log_level to 2log_facility (string)
Section titled “log_facility (string)”Log facility to which accounting messages are issued to syslog. This allows to easily seperate the accounting specific logging from the other log messages.
Default value is LOG_DAEMON.
modparam("acc", "log_facility", "LOG_DAEMON")log_extra (string)
Section titled “log_extra (string)”Extra values to be logged.
Default value is NULL.
modparam("acc", "log_extra", "uaA=$hdr(User-Agent);uaB=$hdr(Server)/reply;uuid=$avp(123)")log_extra_bye (string)
Section titled “log_extra_bye (string)”Extra values to be logged to logfile. Note that this parameter makes sense only when the cdr option is used with do_accounting(). Note: since the CDR is generated when the BYE message matches the dialog, these variables need to be populated before calling loose_route() or match_dialog().
Default value is NULL.
modparam("acc", "log_extra_bye", "uaA=$hdr(User-Agent);uaB=$hdr(Server)/reply;uuid=$avp(123)")aaa_url (string)
Section titled “aaa_url (string)”This is the url representing the AAA protocol used and the location of the configuration file of this protocol.
If the parameter is set to empty string, the AAA accounting support will be disabled.
Default value is “NULL”.
...modparam("acc", "aaa_url", "radius:/etc/radiusclient-ng/radiusclient.conf")...service_type (integer)
Section titled “service_type (integer)”AAA service type used for accounting.
Default value is not-set.
# Default value of service type for SIP is 15modparam("acc", "service_type", 15)aaa_extra (string)
Section titled “aaa_extra (string)”Extra values to be logged via AAA - AAA specific.
Default value is NULL.
modparam("acc", "aaa_extra", "via=$hdr(Via[*]); email=$avp(email); Bcontact=$ct / reply")aaa_extra_bye (string)
Section titled “aaa_extra_bye (string)”Extra values to be logged via AAA when a BYE message is received - AAA specific. Note that this parameter makes sense only when the cdr option is used with do_accounting. Note: since the CDR is generated when the BYE message matches the dialog, these variables need to be populated before calling loose_route() or match_dialog().
Default value is NULL.
modparam("acc", "aaa_extra_bye", "via=$hdr(Via[*]); email=$avp(email); Bcontact=$ct / reply")db_table_acc (string)
Section titled “db_table_acc (string)”Table name of accounting successfull calls — database specific.
Default value is “acc”
modparam("acc", "db_table_acc", "myacc_table")db_table_missed_calls (string)
Section titled “db_table_missed_calls (string)”Table name for accounting missed calls — database specific.
Default value is “missed_calls”
modparam("acc", "db_table_missed_calls", "myMC_table")db_url (string)
Section titled “db_url (string)”SQL address — database specific. If is set to NULL or empty string, the SQL support is disabled.
Default value is “NULL” (SQL disabled).
modparam("acc", "db_url", "mysql://user:password@localhost/opensips")acc_method_column (string)
Section titled “acc_method_column (string)”Column name in accounting table to store the request’s method name as string.
Default value is “method”.
modparam("acc", "acc_method_column", "method")acc_from_tag_column (string)
Section titled “acc_from_tag_column (string)”Column name in accounting table to store the From header TAG parameter.
Default value is “from_tag”.
modparam("acc", "acc_from_tag_column", "from_tag")acc_to_tag_column (string)
Section titled “acc_to_tag_column (string)”Column name in accounting table to store the To header TAG parameter.
Default value is “to_tag”.
modparam("acc", "acc_to_tag_column", "to_tag")acc_callid_column (string)
Section titled “acc_callid_column (string)”Column name in accounting table to store the request’s Callid value.
Default value is “callid”.
modparam("acc", "acc_callid_column", "callid")acc_sip_code_column (string)
Section titled “acc_sip_code_column (string)”Column name in accounting table to store the final reply’s numeric code value in string format.
Default value is “sip_code”.
modparam("acc", "acc_sip_code_column", "sip_code")acc_sip_reason_column (string)
Section titled “acc_sip_reason_column (string)”Column name in accounting table to store the final reply’s reason phrase value.
Default value is “sip_reason”.
modparam("acc", "acc_sip_reason_column", "sip_reason")acc_time_column (string)
Section titled “acc_time_column (string)”Column name in accounting table to store the time stamp of the transaction completion in date-time format.
Default value is “time”.
modparam("acc", "acc_time_column", "time")db_extra (string)
Section titled “db_extra (string)”Extra values to be logged into database - DB specific.
Default value is NULL.
modparam("acc", "db_extra", "ct=$hdr(Content-type); email=$avp(email)")db_extra_bye (string)
Section titled “db_extra_bye (string)”Extra values to be logged into database when a BYE message is received - DB specific. Note that this parameter makes sense only when the cdr option is used with do_accounting. Note: since the CDR is generated when the BYE message matches the dialog, these variables need to be populated before calling loose_route() or match_dialog().
Default value is NULL.
modparam("acc", "db_extra_bye", "ct=$hdr(Content-type); email=$avp(email)")diameter_client_host (string)
Section titled “diameter_client_host (string)”Hostname of the machine where the DIAMETER Client is running — DIAMETER specific.
Default value is “localhost”.
modparam("acc", "diameter_client_host", "3a_server.net")diameter_client_port (int)
Section titled “diameter_client_port (int)”Port number where the Diameter Client is listening — DIAMETER specific.
Default value is “3000”.
modparam("acc", "diameter_client_port", 3000)diameter_extra (string)
Section titled “diameter_extra (string)”Extra values to be logged via DIAMETER - DIAMETER specific.
Default value is NULL.
modparam("acc", "diameter_extra", "7846=$hdr(Content-type);7847=$avp(email)")evi_extra (string)
Section titled “evi_extra (string)”Extra values to be attached as event’s parameters.
Default value is NULL.
modparam("acc", "evi_extra", "uaA=$hdr(User-Agent);uaB=$hdr(Server)/reply;uuid=$avp(123)")evi_extra_bye (string)
Section titled “evi_extra_bye (string)”Extra values to be attached as event’s parameters for BYE messages. Note that this parameter makes sense only when the cdr option is used with do_accounting. Note: since the CDR is generated when the BYE message matches the dialog, these variables need to be populated before calling loose_route() or match_dialog().
Default value is NULL.
modparam("acc", "evi_extra_bye", "uaA=$hdr(User-Agent);uaB=$hdr(Server)/reply;uuid=$avp(123)")acc_created_avp_name (string)
Section titled “acc_created_avp_name (string)”The name of the openSips avp that will be used to hold the time when the call was created. This time will only be logged on missed calls.
Default value is “accX_created”.
modparam("acc", "acc_created_avp_name", "call_created_avp")Exported Functions
Section titled “Exported Functions”do_accounting(type, flags, table)
Section titled “do_accounting(type, flags, table)”do_accounting() replace all the
*_flag and, *_missed_flag, cdr_flag, failed transaction_flag and the
db_table_avp modpara. Just call do_accounting(), select where you want
to do accounting and how and the function will do all the job for you.
Meaning of the parameters is as follows:
- type - the type of accounting you want to do.
All the types have to be separated by ’|’. The following parameters can
be used:
- log - syslog accounting;
- db - database accounting;
- aaa - aaa specific accounting;
- evi - Event Interface accounting;
- diam - Diameter accounting;
- flags - flags for the accouting type you have
selected. All the types have to be separated by ’|’. The following
parameters can be used:
- cdr - also set CDR details when doing accounting; DIALOG MODULE HAS TO BE LOADED;
- missed - log missed calls;
- failed - flag which says if the transaction should be accounted also in case of failure (status>=300);
- table - table where to do the accounting; it replaces old table_avp parameter;
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE, BRANCH_ROUTE and LOCAL_ROUTE.
... if (!has_totag()) { if (is_method("INVITE")) { /* enable cdr and missed calls accounting in the database * and to syslog; db accounting shall be done in "my_acc" table */ do_accounting("db|log", "cdr|missed", "my_acc"); } } ... if (is_method("BYE")) { /* do normal accounting via aaa */ do_accounting("aaa"); } ...drop_accounting([type], [flags])
Section titled “drop_accounting([type], [flags])”drop_accounting() resets flags
and types of accounting set with do_accounting(). If called with no
arguments all accounting will be stopped. If called with only one argument
all accounting for that type will be stopped. If called with two arguments
normal accounting will still be enabled.
Meaning of the parameters is as follows:
- type - the type of accounting you want to stop.
All the types have to be separated by ’|’. The following parameters can
be used:
- log - stop syslog accounting;
- db - stop database accounting;
- aaa - stop aaa specific accounting;
- evi - stop Event Interface accounting;
- diam - stop Diameter accounting;
- flags - flags to be reset for the accouting type you have
selected. All the types have to be separated by ’|’. The following
parameters can be used:
- cdr - stop CDR accounting;
- missed - stop logging missed calls;
- failed - stop failed transaction accounting;
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE, BRANCH_ROUTE and LOCAL_ROUTE.
... acc_log_request("403 Destination not allowed"); if (!has_totag()) { if (is_method("INVITE")) { /* enable cdr and missed calls accounting in the database * and to syslog; db accounting shall be done in "my_acc" table */ do_accounting("db|log", "cdr|missed", "my_acc"); } } ... /* later in your script */ if (...) { /* you don't want accounting anymore */ /* stop all syslog accounting */ drop_accounting("log"); /* or stop missed calls and cdr accounting for syslog; * normal accounting will still be enabled */ drop_accounting("log","missed|cdr"); /* or stop all types of accounting */ drop_accounting(); } ...acc_log_request(comment)
Section titled “acc_log_request(comment)”acc_request reports on a request,
for example, it can be used to report on missed calls to off-line users
who are replied 404 - Not Found. To avoid multiple reports on UDP
request retransmission, you would need to embed the
action in stateful processing.
Meaning of the parameters is as follows:
- comment - Comment describing how the request completed - this string has to contain a reply code followed by a reply reason phrase (ex: “404 Nobody home”). Variables are accepted in this string.
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE, BRANCH_ROUTE and LOCAL_ROUTE.
...acc_log_request("403 Destination not allowed");...acc_db_request(comment, table)
Section titled “acc_db_request(comment, table)”Like acc_log_request,
acc_db_request reports on a
request. The report is sent to database at “db_url”, in
the table referred to in the second action parameter.
Meaning of the parameters is as follows:
- comment - Comment describing how the request completed - this string has to contain a reply code followed by a reply reason phrase (ex: “404 Nobody home”). Variables are accepted in this string.
- table - Database table to be used.
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE, BRANCH_ROUTE and LOCAL_ROUTE.
...acc_db_request("Some comment", "Some table");acc_db_request("$T_reply_code $(<reply>rr)","acc");...acc_aaa_request(comment)
Section titled “acc_aaa_request(comment)”Like acc_log_request,
acc_aaa_request reports on
a request. It reports to aaa server as configured in
“aaa_url”.
Meaning of the parameters is as follows:
- comment - Comment describing how the request completed - this string has to contain a reply code followed by a reply reason phrase (ex: “404 Nobody home”). Variables are accepted in this string.
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE, BRANCH_ROUTE and LOCAL_ROUTE.
...acc_aaa_request("403 Destination not allowed");...acc_diam_request(comment)
Section titled “acc_diam_request(comment)”Like acc_log_request,
acc_diam_request reports on
a request. It reports to the configured Diameter server.
Meaning of the parameters is as follows:
- comment - Comment describing how the request completed - this string has to contain a reply code followed by a reply reason phrase (ex: “404 Nobody home”). Variables are accepted in this string.
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE, BRANCH_ROUTE and LOCAL_ROUTE.
...acc_diam_request("403 Destination not allowed");...acc_evi_request(comment)
Section titled “acc_evi_request(comment)”Like acc_log_request,
acc_evi_request reports on a
request. The report is packed as an event sent through the OpenSIPS Event
Interface as E_ACC_EVENT if the reply code is a
positive one (lower than 300), or E_ACC_MISSED_EVENT
for negative or no codes. More information on this in
ACC events id.
Meaning of the parameters is as follows:
- comment - Comment describing how the request completed - this string has to contain a reply code followed by a reply reason phrase (ex: “404 Nobody home”). Variables are accepted in this string.
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE, BRANCH_ROUTE and LOCAL_ROUTE.
...acc_evi_request("403 Destination not allowed");...Exported Events
Section titled “Exported Events”E_ACC_CDR
Section titled “E_ACC_CDR”The event raised when a CDR is generated. Note that this event will only be triggered if the auto CDR accounting is used.
Parameters:
- method - Request method name
- from_tag - From header tag parameter
- to_tag - To header tag parameter
- callid - Message Call-id
- sip_code - The status code from the final reply
- sip_reason - The status reason from the final reply
- time - The timestamp when the call was established
- evi_extra* - Extra parameters added by the evi_extra parameter.
- evi_extra_bye* - Extra parameters added by the evi_extra_bye parameter
- multi_leg_info* - Extra parameters added by the multi_leg_info parameter
- multi_leg_bye_info* - Extra parameters added by the multi_leg_bye_info parameter
- duration - The call duration in seconds
- setuptime - The call setup time in seconds
- created - The timestamp when the call was created (the initial Invite was received)
E_ACC_EVENT
Section titled “E_ACC_EVENT”This event is triggered when old-style accounting is used. It is
generated when the requests (INVITE and BYE) transaction have
positive final replies, or by the acc_evi_request()
function that has a positive reply code in comment.
Parameters:
- method - Request method name
- from_tag - From header tag parameter
- to_tag - To header tag parameter
- callid - Message Call-id
- sip_code - The status code from the final reply
- sip_reason - The status reason from the final reply
- time - The timestamp when the transaction was created
- evi_extra* - Extra parameters added by the evi_extra parameter
- multi_leg_info* - Extra parameters added by the multi_leg_info parameter
E_ACC_MISSED_EVENT
Section titled “E_ACC_MISSED_EVENT”This event is triggered when old-style accounting is used. It is
generated when the requests (INVITE and BYE) transaction have
negative final replies, or by the acc_evi_request()
function that has a negative reply code in comment.
Parameters:
- method - Request method name
- from_tag - From header tag parameter
- to_tag - To header tag parameter
- callid - Message Call-id
- sip_code - The status code from the final reply
- sip_reason - The status reason from the final reply
- time - The timestamp when the transaction was created
- evi_extra* - Extra parameters added by the evi_extra parameter
- multi_leg_info* - Extra parameters added by the multi_leg_info parameter
- created - Timestamp when the call was created
- setuptime - The call setup time in seconds
Frequently Asked Questions
Section titled “Frequently Asked Questions”Q: What happened with old report_ack parameter
The parameter is considered obsolete. It was removed as acc module is doing SIP transaction based accouting and according to SIP RFC, end2end ACKs are a different transaction (still part of the same dialog). ACKs can be individually accouted as any other sequential (in-dialog) request.
Q: What happened with old log_fmt parameter
The parameter became obsolete with the restructure of the data logged by ACC module (refer to the Overview chapter). For similar behaviour you can use the extra accouting (see the corresponding chapter).
Q: What happened with old multi_leg_enabled parameter
The parameter became obsolete by the addition of the new multi_leg_info parameter. The multi-leg accouting is automatically enabled when multi_leg_info is defined.
Q: What happened with old src_leg_avp_id and dst_leg_avp_id parameters
The parameter was replaced by the more generic new parameter multi_leg_info. This allows logging (per-leg) of more information than just dst and src.
Q: Where can I find more about OpenSIPS?
Take a look at http://www.opensips.org/.
Q: Where can I post a question about this module?
First at all check if your question was already answered on one of our mailing lists:
E-mails regarding any stable OpenSIPS release should be sent to users@lists.opensips.org and e-mails regarding development versions should be sent to devel@lists.opensips.org.
If you want to keep the mail private, send it to users@lists.opensips.org.
Q: How can I report a bug?
Please follow the guidelines provided at: https://github.com/OpenSIPS/opensips/issues.
doc copyrights:
Contributors
Section titled “Contributors”By Commit Statistics
Section titled “By Commit Statistics”Top contributors by DevScore(1), authored commits(2) and lines added/removed(3)
| # | Name | DevScore | Commits | Lines++ | Lines— |
|---|---|---|---|---|---|
| 1. | Bogdan-Andrei Iancu (@bogdan-iancu) | 220 | 103 | 4326 | 4809 |
| 2. | Jan Janak (@janakj) | 149 | 16 | 5605 | 5092 |
| 3. | Ionut Ionita (@ionutrazvanionita) | 88 | 27 | 2821 | 2217 |
| 4. | Razvan Crainea (@razvancrainea) | 67 | 40 | 2394 | 315 |
| 5. | Jiri Kuthan (@jiriatipteldotorg) | 58 | 26 | 2292 | 680 |
| 6. | Daniel-Constantin Mierla (@miconda) | 27 | 23 | 124 | 97 |
| 7. | Elena-Ramona Modroiu | 25 | 4 | 2268 | 6 |
| 8. | Stefan Darius (@dariusstefan) | 24 | 4 | 1637 | 335 |
| 9. | Liviu Chircu (@liviuchircu) | 23 | 15 | 325 | 245 |
| 10. | Henning Westerholt (@henningw) | 20 | 15 | 190 | 137 |
All remaining contributors: Vlad Paiu (@vladpaiu), Karel Kozlik, Irina-Maria Stanescu, Maksym Sobolyev (@sobomax), Andrei Pelinescu-Onciul, Dan Pascu (@danpascu), Juha Heinanen (@juha-h), Elena-Ramona Modroiu, Ryan Bullock (@rrb3942), Ovidiu Sas (@ovidiusas), Sergio Gutierrez, Peter Nixon, Vlad Patrascu (@rvlad-patrascu), Alex Massover, Nils Ohlmeier, Konstantin Bokarius, Julián Moreno Patiño, Jesus Rodrigues, Julien Blache, Dusan Klinec (@ph4r05), Edson Gellert Schubert.
(1) DevScore = author_commits + author_lines_added / (project_lines_added / project_commits) + author_lines_deleted / (project_lines_deleted / project_commits)
(2) including any documentation-related commits, excluding merge commits
(3) ignoring whitespace edits, renamed files and auto-generated files
By Commit Activity
Section titled “By Commit Activity”| # | Name | Commit Activity |
|---|---|---|
| 1. | Razvan Crainea (@razvancrainea) | Aug 2010 - Jul 2026 |
| 2. | Bogdan-Andrei Iancu (@bogdan-iancu) | Dec 2003 - Jul 2026 |
| 3. | Stefan Darius (@dariusstefan) | Jun 2026 - Jul 2026 |
| 4. | Liviu Chircu (@liviuchircu) | Jan 2013 - Nov 2018 |
| 5. | Dan Pascu (@danpascu) | Jul 2004 - Sep 2018 |
| 6. | Vlad Patrascu (@rvlad-patrascu) | Oct 2017 - Oct 2017 |
| 7. | Ionut Ionita (@ionutrazvanionita) | Feb 2015 - Feb 2017 |
| 8. | Julián Moreno Patiño | Feb 2016 - Feb 2016 |
| 9. | Dusan Klinec (@ph4r05) | Dec 2015 - Dec 2015 |
| 10. | Vlad Paiu (@vladpaiu) | Jun 2011 - Oct 2015 |
All remaining contributors: Ryan Bullock (@rrb3942), Irina-Maria Stanescu, Alex Massover, Sergio Gutierrez, Ovidiu Sas (@ovidiusas), Henning Westerholt (@henningw), Daniel-Constantin Mierla (@miconda), Konstantin Bokarius, Edson Gellert Schubert, Elena-Ramona Modroiu, Jesus Rodrigues, Julien Blache, Peter Nixon, Maksym Sobolyev (@sobomax), Juha Heinanen (@juha-h), Jan Janak (@janakj), Jiri Kuthan (@jiriatipteldotorg), Andrei Pelinescu-Onciul, Elena-Ramona Modroiu, Nils Ohlmeier, Karel Kozlik.
(1) including any documentation-related commits, excluding merge commits
Documentation
Section titled “Documentation”Contributors
Section titled “Contributors”Last edited by: Razvan Crainea (@razvancrainea), Bogdan-Andrei Iancu (@bogdan-iancu), Liviu Chircu (@liviuchircu), Ionut Ionita (@ionutrazvanionita), Ryan Bullock (@rrb3942), Irina-Maria Stanescu, Sergio Gutierrez, Henning Westerholt (@henningw), Daniel-Constantin Mierla (@miconda), Konstantin Bokarius, Edson Gellert Schubert, Elena-Ramona Modroiu, Jan Janak (@janakj), Maksym Sobolyev (@sobomax), Elena-Ramona Modroiu.
License
Section titled “License”All documentation files (i.e. .md extension) are licensed under the Creative Common License 4.0