summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-08-14 07:58:22 +0200
committerPeter Kozak <spag@golwen.net>2013-08-14 07:58:22 +0200
commit01df44f3575c0a465973724fa729cbdceaa0f5a6 (patch)
tree9b30e0e479dbf3a02e9144c6999b3be885203149
parent93c95dd38c15a37f878bf79818ecfcc40b713054 (diff)
yealink resync fixed
-rw-r--r--app/models/phone.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/models/phone.rb b/app/models/phone.rb
index 033251a..a11a400 100644
--- a/app/models/phone.rb
+++ b/app/models/phone.rb
@@ -113,10 +113,7 @@ class Phone < ActiveRecord::Base
rescue
return false
end
- end
-
- return false
- elsif self.phone_model.manufacturer.ieee_name == 'XIAMEN YEALINK NETWORK TECHNOLOGY CO.,LTD'
+ elsif self.phone_model.manufacturer.ieee_name == 'XIAMEN YEALINK NETWORK TECHNOLOGY CO.,LTD'
if !sip_account
self.sip_accounts.where(:sip_accountable_type => self.phoneable_type).each do |sip_account_associated|
if sip_account_associated.registration
@@ -145,7 +142,7 @@ class Phone < ActiveRecord::Base
event.add_header("host", sip_account.sip_domain.host)
event.add_header("content-type", "application/simple-message-summary")
return event.fire()
- elsif self.phone_model.manufacturer.ieee_name == 'Polycom'
+ elsif self.phone_model.manufacturer.ieee_name == 'Polycom'
if !sip_account
self.sip_accounts.where(:sip_accountable_type => self.phoneable_type).each do |sip_account_associated|
if sip_account_associated.registration
@@ -167,6 +164,9 @@ class Phone < ActiveRecord::Base
event.add_header("host", sip_account.sip_domain.host)
event.add_header("content-type", "application/simple-message-summary")
return event.fire()
+ end
+
+ return false
end