avaya 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 082bb6b5a31180c9f3e830d88c030345128d6b7d
4
- data.tar.gz: 4f3eec6f3fc9dbf8b70fee594c6b1abd4b8bc798
3
+ metadata.gz: 4778b1d94b37d397dd1fe8716fcb3fdf30f3dca5
4
+ data.tar.gz: 6d86f3bda0bb1d1fff1dcf2f7de8c184b3f8f54e
5
5
  SHA512:
6
- metadata.gz: a2d7386171698b8034e85562a9df3ab2e6be0d850b483d3a1dd028565b80da6c81ef70f3a63a2baa255adb96c2daaab2bafa7db55ba1b91cfc19dc07ec7513b0
7
- data.tar.gz: a9623e7c9b17631df471dd628ee5e5a111f449de8fc1a9246a50db62fc5875fa6f1f7266fcc8ef79c3943e5c77d8f0ec32b0bd652c552ff2c01e72858bc86b11
6
+ metadata.gz: b1cbdb67d65759234da6fd536dee12538999ad3ceda2a28ab1da9d4eb27020c5d803ade76eb902fb3e20f6e1ec304291e8384c5a1ef33cc06b586446508ea766
7
+ data.tar.gz: 6766466cf5574cc9328b1b2ec94ef79635885d41c9ee1ae64d2c022c6d941868a168381d55044ced8460981ab9d86ca07ee113eb41e6566f7d37aa751cccb831
@@ -29,8 +29,11 @@ module Avaya
29
29
 
30
30
  #items = @all_calls.collect { |row| row.gsub(/Line /, 'Line_').split(' ') }
31
31
  @raw.each do |call|
32
+
32
33
  if call.start_with?("NAME: ")
33
34
  @name = call.gsub!('NAME: ', '').gsub!('"', '')
35
+ elsif call.start_with? "POTS:"
36
+ pots_line(call)
34
37
  elsif call.start_with? "RAS:"
35
38
  ras_line(call)
36
39
  elsif call.start_with? "SIPLine:"
@@ -46,6 +49,14 @@ module Avaya
46
49
 
47
50
  end
48
51
 
52
+ def pots_line(line)
53
+ pots_det = {
54
+ id: line.match(/^POTS: [0-9]*/).to_s.gsub!(/POTS: /, ''),
55
+ count: line.match(/Chans=[0-9]*/).to_s.gsub!(/Chans=/, '')
56
+ }
57
+ @pots << pots_det
58
+ end
59
+
49
60
  def ras_line(line)
