Commit 6d49c0f7 authored by Gurvinder Singh's avatar Gurvinder Singh

adding support for newer model due to kibana

parent 9b5bb261
......@@ -470,9 +470,9 @@ void SipSetCallTypeString()
*/
void SipGetQuery(char *query, char *timestamp, int interval, char *direction)
{
snprintf(query, DEFAULT_QUERY_SIZE, "select id,start,src,dst,billsec,"
"calltype,accountcode,direct from %s.%s where start > '%s'"
" and start < DATE_ADD('%s', INTERVAL %d MINUTE) and calltype in (%s)"
snprintf(query, DEFAULT_QUERY_SIZE, "select id,start,src_username,dst_username,duration,"
"category,accountcode,direction from %s.%s where end >= '%s'"
" and end < DATE_ADD('%s', INTERVAL %d MINUTE) and calltype in (%s)"
" and accountcode='%s' and direct='%s'", dbname, table, timestamp,
timestamp,interval, calltype,accountcode,direction);
}
......
......@@ -33,7 +33,6 @@
#include <malloc.h>
#include <string.h>
#include <sys/time.h>
#include <postgresql/libpq-fe.h>
#define VERSION "1.3.1"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment