Siptraces not shown on OpenSIPS-CP

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Siptraces not shown on OpenSIPS-CP

Spady#7
Hi folk, i am facing this issue:
I set, just for learing purpose, my opensips.cfg as follow:

loadmodule "siptrace.so"

# ----- sip_trace ------
modparam("siptrace", "db_url",
        "mysql://opensips:opensipsrw@localhost/opensips")
modparam("siptrace", "trace_on", 1)
modparam("siptrace", "enable_ack_trace", 1)
modparam("siptrace", "table", "sip_trace")
modparam("siptrace", "trace_flag", 22)

####### Routing Logic ########


# main request routing logic

route{
        sip_trace();
        setflag(22);

Now if I make or receive a call i can see that siptrace is stored into mysql db by this comand:

mysql> select * from sip_trace ;

But on Control Panel there is nothing.
Here Apache2 logs when I press "Show all"

Thu Dec 01 23:42:12 2011] [error] [client 10.9.100.251] PHP Notice:  Undefined variable: delete in /var/www/opensips-cp/web/tools/system/siptrace/tracer.php on line 83, referer: http://10.9.101.166/cp/tools/system/siptrace/tracer.php?action=search
[Thu Dec 01 23:42:14 2011] [error] [client 10.9.100.251] File does not exist: /var/www/favicon.ico

and these if i press "Search":

[Thu Dec 01 23:42:54 2011] [error] [client 10.9.100.251] PHP Notice:  Undefined variable: delete in /var/www/opensips-cp/web/tools/system/siptrace/tracer.php on line 83, referer: http://10.9.101.166/cp/tools/system/siptrace/tracer.php?action=search
[Thu Dec 01 23:42:54 2011] [error] [client 10.9.100.251] PHP Notice:  Undefined variable: show_all in /var/www/opensips-cp/web/tools/system/siptrace/tracer.php on line 89, referer: http://10.9.101.166/cp/tools/system/siptrace/tracer.php?action=search
[Thu Dec 01 23:42:54 2011] [error] [client 10.9.100.251] PHP Notice:  Undefined variable: set_start in /var/www/opensips-cp/web/tools/system/siptrace/tracer.php on line 104, referer: http://10.9.101.166/cp/tools/system/siptrace/tracer.php?action=search
[Thu Dec 01 23:42:54 2011] [error] [client 10.9.100.251] PHP Notice:  Undefined variable: set_end in /var/www/opensips-cp/web/tools/system/siptrace/tracer.php on line 106, referer: http://10.9.101.166/cp/tools/system/siptrace/tracer.php?action=search
[Thu Dec 01 23:42:55 2011] [error] [client 10.9.100.251] File does not exist: /var/www/favicon.ico

These From opensips.log when I press "Search" or " Show all" :

Dec  1 23:43:53 opensips /sbin/opensips[10425]: DBG:mi_fifo:mi_fifo_server: done parsing the mi tree
Dec  1 23:43:56 opensips /sbin/opensips[10425]: DBG:mi_fifo:mi_parse_node: end of input tree        



Any advice?

Reply | Threaded
Open this post in threaded view
|

Re: Siptraces not shown on OpenSIPS-CP

Spady#7
No one has idea?
Reply | Threaded
Open this post in threaded view
|

Re: Siptraces not shown on OpenSIPS-CP

Alex Ionescu-2
Hi Spady,

Did you configured
../opensips-cp/config/tools/system/siptrace/local.inc.php ? There you
have proxy list ...

Regards,
Alex

On 12/02/2011 11:38 AM, spady wrote:

> No one has idea?
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Siptraces-not-shown-on-OpenSIPS-CP-tp7052741p7054099.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Siptraces not shown on OpenSIPS-CP

Spady#7
Yes, sure:


 $config->results_per_page = 25;
 $config->results_page_range = 10;

 // highlighting
 $config->from_color="black";      $config->from_bgcolor="yellow";
 $config->to_color="white";      $config->to_bgcolor="blue";
 $config->callid_color="black";  $config->callid_bgcolor="orange";
 $config->cseq_color="white";      $config->cseq_bgcolor="navy";
 $config->regexp_color="navy";   $config->regexp_bgcolor="red";

###############################################################################

 //database tables
 $config->table_trace = "sip_trace";

 $talk_to_this_assoc_id = 1 ;

 // sip proxy - ip:port
 $proxy_list=array("udp:10.9.101.166:5060","tcp:10.9.101.166:5060","udp:127.0.0.1:5060","tcp:127.0.0.1:5060");
?>
Reply | Threaded
Open this post in threaded view
|

Re: Siptraces not shown on OpenSIPS-CP

Alex Ionescu-2
Well,

You can try doing some debugging. Paste this on line 193 in ../opensips-cp/web/tools/system/siptrace/template/tracer.main.php :

echo $sql;

You should receive an output right under the search box like this:

SELECT DISTINCT callid FROM sip_trace WHERE status='' AND direction='in' ORDER BY id DESC

Try executing this query in the console - see what you get.
Let me  know how it went

Regards,
Alex


On 12/05/2011 05:38 PM, spady wrote:
Yes, sure:


 $config->results_per_page = 25;
 $config->results_page_range = 10;

 // highlighting
 $config->from_color="black";      $config->from_bgcolor="yellow";
 $config->to_color="white";      $config->to_bgcolor="blue";
 $config->callid_color="black";  $config->callid_bgcolor="orange";
 $config->cseq_color="white";      $config->cseq_bgcolor="navy";
 $config->regexp_color="navy";   $config->regexp_bgcolor="red";

###############################################################################

 //database tables
 $config->table_trace = "sip_trace";

 $talk_to_this_assoc_id = 1 ;

 // sip proxy - ip:port

$proxy_list=array("udp:10.9.101.166:5060","tcp:10.9.101.166:5060","udp:127.0.0.1:5060","tcp:127.0.0.1:5060");
?>


--
View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Siptraces-not-shown-on-OpenSIPS-CP-tp7052741p7063277.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Siptraces not shown on OpenSIPS-CP

Spady#7
I done:


mysql> SELECT DISTINCT callid FROM sip_trace WHERE status='' AND direction='in' ORDER BY id DESC ;
Empty set (0.00 sec)

mysql>
mysql>

Reply | Threaded
Open this post in threaded view
|

Re: Siptraces not shown on OpenSIPS-CP

Alex Ionescu-2
Ok,

What can I say ... are you sure you have something in your sip_trace table ?
I am being confuse ...

Regards,
Alex

On 12/05/2011 05:55 PM, spady wrote:

> I done:
>
>
> mysql>  SELECT DISTINCT callid FROM sip_trace WHERE status='' AND
> direction='in' ORDER BY id DESC ;
> Empty set (0.00 sec)
>
> mysql>
> mysql>
>
>
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Siptraces-not-shown-on-OpenSIPS-CP-tp7052741p7063340.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Siptraces not shown on OpenSIPS-CP

Spady#7
Yes, sure...


3104 rows in set (0.14 sec)

mysql> select * from sip_trace ;

I did not pasted the 3104 rows but "sip_trace" table is full of sip traces....

Reply | Threaded
Open this post in threaded view
|

Re: Siptraces not shown on OpenSIPS-CP

Alex Ionescu-2
Hi,

What version of OpenSIPS proxy are you using? There were some fixes made
to the sip trace module and there is a possibility that the default
content of some fields have changed. (Anyway, better update to latest
version)

Regards,
Alex


On 12/05/2011 06:08 PM, spady wrote:

> Yes, sure...
>
>
> 3104 rows in set (0.14 sec)
>
> mysql>  select * from sip_trace ;
>
> I did not pasted the 3104 rows but "sip_trace" table is full of sip
> traces....
>
>
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Siptraces-not-shown-on-OpenSIPS-CP-tp7052741p7063393.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Siptraces not shown on OpenSIPS-CP

Spady#7
Hi, i think it'l lastone:



opensips -V
version: opensips 1.7.1-notls (i386/linux)
flags: STATS: Off, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST, SHM_MEM, SHM_MMAP, PKG_MALLOC, F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
svnrevision: unknown
@(#) $Id: main.c 8537 2011-11-08 17:02:11Z bogdan_iancu $
main.c compiled on 10:36:22 Nov 30 2011 with gcc 4.4.5
Reply | Threaded
Open this post in threaded view
|

Re: Siptraces not shown on OpenSIPS-CP

Spady#7
No one has idea?
Reply | Threaded
Open this post in threaded view
|

Re: Siptraces not shown on OpenSIPS-CP

Spady#7
Can someone help me with this?

I checked again config and seems ok but form CP nothing yet.

Regards
Reply | Threaded
Open this post in threaded view
|

Re: Siptraces not shown on OpenSIPS-CP

Johan8799
In reply to this post by Spady#7
The problem is that opensips-cp searches the first record which is 'in' and has no status.
Because this is the very first record, you are probably missing this record.

I had the same problem and this is caused by setting the flag and sip_trace in the wrong order.
I think this is the case in ALL sample scripts I can find.

so originally you have:
route{
        sip_trace();
        setflag(22);

Change it to:
route{
        setflag(22);
        sip_trace();

This did the job for me.