[OpenSIPS-Users] Help with sip trace errors please

ha do haloha201 at yahoo.com
Thu Dec 10 11:29:17 CET 2009


Hi Brian

i follow your suggestion and it is successfully writing the log to text file sip_trace

the opensips.cfg

loadmodule "db_text.so"
modparam("siptrace", "trace_flag", 22)
modparam("siptrace", "db_url", "text:///tmp/opensipsdb")
modparam("siptrace", "trace_on", 1)
modparam("siptrace", "enable_ack_trace", 1)
modparam("siptrace", "table", "sip_trace")

but when you enable debug=9 in the opensips.cfg

it say the error:
Dec 10 23:53:44 localhost /usr/local/sbin/opensips[1923]: INFO:db_text:dbt_init: using database at: /tmp/opensipsdb

Dec 10 23:54:01 localhost /usr/local/sbin/opensips[1915]: ERROR:db_text:dbt_insert: table does not exist!
Dec 10 23:54:01 localhost /usr/local/sbin/opensips[1915]: ERROR:siptrace:sip_trace: error storing trace
Dec 10 23:54:01 localhost /usr/local/sbin/opensips[1915]: ERROR:db_text:dbt_insert: table does not exist!
Dec 10 23:54:01 localhost /usr/local/sbin/opensips[1915]: ERROR:siptrace:trace_onreply_out: error storing trace
Dec 10 23:54:01 localhost /usr/local/sbin/opensips[1915]: ERROR:db_text:dbt_insert: table does not exist!
Dec 10 23:54:01 localhost /usr/local/sbin/opensips[1915]: ERROR:siptrace:sip_trace: error storing trace


[root at localhost ~]# cat /tmp/opensipsdb/sip_trace
id(int,auto) time_stamp(int) callid(string) traced_user(string) msg(string) method(string) status(string) fromip(string) toip(string) fromtag(string) direction(string)
36:1260463989:YzJhOTE1OWFiNWVkMzM1ZTJlM2E5ZjI1NTc2NWQyM2Y.::SIP/2.0 200 OK\r\nVia\: SIP/2.0/UDP 192.168.237.1\:53352;received=192.168.237.1;branch=z9hG4bK-d87543-a60eba2316543c40-1--d87543-;rport=53352\r\nContact\: <sip\:2000 at 192.168.237.1\:62174;rinstance=2fcc01b2c5d4bac7>\r\nTo\: "2000"<sip\:2000 at 192.168.237.131>;tag=6e5a5b08\r\nFrom\: <sip\:8000 at 192.168.237.131>;tag=415aae68\r\nCall-ID\: YzJhOTE1OWFiNWVkMzM1ZTJlM2E5ZjI1NTc2NWQyM2Y.\r\nCSeq\: 2 BYE\r\nUser-Agent\: X-Lite release 1103k stamp 53621\r\nContent-Length\: 0\r\n\r\n:BYE:200:udp\:192.168.237.131\:5060:udp\:192.168.237.1\:53352:415aae68:out
35:1260463989:YzJhOTE1OWFiNWVkMzM1ZTJlM2E5ZjI1NTc2NWQyM2Y.::SIP/2.0 200 OK\r\nVia\: SIP/2.0/UDP 192.168.237.131;branch=z9hG4bKde3e.722ffa76.0\r\nVia\: SIP/2.0/UDP 192.168.237.1\:53352;received=192.168.237.1;branch=z9hG4bK-d87543-a60eba2316543c40-1--d87543-;rport=53352\r\nContact\: <sip\:2000 at 192.168.237.1\:62174;rinstance=2fcc01b2c5d4bac7>\r\nTo\: "2000"<sip\:2000 at 192.168.237.131>;tag=6e5a5b08\r\nFrom\: <sip\:8000 at 192.168.237.131>;tag=415aae68\r\nCall-ID\: YzJhOTE1OWFiNWVkMzM1ZTJlM2E5ZjI1NTc2NWQyM2Y.\r\nCSeq\: 2 BYE\r\nUser-Agent\: X-Lite release 1103k stamp 53621\r\nContent-Length\: 0\r\n\r\n:BYE:200:udp\:192.168.237.1\:62174:udp\:192.168.237.131\:5060:415aae68:in


--- On Wed, 12/9/09, opensipslist at encambio.com <opensipslist at encambio.com> wrote:

From: opensipslist at encambio.com <opensipslist at encambio.com>
Subject: Re: [OpenSIPS-Users] Help with sip trace errors please
To: users at lists.opensips.org
Date: Wednesday, December 9, 2009, 11:16 AM


Hello Bogdan,

On wed., dec 09, 2009, Bogdan-Andrei Iancu wrote:
>Field 0 is the "msg" field (used as DB_BLOB by siptrace) should be
>"STR" to work, but I already see it is set at string in your table
>definition... so I looked for a bug and found one in the db_text
>module - if you update from SVN, it should be ok.
>
That is great news, but sadly I might have been able to find and
correct the problem myself if the variable naming was not so cryptic.

But thanks to you indeed, the problem is solved. I've tested your
revision 6382:

Index: modules/db_text/dbt_lib.c
diff -Nau modules/db_text/dbt_lib.c.orig modules/db_text/dbt_lib.c
--- modules/db_text/dbt_lib.c.orig  2009-10-16 02:35:15.000000000 +0200
+++ modules/db_text/dbt_lib.c   2009-12-09 18:14:52.707887067 +0100
@@ -446,7 +446,7 @@
            if(_t0==DB_STRING || _t0==DB_BLOB)
                return 0;
        case DB_BLOB:
-           if(_t0==DB_STR)
+           if(_t0==DB_STR || _t0==DB_STRING)
                return 0;
        case DB_BITMAP:
            if (_t0==DB_INT)

...and it works.

Regards,
Brian

_______________________________________________
Users mailing list
Users at lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20091210/1b45d729/attachment.htm 


More information about the Users mailing list