summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-07-31 10:32:15 +0200
committerPeter Kozak <spag@golwen.net>2013-07-31 10:32:15 +0200
commit1ba505931e6bd2ff6e102f1a3774b2f564a6099a (patch)
tree5c5b06a5bd8a1d3c565a348cb630231b73ab4f52
parent0ae2c077c6be0be7ad05bd6a0e090b388c7c490f (diff)
honor clir flag in snom call history
-rw-r--r--app/controllers/config_snom_controller.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/controllers/config_snom_controller.rb b/app/controllers/config_snom_controller.rb
index da2f8c0..1cac4b2 100644
--- a/app/controllers/config_snom_controller.rb
+++ b/app/controllers/config_snom_controller.rb
@@ -909,11 +909,24 @@ AAAA'
calls.each do |call|
display_name = call.display_name
phone_number = call.display_number
+
+ if phone_number.blank?
+ next
+ end
+
phone_book_entry = call.phone_book_entry_by_number(phone_number)
if display_name.blank?
display_name = phone_book_entry.to_s
end
+ if @sip_account.clir != call.clir
+ if call.clir == true
+ phone_number = 'f-dcliron-' + phone_number
+ elsif call.clir == false
+ phone_number = 'f-dcliroff-' + phone_number
+ end
+ end
+
@phone_xml_object[:entries].push({
:selected => false,
:number => phone_number,