From 5341d680be8c7701f97cd497015da37806046f03 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Wed, 27 Feb 2013 06:27:16 -0500 Subject: sip_account can be in b leg --- app/models/sip_account.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/sip_account.rb b/app/models/sip_account.rb index 2040b41..5660e37 100644 --- a/app/models/sip_account.rb +++ b/app/models/sip_account.rb @@ -38,7 +38,7 @@ class SipAccount < ActiveRecord::Base has_many :ringtones, :as => :ringtoneable, :dependent => :destroy - has_many :calls, :finder_sql => lambda { |s| "SELECT DISTINCT detailed_calls.* FROM detailed_calls WHERE presence_id LIKE '#{self.auth_name}@%'" } + has_many :calls, :finder_sql => lambda { |s| "SELECT DISTINCT detailed_calls.* FROM detailed_calls WHERE presence_id LIKE '#{self.auth_name}@%' OR b_presence_id LIKE '#{self.auth_name}@%'" } # Delegations: # -- cgit v1.2.3