elastix 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MTk1YzRhOWQxYzAyNjk1NDgzYWVmYjE4MDllOGExMjRjZGY0N2NmMw==
4
+ ZjdhYWY0OGYyYWU5Y2U0ZjliNjU1OTdlMjZlMjVmZmVkNzVhMDUzMA==
5
5
  data.tar.gz: !binary |-
6
- YWMwM2U2MTEyNjk3ODljMTlhMTFlNWY5ZWZmNTAwYzI0ZjI5ZmI0Yg==
6
+ MTI1ZDIwMGY0YWUzYWZiMmY0MDRjZDJjMmVhOGI0YTU3MDE0MzQ4Yg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZmNkMmUyNGUzMmI5NTgxOGRhMmM0NzVkNzMxZWIyNzQxNDI0MDRmYjE3YTMy
10
- ZGNjNTcxN2M5ZDZhMjVhZmM0ZjQzZTEwMTAwYWZkNzhiNjJiYTc2ODRmYzU5
11
- MzU2MjZhMjc3MWJlOTMxY2UzMDhmYmJkMWUwMGYwYTliYzVkZmU=
9
+ NmQ3MGQyNzhmYTI4MTlmODNmNzBlNmIwY2Y5ZjExOWM1Zjk4ZDFiZGZkMTQw
10
+ ZjU2NmVkYTgxMTZkMTRiZjI3YzYzZWM5MjI0MDk1OTkxMGEyMDBkMjRjOGJk
11
+ NWZkZjVjYzNhYTc0OGJiZWJmNDU2N2Y1NjE2ZDUzNmRmNWUwNmY=
12
12
  data.tar.gz: !binary |-
13
- YmI5MzA3MzM5ZDgxOTUzYmE4NTMxMjI0ZmQ3NWYxMGZmYjFjMmMxMjlhYzMy
14
- ZmZhZjI5Yzc1YTFmYTcxOGM3ZDU2OWZlMjNlMTc1Y2EyYzNmNzU0ZTUwZGU0
15
- Y2M5OGM3NzI0YTQwNWM3NzlhOGViYmZjZWJmOGEwOTNiNzk1M2I=
13
+ YWI1ZjQyNzUwZWJlYTYwZDFjYzk0OGM2MGMwOTYwZGFhN2Q2NzU3M2RiZWZk
14
+ MWFmNzg0ZDJjNDM0N2NlMjkxZmU4N2M2MzViMDkxMTkxMmZkMjYyMmY5NjBi
15
+ ZjZjODZjOTE4NzdmYzAyNTI0MGJmYjU3ZGExM2EzNjI0ZmU4YzU=
@@ -1,6 +1,6 @@
1
1
  module Elastix
2
2
  class Extension < Base
3
- attr_accessor :extension, :name, :sipname, :outboundcid, :devinfo_secret
3
+ attr_accessor :extension, :name, :sipname, :outboundcid, :devinfo_secret, :record_in, :record_out
4
4
 
5
5
  def initialize params
6
6
  params.each_pair{|key,value| instance_variable_set "@#{key}", value}
@@ -81,17 +81,25 @@ module Elastix
81
81
  @@elastix.get "#{@@base_address}/config.php?type=setup&display=extensions&extdisplay=#{extension}"
82
82
  end
83
83
 
84
- #TODO make it easier to add fields. Right now it's just hardcoded what is returned.
84
+ #TODO make it easier to add fields. Right now it's just hardcoded what is returned
85
+ # also it looks terrible.
85
86
  def self.get_extension_attributes extension
86
87
  secret_record = Sip.where(id: extension, keyword: "secret").first
88
+ record_in_record = Sip.where(id: extension, keyword: "record_in").first
89
+ record_out_record = Sip.where(id: extension, keyword: "record_out").first
87
90
  secret = secret_record ? secret_record.data : nil
91
+ record_in = record_in_record ? record_in_record.data : nil
92
+ record_out = record_out_record ? record_out_record.data : nil
93
+
88
94
  user_fields = User.find_by_extension(extension)
89
95
  {
90
96
  extension: extension,
91
97
  name: (user_fields.name if user_fields),
92
98
  sipname: (user_fields.sipname if user_fields),
93
99
  outboundcid: (user_fields.outboundcid if user_fields),
94
- devinfo_secret: secret
100
+ devinfo_secret: secret,
101
+ record_in: record_in,
102
+ record_out: record_out
95
103
  }
96
104
  end
97
105
 
@@ -1,3 +1,3 @@
1
1
  module Elastix
2
- VERSION = "0.0.12"
2
+ VERSION = "0.0.13"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elastix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Hahn
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-21 00:00:00.000000000 Z
11
+ date: 2013-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mechanize