50
61
  ras_det = {
51
62
  id: line.match(/^RAS: [0-9]*/).to_s.gsub!(/RAS: /, ''),
@@ -56,12 +67,14 @@ module Avaya
56
67
  end
57
68
 
58
69
  def sip_line(line)
59
- pots_det = {
60
- id: line.match(/^SIPLine: [0-9]*/).to_s.gsub!(/SIPLine: /, ''),
61
- count: line.match(/Chans=[0-9]*/).to_s.gsub!(/Chans=/, ''),
62
- used: line.match(/Used=[0-9]*/).to_s.gsub!(/Used=/, ''),
70
+
71
+ sip_det = {
72
+ id: line.match(/^SIPLine: [0-9]*/).to_s.gsub!(/SIPLine: /, ''),
73
+ count: line.match(/Chans=[0-9]*/).to_s.gsub!(/Chans=/, ''),
74
+ used: line.match(/Used=[0-9]*/).to_s.gsub!(/Used=/, ''),
75
+ version: line.match(/Version=.*/).to_s.gsub!(/Version=/, '')
63
76
  }
64
- @pots << pots_det
77
+ @sip << sip_det
65
78
  end
66
79
 
67
80
  def q93_line(line)
@@ -76,16 +89,24 @@ module Avaya
76
89
  end
77
90
 
78
91
  def call_line(line)
79
- puts line
92
+
80
93
  call_det= {
81
94
  call_id: line.match(/^CALL: [0-9.]*/).to_s.gsub!(/CALL: /, ''),
82
95
  state: line.match(/ State=[0-9]*/).to_s.gsub!(/ State=/, ''),
83
96
  cut: line.match(/Cut=[0-9]*/).to_s.gsub!(/Cut=/, ''),
84
97
  music: line.match(/Music=[0-9.]*/).to_s.gsub!(/Music=/, ''),
85
- a_end: line.match(/Aend=[a-zA-Z0-9"()]*\s[()0-9.]*/).to_s.gsub!(/Aend=/, ''),
86
- b_end: line.match(/Bend=[a-zA-Z0-9"()]*\s[\[\]a-zA-Z0-9()]*\s[0-9().]*/).to_s.gsub!(/Bend=/, ''),
87
- called_num: line.match(/CalledNum=[0-9]*\s[()a-zA-Z0-9]*/).to_s.gsub!(/CalledNum=/, ''),
88
- calling_num: line.match(/CallingNum=[0-9]*\s[()a-zA-Z0-9]*/).to_s.gsub!(/CallingNum=/, ''),
98
+ a_end_line: line.match(/Aend="Line [0-9]*"/).to_s.gsub!(/Aend="Line /, '').to_s.gsub!(/"/, ''),
99
+ a_end: line.match(/Aend="[a-zA-Z0-9()\s]*"/).to_s.gsub!(/Aend="/, '').to_s.gsub!(/"/, ''),
100
+ a_end_name: line.match(/Aend="[a-zA-Z0-9]*\(/).to_s.gsub!(/Aend="/, '').to_s.gsub!(/\(/, ''),
101
+ a_end_ext: line.match(/Aend="[a-zA-Z0-9()]*/).to_s.gsub!(/Aend="[a-zA-Z0-9]*\(/, '').to_s.gsub!(/\)/, ''),
102
+ b_end: line.match(/Bend="[a-zA-Z0-9\s]*"/).to_s.gsub!(/Bend=/, '').to_s.gsub!(/"/, ''),
103
+ b_end_line: line.match(/\[Line [0-9]*/).to_s.gsub!(/\[Line /, ''),
104
+ b_end_name: line.match(/Bend="[a-zA-Z0-9]*\(/).to_s.gsub!(/Bend="/, '').to_s.gsub!(/\(/, ''),
105
+ b_end_ext: line.match(/Bend="[a-zA-Z0-9()]*/).to_s.gsub!(/Bend="[a-zA-Z0-9]*\(/, '').to_s.gsub!(/\)/, ''),
106
+ called_num: line.match(/CalledNum=[0-9]*/).to_s.gsub!(/CalledNum=/, ''),
107
+ called_num_desc: line.match(/CalledNum=[0-9]*\s[(a-zA-Z0-9)]*/).to_s.gsub!(/CalledNum=[0-9]*\s\(/, '').to_s.gsub!(/\)/, ''),
108
+ calling_num: line.match(/CallingNum=[0-9]*/).to_s.gsub!(/CallingNum=/, ''),
109
+ calling_num_desc: line.match(/CallingNum=[0-9]*[0-9]*\s[(a-zA-Z0-9)]*/).to_s.gsub!(/CallingNum=[0-9]*\s\(/, '').to_s.gsub!(/\)/, ''),
89
110
  internal: line.match(/Internal=[0-9]*/).to_s.gsub!(/Internal=/, '').to_i,
90
111
  time: line.match(/Time=[0-9]*/).to_s.gsub!(/Time=/, '').to_i,
91
112
  astate: line.match(/AState=[0-9]*/).to_s.gsub!(/AState=/, '').to_i
@@ -95,4 +116,4 @@ module Avaya
95
116
 
96
117
  end
97
118
  end
98
- end
119
+ end
@@ -1,3 +1,3 @@
1
1
  module Avaya
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avaya
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Freibuis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-25 00:00:00.000000000 Z
11
+ date: 2014-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.6'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.6'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: net-tftp
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: 0.1.0
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.1.0
55
55
  description: If you are looking to talk to you Avaya Ip Office then this is the gem
@@ -60,7 +60,7 @@ executables: []
60
60
  extensions: []
61
61
  extra_rdoc_files: []
62
62
  files:
63
- - ".gitignore"
63
+ - .gitignore
64
64
  - Gemfile
65
65
  - LICENSE.txt
66
66
  - README.md
@@ -91,17 +91,17 @@ require_paths:
91
91
  - lib
92
92
  required_ruby_version: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - '>='
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  required_rubygems_version: !ruby/object:Gem::Requirement
98
98
  requirements:
99
- - - ">="
99
+ - - '>='
100
100
  - !ruby/object:Gem::Version
101
101
  version: '0'
102
102
  requirements: []
103
103
  rubyforge_project:
104
- rubygems_version: 2.3.0
104
+ rubygems_version: 2.2.2
105
105
  signing_key:
106
106
  specification_version: 4
107
107
  summary: A gem to talk to Avaya Ip Office Platform.