[OpenSIPS-Users] Tracer module integration with Opensips 3.4
chaker.barkaoui at sofrecom.com
chaker.barkaoui at sofrecom.com
Thu Apr 25 08:31:55 UTC 2024
Hello Everyone,
I need your support to add tracer module in order to store incoming/outgoing SIP messages in database.
I already add some configs to my opensips.cfg file:
### Tracer ###
loadmodule "tracer.so"
modparam("tracer", "trace_on", 1)
modparam("tracer", "trace_local_ip", "opensips:5060")
modparam("tracer", "trace_id","[tid]uri=mysql://opensips:opensipsrw@ossdb/opensips;table=sip_trace;")
....
if ( is_method("INVITE")) {
record_route();
do_accounting("db|log", "cdr|missed", "acc");
trace($var(trace_id), "d", "sip|xlog", $var(user));
t_relay();
exit;
}
The error in Opensips logs is:
ERROR:core:db_check_api: module db_mysql does not export db_use_table function
2024-04-25 09:29:10 Apr 25 10:29:10 [52] ERROR:tracer:get_db_struct: unable to bind database module
2024-04-25 09:29:10 Apr 25 10:29:10 [52] ERROR:tracer:parse_siptrace_id: Invalid parameters extracted!url <mysql://opensips:opensipsrw@ossdb/opensips>! table name <sip_trace>!
2024-04-25 09:29:10 Apr 25 10:29:10 [52] ERROR:tracer:parse_trace_id: failed to parse tracer uri []
2024-04-25 09:29:10 Apr 25 10:29:10 [52] CRITICAL:Traceback (last included file at the bottom):
2024-04-25 09:29:10 Apr 25 10:29:10 [52] CRITICAL: 0. /etc/opensips/opensips.cfg
2024-04-25 09:29:10 Apr 25 10:29:10 [52] CRITICAL:core:yyerror: parse error in /etc/opensips/opensips.cfg:53:19-20: Parameter <trace_id> not found in module <tracer> - can't set
2024-04-25 09:29:10 Apr 25 10:29:10 [52] CRITICAL:modparam("tracer", "trace_on", 1)
2024-04-25 09:29:10 Apr 25 10:29:10 [52] CRITICAL:modparam("tracer", "trace_local_ip", "opensips:5060")
2024-04-25 09:29:10 Apr 25 10:29:10 [52] CRITICAL:modparam("tracer", "trace_id","[tid]uri=mysql://opensips:opensipsrw@ossdb/opensips;table=sip_trace;")
I think that the module should store the messages in sip_trace table but I didn't understand how to configure properly the trace_id with mysql module.
Could you help me please ?
Thank you.
Best Regards,
Chaker BARKAOUI.
Orange Restricted
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20240425/d9f510a9/attachment-0001.html>
More information about the Users
mailing list