Copyright © 2006 voice-system.ro
db_url
(str)table
(str)trace_flag
(integer)trace_on
(integer)traced_user_avp
(str)trace_table_avp
(str)duplicate_uri
(str)trace_local_ip
(str)sip_trace()
sip_trace
db_url
parametersip_trace
parametertrace_flag
parametertrace_on
parametertraced_user_avp
parametertrace_table_avp
parameterduplicate_uri
parametertrace_local_ip
parametersip_trace()
usageOffer a possibility to store incoming/outgoing SIP messages in database.
There are two ways of storing information.
by calling explicitely the sip_trace() method in OpenSER configuration file. In this case the original message is processed.
by setting the flag equal with the value of 'trace_flag' (e.g., setflag(__trace_flag__)) parameter of the module. In this case, the\ message sent forward is processed. The logging mechanism is based on TM/SL callbacks, so only messages processed with TM/SL are logged.
The tracing can be turned on/off using fifo commad.
openserctl fifo sip_trace on
openserctl fifo sip_trace off
The following modules must be loaded before this module:
database module - mysql, postrgress, dbtext, unixodbc...
tm and sl modules - optional, only if you want to trace messages forwarded by these modules.
The following libraries or applications must be installed before running OpenSER with this module loaded:
None.
traced_user_avp
(str)The name of the AVP storing the SIP URI of the traced user. If the AVP is set, messages are stored in database table and 'traced_user' column is filled with AVP's value. You can store the message many times for many users by having multiple values for this AVP.
Default value is "NULL" (feature disabled).
trace_table_avp
(str)The name of the AVP storing the name of the table where to store the SIP messages. If it is not set, the value of 'table' parameter is used. In this way one can select dynamically where to store the traced messages. The table must exists, and must have the same structure as 'sip_trace' table.
Default value is "NULL" (feature disabled).
duplicate_uri
(str)The address in form of SIP uri where to send a duplicate of traced message. It uses UDP all the time.
Default value is "NULL".
trace_local_ip
(str)The address to be used in fromip field for local generated messages. If not set, the module sets it to the address of the socket that will be used to send the message.
Default value is "NULL".
sip_trace()
Store current processed SIP message in database. It is stored in the form prior applying chages made to it.
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE, ONREPLY_ROUTE, BRANCH_ROUTE.
sip_trace
Name: sip_trace
Parameters:
trace_mode : turns on/off SIP message tracing. Possible values are:
on
off
MI FIFO Command Format:
:sip_trace:_reply_fifo_file_ trace_mode _empty_line_
Before running OpenSER with siptrace, you have to setup the database tables where the module will store the data. For that, if the table were not created by the installation script or you choose to install everything by yourself you can use the siptrace-create.sql SQL script in the database directories in the openser/scripts folder as template. You can also find the complete database documentation on the project webpage, http://www.openser-project.org/docs/db-tables/openser-db-devel.html.
Stateless forwarded messages (forward()) are not logged if you set the flag, use sip_trace().
Take a look at http://www.openser-project.org/.
First at all check if your question was already answered on one of our mailing lists:
User Mailing List - http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
Developer Mailing List - http://lists.openser-project.org/cgi-bin/mailman/listinfo/devel
E-mails regarding any stable OpenSER release should be sent to
<users@lists.openser-project.org>
and e-mails regarding development versions
should be sent to <devel@lists.openser-project.org>
.
If you want to keep the mail private, send it to
<team@lists.openser-project.org>
.
Please follow the guidelines provided at: http://sourceforge.net/tracker/?group_id=139143.