For me it is different.
It records the missed calls (SER), but I can't see the completed calls.
I mean in the database.
What should I use as Flag for me to get the completed calls recorded?
Thanks
Emery
----- Original Message -----
From: "Juan J. Sierralta P." <juanjo(a)atmlab.utfsm.cl>
To: <serusers(a)lists.iptel.org>
Sent: Friday, July 25, 2003 21:44
Subject: [Serusers] Serweb or MySQL bug ?
Hi,
I'm accounting for missed calls onto MySQL everything fine. But Serweb
doesn't show the missed calls so checking on missed_calls.php line 29:
$q="select distinct t1.from_uri, t1.sip_from, t1.time, t1.sip_status
from "
$config->table_missed_calls." t1,
".$config->table_aliases."
t2".
" where t1.username='".$auth->auth["uname"].
"' OR
('sip:".$auth->auth["uname"]."@".$config->default_domain.
"'=t2.contact AND t2.username=t1.username) ".
" order by time desc";
Is the line that make the actual query to DB so I run the following
queries on MySQL (v3.23.49):
mysql> select t1.from_uri,t1.username from missed_calls t1 where
t1.username='5624108980';
+-----------------------------------------+------------+
| from_uri | username |
+-----------------------------------------+------------+
| sip:5624108990@192.168.65.14;user=phone | 5624108980 |
+-----------------------------------------+------------+
1 row in set (0.00 sec)
Fine so far, but if check for the something similar as serweb's query:
mysql> select t1.from_uri,t1.username from missed_calls t1, aliases t2
where t1.username='5624108980' OR ('5624108980(a)marte'=t2.contact AND
t2.username=t1.username);
Empty set (0.01 sec)
If I understand correctly the idea of the query is to get that missed
calls that match the username or an alias, in my case I have not aliases
defined; but since the query uses OR for aliases part I don't know why
the query gets an empty set.
BTW I'm no SQL fluent :)
--
Juanjo sin .sig :(
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers