Hi guys,
I've just found out that the timestamp field in ACC table doesn't
contain the real timestamp relative to 1970. It is just like the time
field in ACC table but without the ":" and the "-" delimiters. So when
I
computed for the duration it doesn't give me the correct duration time.
Here is the query I used to extract for duration:
SELECT t1.from_uri as CLR, t1.to_uri as CLD, (t2.time - t1.time) as
Duration, t1.time as Setup_Time, t2.time as Release_Time FROM acc t1,
acc t2 WHERE t1.sip_callid = t2.sip_callid AND ((t1.fromtag = t2.fromtag
and t1.totag = t2.totag) OR (t1.fromtag = t2.totag and t1.totag =
t2.fromtag)) AND t1.sip_method='ACK' AND t2.sip_method='BYE';
attached is a text file that contains one of the record in acc table.
Thanks,
Ryan Pagquil
Infodyne Inc. -
PhilOnline.com
3603 Antel Global Corporate Center
Doña Julia Vargas Ave.
Ortigas Center Pasig City
Tel: 687-0715
Web:
www.philonline.com
+-------------------------------------------------------------------------------------+---------------------------------------------------------+------------+------------+-----------------------------------------------------------------------------+------------------------------+----------------------------------+-------------------------------+--------------------------------------------------------+-----------+---------------+----------------------------------+------------+---------------------+----------------+----------------+----------------+
| sip_from |
sip_to | sip_status | sip_method | i_uri
| o_uri
| from_uri | to_uri | sip_callid
| username | domain | fromtag
| totag | time | timestamp | caller_deleted |
callee_deleted |
+-------------------------------------------------------------------------------------+---------------------------------------------------------+------------+------------+-----------------------------------------------------------------------------+------------------------------+----------------------------------+-------------------------------+--------------------------------------------------------+-----------+---------------+----------------------------------+------------+---------------------+----------------+----------------+----------------+
| "5997"
<sip:5997@202.147.52.22:5060>;tag=5deb812f096b2f10914b000000000000 |
"632108" <sip:632108@202.84.24.107:5060>;tag=3332695765 | 200 |
INVITE | sip:632108@202.84.24.107:5060;transport=UDP |
sip:user1@10.0.1.144:5060 | sip:5997@202.147.52.22:5060 |
sip:632108@202.84.24.107:5060 | 000d2858-7ff00284-462b78c8-5c0771e7(a)202.147.52.22 |
5997 | 202.147.52.22 | 5deb812f096b2f10914b000000000000 | 3332695765 | 2005-09-28
06:51:11 | 20050928145111 | 0 | 0 |
| "5997"
<sip:5997@202.147.52.22:5060>;tag=5deb812f096b2f10914b000000000000 |
"632108" <sip:632108@202.84.24.107:5060>;tag=3332695765 | 200 | ACK
| sip:202.84.24.107;ftag=5deb812f096b2f10914b000000000000;lr=on |
sip:user1@202.84.24.126:1470 | sip:5997@202.147.52.22:5060 |
sip:632108@202.84.24.107:5060 | 000d2858-7ff00284-462b78c8-5c0771e7(a)202.147.52.22 |
5997 | 202.147.52.22 | 5deb812f096b2f10914b000000000000 | 3332695765 | 2005-09-28
06:51:11 | 20050928145111 | 0 | 0 |
| "5997"
<sip:5997@202.147.52.22:5060>;tag=5deb812f096b2f10914b000000000000 |
"632108" <sip:632108@202.84.24.107:5060>;tag=3332695765 | 200 | BYE
| sip:202.84.24.107;transport=UDP;ftag=5deb812f096b2f10914b000000000000;lr=on |
sip:user1@202.84.24.126:1470 | sip:5997@202.147.52.22:5060 |
sip:632108@202.84.24.107:5060 | 000d2858-7ff00284-462b78c8-5c0771e7(a)202.147.52.22 |
5997 | 202.147.52.22 | 5deb812f096b2f10914b000000000000 | 3332695765 | 2005-09-28
06:52:13 | 20050928145213 | 0 | 0 |