[Spce-user] Mediator crashes

Klaus Peter v. Friedeburg friedeburg at aco.de
Thu Oct 13 08:17:22 EDT 2011


Hello Andreas,
Hello list,

I have correcte the statement and it is running:

this SQL-Statement list all record-pairs with negative duration:
select * from acc a, acc b where a.method = 'INVITE' and b.method = 'BYE' and a.callid = b.callid and a.time > b.time

this statement delete the records:
delete a from acc AS a, acc b where a.method = 'INVITE' and b.method = 'BYE' and a.callid = b.callid and a.time > b.time

after this, you can start the mediator

Mit freundlichen Grüßen

          Klaus Peter v. Friedeburg

-----Ursprüngliche Nachricht-----
Von: Andreas Granig [mailto:agranig at sipwise.com] 
Gesendet: Dienstag, 11. Oktober 2011 21:46
An: Klaus Peter v. Friedeburg
Cc: spce-user at lists.sipwise.com
Betreff: Re: AW: [Spce-user] Mediator crashes

Hello,

Please ALWAYS reply to list or have the list on CC.

On 10/11/2011 08:54 PM, Klaus Peter v. Friedeburg wrote:
> do have an SQL-Script ore something other to delete the records with negative duration from the table? Or an other workaround to temp. fix my problem?

No, there is no prepared solution to this. You need to construct a query which joins start and stop records with the same call-id and checks for the timestamp. Something like that should be a good start:

select * from acc a, acc b where a.method = 'INVITE' and b.method = 'BYE' and a.callid = b.callid and a.time < b.time;

Completely untested, tweak it as needed.

Andreas





More information about the Spce-user mailing list