From 7149ddd968787eca9d05feea315d4fa3774fe54e Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Fri, 8 Mar 2013 01:18:37 -0500 Subject: detailed_calls vs. calls_active --- misc/freeswitch/scripts/common/sip_account.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'misc/freeswitch/scripts/common/sip_account.lua') diff --git a/misc/freeswitch/scripts/common/sip_account.lua b/misc/freeswitch/scripts/common/sip_account.lua index 6cc7d25..e7ee0d7 100644 --- a/misc/freeswitch/scripts/common/sip_account.lua +++ b/misc/freeswitch/scripts/common/sip_account.lua @@ -130,9 +130,9 @@ end function SipAccount.call_state(self) - local sql_query = 'SELECT `callstate` FROM `detailed_calls` \ - WHERE `presence_id` LIKE "' .. self.record.auth_name .. '@%" \ - OR `b_presence_id` LIKE "' .. self.record.auth_name .. '@%" \ + local sql_query = 'SELECT `callstate` FROM `calls_active` \ + WHERE `sip_account_id` = ' .. self.id .. ' \ + OR `b_sip_account_id` = ' .. self.id .. ' \ LIMIT 1'; return self.database:query_return_value(sql_query); -- cgit v1.2.3