Copyright © 2006 voice-system.ro
db_url
(str)table
(str)trace_flag
(integer)trace_on
(integer)traced_user_avp
(integer)duplicate_uri
(str)sip_trace()
db_url
parametersip_trace
parametertrace_flag
parametertrace_on
parametertrace_on
parameterduplicate_uri
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
(integer)The ID 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 "6843".
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".
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.
Next is presented the definition of sip_trace table
Example 1-8. sip_trace sql
CREATE TABLE `sip_trace` ( `id` bigint(20) NOT NULL auto_increment, `date` datetime NOT NULL default '0000-00-00 00:00:00', `callid` varchar(254) NOT NULL default '', `traced_user` varchar(128) NOT NULL default '', `msg` text NOT NULL, `method` varchar(50) NOT NULL default '', `status` varchar(254) NOT NULL default '', `fromip` varchar(50) NOT NULL default '', `toip` varchar(50) NOT NULL default '', `fromtag` varchar(64) NOT NULL default '', `direction` varchar(4) NOT NULL default '', PRIMARY KEY (`id`), INDEX user_idx (traced_user), INDEX date_id (date), INDEX ip_idx (fromip), KEY `call_id` (`callid`) );
Stateless forwarded messages (forward()) are not logged if you set the flag, use sip_trace().
Take a look at http://openser.org/.
First at all check if your question was already answered on one of our mailing lists:
User Mailing List - http://openser.org/cgi-bin/mailman/listinfo/users
Developer Mailing List - http://openser.org/cgi-bin/mailman/listinfo/devel
E-mails regarding any stable OpenSER release should be sent to
<users@openser.org>
and e-mails regarding development versions
should be sent to <devel@openser.org>
.
If you want to keep the mail private, send it to
<team@openser.org>
.
Please follow the guidelines provided at: http://sourceforge.net/tracker/?group_id=139143.