summaryrefslogtreecommitdiff
path: root/misc/freeswitch/scripts/common/sip_account.lua
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-03-25 10:27:27 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-03-25 10:27:27 +0100
commitdf6e17e48995f25e72509986f30700d778b179b6 (patch)
treef432c24b8e4ad81009188650dabfd99194883265 /misc/freeswitch/scripts/common/sip_account.lua
parent11f186a118285fbc87a536af26730780a9ad01f5 (diff)
parentcce94a74aa5c9691f9b37cd9be5a6831f8063812 (diff)
Merge branch 'develop'5.1.2
Diffstat (limited to 'misc/freeswitch/scripts/common/sip_account.lua')
-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);