This shows you the differences between the selected revision and the current version of the page.
| ser:2.0:ref:acc_db 2007/10/31 15:52 | ser:2.0:ref:acc_db 2007/11/02 10:18 current | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ==== Module acc_db ==== | + | ===== Module acc_db ===== |
| Line 11: | Line 11: | ||
| * [[#Module Parameters]] | * [[#Module Parameters]] | ||
| - | === Requirements === | + | ==== Requirements ==== |
| The module **acc_db** requires that the module **[[tm]]** is loaded as well as the appropriate module for the database referenced in the **[[acc_db#db_url|db_url]]** module | The module **acc_db** requires that the module **[[tm]]** is loaded as well as the appropriate module for the database referenced in the **[[acc_db#db_url|db_url]]** module | ||
| parameter. | parameter. | ||
| - | === Usage === | + | ==== Usage ==== |
| The module **acc_db*** works differently than most other modules in that you do not have to explicitly call functions provided by the module. Instead, whenever a certain flag is set, information for the transaction is saved into the database when the transaction finishes. | The module **acc_db*** works differently than most other modules in that you do not have to explicitly call functions provided by the module. Instead, whenever a certain flag is set, information for the transaction is saved into the database when the transaction finishes. | ||
| Line 26: | Line 26: | ||
| //XXX Either bring an example or reference the respective section in the User's Manual// | //XXX Either bring an example or reference the respective section in the User's Manual// | ||
| - | === Functions === | + | ==== Functions ==== |
| - | == acc_db_log() == | + | === acc_db_log() === |
| | Syntax: | ''acc_db_log ( [//status//] )'' | | | Syntax: | ''acc_db_log ( [//status//] )'' | | ||
| Line 35: | Line 35: | ||
| The function **acc_db_log()** writes information from the request currently being processed into the database table for successful calls. The optional //status// parameters specifies the value to be assumed for the status column. Since the transaction is not yet finished, this value is yet unknown. If the parameters is left out, 0 is written. | The function **acc_db_log()** writes information from the request currently being processed into the database table for successful calls. The optional //status// parameters specifies the value to be assumed for the status column. Since the transaction is not yet finished, this value is yet unknown. If the parameters is left out, 0 is written. | ||
| - | == acc_db_missed() == | + | === acc_db_missed() === |
| | Syntax: | ''acc_db_missed ( [//status//]] )'' | | | Syntax: | ''acc_db_missed ( [//status//]] )'' | | ||
| Line 43: | Line 43: | ||
| - | === Module Parameters === | + | ==== Module Parameters ==== |
| - | == early_media == | + | === early_media === |
| | Type: | boolean | | | Type: | boolean | | ||
| Line 52: | Line 52: | ||
| The **early_media** parameter defines whether a separate entry should be written to the database whenever a response 183 (Session Progress) is received. Through this, the presence and start of early media can be determined. | The **early_media** parameter defines whether a separate entry should be written to the database whenever a response 183 (Session Progress) is received. Through this, the presence and start of early media can be determined. | ||
| - | == failed_transactions == | + | === failed_transactions === |
| | Type: | boolean | | | Type: | boolean | | ||
| Line 59: | Line 59: | ||
| The **failed_transactions** parameter determines, whether failed transactions should be accounted for, too. If the parameter remains at its default false, only transactions with a resulting status code of 200 (OK) are being written to the database. | The **failed_transactions** parameter determines, whether failed transactions should be accounted for, too. If the parameter remains at its default false, only transactions with a resulting status code of 200 (OK) are being written to the database. | ||
| - | == report_ack == | + | === report_ack === |
| | Type: | boolean | | | Type: | boolean | | ||
| Line 66: | Line 66: | ||
| The **report_ack** parameter determines, whether a separate entry should be written for the ACK message in response to a 200 (OK) in an INVITE transaction. This will only work if the original INVITE was marked for record routing by use of the **[[rr#record_route()|record_route()]]** function. | The **report_ack** parameter determines, whether a separate entry should be written for the ACK message in response to a 200 (OK) in an INVITE transaction. This will only work if the original INVITE was marked for record routing by use of the **[[rr#record_route()|record_route()]]** function. | ||
| - | == report_cancels == | + | === report_cancels === |
| | Type: | boolean | | | Type: | boolean | | ||
| Line 73: | Line 73: | ||
| The **report_cancels** parameter determines, whether CANCEL transactions sent to stop processing of an INVITE request should be accounted for separately. Usually, this is not necessary, as you can determine a canceled INVITE from the status code 487 (Request Terminated). | The **report_cancels** parameter determines, whether CANCEL transactions sent to stop processing of an INVITE request should be accounted for separately. Usually, this is not necessary, as you can determine a canceled INVITE from the status code 487 (Request Terminated). | ||
| - | == log_flag == | + | === log_flag === |
| | Type: | flag number or name | | | Type: | flag number or name | | ||
| Line 80: | Line 80: | ||
| The **log_flag** parameter determines the flag that needs to be set upon the termination of a transaction to store information about this transaction in the database table determined by the **[[acc_db#acc_table|acc_table]]** parameter. This can either be the number of a flag or its name. If the parameter is set to 0, accounting into the **acc_table** is turned off. | The **log_flag** parameter determines the flag that needs to be set upon the termination of a transaction to store information about this transaction in the database table determined by the **[[acc_db#acc_table|acc_table]]** parameter. This can either be the number of a flag or its name. If the parameter is set to 0, accounting into the **acc_table** is turned off. | ||
| - | == log_missed_flag == | + | === log_missed_flag === |
| | Type: | flag number or name | | | Type: | flag number or name | | ||
| Line 87: | Line 87: | ||
| The **log_missed_flag** parameter determines the flag that needs to be set upon the termination of a transaction to store information about this transaction in the database table determined by the **[[acc_db#mc_table|mc_table]]** parameter. This can either be the number of a flag or its name. If the parameter is set to 0, accounting into the **acc_table** is turned off. | The **log_missed_flag** parameter determines the flag that needs to be set upon the termination of a transaction to store information about this transaction in the database table determined by the **[[acc_db#mc_table|mc_table]]** parameter. This can either be the number of a flag or its name. If the parameter is set to 0, accounting into the **acc_table** is turned off. | ||
| - | == log_fmt == | + | === log_fmt === |
| | Type: | string | | | Type: | string | | ||
| Line 119: | Line 119: | ||
| | X | **[[acc_db#restimestamp_column]]** | response_timestamp | time stamp of the outgoing response | | | X | **[[acc_db#restimestamp_column]]** | response_timestamp | time stamp of the outgoing response | | ||
| - | == attrs == | + | === attrs === |
| | Type: | string | | | Type: | string | | ||
| Line 126: | Line 126: | ||
| The **attrs** parameter contains a comma separated list of the names of the attributes that should be stored in the column determined by the **[[acc_db#attrs_column]]** parameter. The names must include the dollar sign. | The **attrs** parameter contains a comma separated list of the names of the attributes that should be stored in the column determined by the **[[acc_db#attrs_column]]** parameter. The names must include the dollar sign. | ||
| - | == db_url == | + | === db_url === |
| | Type: | database URL | | | Type: | database URL | | ||
| Line 135: | Line 135: | ||
| //XXX Reference where these database URLs are explained.// | //XXX Reference where these database URLs are explained.// | ||
| - | == acc_table == | + | === acc_table === |
| | Type: | string | | | Type: | string | | ||
| Line 142: | Line 142: | ||
| The **acc_table** parameter determines the name of the database table information on transactions marked with the flag set by the **[[acc_db#log_flag]]** parameter are to be stored in. | The **acc_table** parameter determines the name of the database table information on transactions marked with the flag set by the **[[acc_db#log_flag]]** parameter are to be stored in. | ||
| - | == mc_table == | + | === mc_table === |
| | Type: | string | | | Type: | string | | ||
| Line 149: | Line 149: | ||
| The **mc_table** parameter determines the name of the database table information on transactions marked with the flag set by the **[[acc_db#log_missed_flag]]** parameter are to be stored in. | The **mc_table** parameter determines the name of the database table information on transactions marked with the flag set by the **[[acc_db#log_missed_flag]]** parameter are to be stored in. | ||
| - | == attrs_column == | + | === attrs_column === |
| | Type: | string | | | Type: | string | | ||
| Line 172: | Line 172: | ||
| //XXX Or is there some quoting involved?// | //XXX Or is there some quoting involved?// | ||
| - | == callid_column == | + | === callid_column === |
| | Type: | string | | | Type: | string | | ||
| Line 179: | Line 179: | ||
| The **callid_column** parameter sets the name of the database column the content of the Call-ID header field of the request processed will be stored in. | The **callid_column** parameter sets the name of the database column the content of the Call-ID header field of the request processed will be stored in. | ||
| - | == totag_column == | + | === totag_column === |
| | Type: | string | | | Type: | string | | ||
| Line 186: | Line 186: | ||
| The **totag_column** parameter sets the name of the database column the value of the Tag paramer of the To header field will be stored in. | The **totag_column** parameter sets the name of the database column the value of the Tag paramer of the To header field will be stored in. | ||
| - | == from_column == | + | === from_column === |
| | Type: | string | | | Type: | string | | ||
| Line 193: | Line 193: | ||
| The **from_column** parameter sets the name of the database column the full content of the From header field will be stored in. | The **from_column** parameter sets the name of the database column the full content of the From header field will be stored in. | ||
| - | == flags_column == | + | === flags_column === |
| | Type: | string | | | Type: | string | | ||