summaryrefslogtreecommitdiff
path: root/misc/freeswitch/scripts
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-03-08 01:18:37 -0500
committerPeter Kozak <spag@golwen.net>2013-03-08 01:18:37 -0500
commit7149ddd968787eca9d05feea315d4fa3774fe54e (patch)
treee60ad8ac5d8a7937af34a16c294ebca677e4daa7 /misc/freeswitch/scripts
parentefb96cfaa79b98fa5eb3c2ca704e83af31e77730 (diff)
detailed_calls vs. calls_active
Diffstat (limited to 'misc/freeswitch/scripts')
-rw-r--r--misc/freeswitch/scripts/common/sip_account.lua6
1 files changed, 3 insertions, 3 deletions
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);