Yate Community Forum

Yate server => Other Yate server issues => Topic started by: hamtrix on November 15, 2016, 07:10:02 AM

Title: update database table with called number of calls with < 120 sec duration
Post by: hamtrix on November 15, 2016, 07:10:02 AM
Hi
The script works as it expected except in call.cdr, which is supposed to update a table in database with the called number of the calls with duration less than 120 second, the finished calls of calls of course, but it update the table the table once the call starts and of course its duration is less than 120 second at the start time.
Title: Re: update database table with called number of calls with < 120 sec duration
Post by: asymetrixs on February 05, 2017, 06:31:53 AM
I dont understand what you are trying to do.

Do you want the script to update ALL cdrs or just the one for the current channel the script is working on?
If you want to update a cdr record only if the call has finished, then wait until the cdr.finalize message is sent. If you receive this, you can flag the call as ended and perform post operations (run an sql or something like that) on the database record.