But of course...I just assumed that goes without saying. That is one
reason to use re-INVITEs because at least then you can bill from the
first INVITE to the final re-INVITE. If you're session-timer fires
re-INVITE messages every two (2) minutes then you can get sure to have
at most 120 seconds that are not billable in the event of a missing
BYE message.
But like I mentioned in my original post, that SQL statement will not
work with when accounting for re-INVITEs
Regards,
Paul
On 7/4/05, Gustavo GarcĂa <ggb(a)tid.es> wrote:
NOTE2: This will not work if the BYE is lost, too.
Regards.
G.
-----Mensaje original-----
De: serusers-bounces(a)iptel.org [mailto:serusers-bounces@lists.iptel.org] En nombre
de Java Rockx
Enviado el: lunes, 04 de julio de 2005 15:11
Para: Iqbal
CC: serusers(a)lists.iptel.org
Asunto: Re: [Serusers] session duration accounting
Ryan,
This MySQL query should do the trick. It joins the acc table to
itself. One side grabs INVITE messages and the other side grabs BYE
messages.
NOTE: This will not work if you account for re-INVITE messages because
you will then have multple INVITEs for the same call.
Regards,
Paul
SELECT t1.from_uri as orig_number, t1.to_uri as term_number,
TIMEDIFF(t2.time, t1.time) as duration, t1.timestamp as calldate
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='INVITE' AND
t2.sip_method='BYE'
On 7/4/05, Iqbal <iqbal(a)gigo.co.uk> wrote:
its records the INVITE and BYE, so fro there you
can work out the
session duration
Iqbal
Ryan Pagquil wrote:
guys,
just want to ask if i can make ser to account session durations
for billing purposes?
Thanks,
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers