avaya 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/avaya.gemspec +1 -0
- data/lib/avaya/call_list.rb +14 -14
- data/lib/avaya/dir_list.rb +1 -1
- data/lib/avaya/endpoint.rb +14 -14
- data/lib/avaya/hunt_info.rb +2 -2
- data/lib/avaya/hunt_list.rb +5 -8
- data/lib/avaya/member_of.rb +3 -5
- data/lib/avaya/tftp.rb +1 -1
- data/lib/avaya/user_info.rb +30 -27
- data/lib/avaya/user_list.rb +5 -5
- data/lib/avaya/version.rb +1 -1
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89dd622f3f777a6471b03bb18ec315e01a645814
|
4
|
+
data.tar.gz: 632b4719fe77e52d99e599305fcf23df4031eb0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a81ef409cd60c01a8cea2a4ca21991a0ff702713748d5e7269ffd8e9dabaf81eba28da4fa441324cabf23b88ec93fbc51d8567b5bb1e8b211fbf0903b37873f3
|
7
|
+
data.tar.gz: 9c24025f1046626d511b95020ab463d142e746a385acc133335dbcd7898c2f7ff2c70b2c99931973ccf7baab94fb5caca14962d308e8a8687f15e783835fec96
|
data/avaya.gemspec
CHANGED
data/lib/avaya/call_list.rb
CHANGED
@@ -4,10 +4,10 @@ module Avaya
|
|
4
4
|
|
5
5
|
def initialize
|
6
6
|
|
7
|
-
@ras
|
8
|
-
@pots
|
9
|
-
@sip
|
10
|
-
@q93
|
7
|
+
@ras = []
|
8
|
+
@pots = []
|
9
|
+
@sip = []
|
10
|
+
@q93 = []
|
11
11
|
@all_calls = Avaya::TFTP.read(:call_list)
|
12
12
|
|
13
13
|
end
|
@@ -41,9 +41,9 @@ module Avaya
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def ras_line(line)
|
44
|
-
line
|
44
|
+
line = line.split(' ')
|
45
45
|
ras_det = {
|
46
|
-
id:
|
46
|
+
id: line[0].gsub!(/NAME: /, ''),
|
47
47
|
count: line[0].gsub!(/Chans=/, '')
|
48
48
|
}
|
49
49
|
@ras.merge! ras_det
|
@@ -51,29 +51,29 @@ module Avaya
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def sip_line(line)
|
54
|
-
line
|
54
|
+
line = line.split(' ')
|
55
55
|
pots_det = {
|
56
|
-
id:
|
56
|
+
id: line[0].gsub!(/POTS: /, ''),
|
57
57
|
count: line[1].gsub!(/Chans=/, ''),
|
58
|
-
used:
|
58
|
+
used: line[2].gsub!(/Used=/, ''),
|
59
59
|
}
|
60
60
|
@pots.merge! pots_det
|
61
61
|
end
|
62
62
|
|
63
63
|
def q93_line(line)
|
64
64
|
|
65
|
-
line
|
65
|
+
line = line.split.gsub(/Q931 PRI TE Version /, 'Q931_PRI_TE_Version_').split(' ')
|
66
66
|
q93_det = {
|
67
|
-
id:
|
68
|
-
count:
|
69
|
-
used:
|
67
|
+
id: line[0].gsub!(/NAME: /, ''),
|
68
|
+
count: line[1].gsub!(/Chans=/, ''),
|
69
|
+
used: line[2].gsub!(/Used=/, ''),
|
70
70
|
version: line[4].gsub!(/Version=/, '').gsub!('_', ' ')
|
71
71
|
}
|
72
72
|
@q93.merge! q93_det
|
73
73
|
end
|
74
74
|
|
75
75
|
def call_line(line)
|
76
|
-
line
|
76
|
+
line = line.gsub(/Line /, 'Line_').split(' ')
|
77
77
|
call_det = {
|
78
78
|
|
79
79
|
|
data/lib/avaya/dir_list.rb
CHANGED
data/lib/avaya/endpoint.rb
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
module Avaya
|
2
2
|
def self.endpoint(end_point, var2 = nil)
|
3
3
|
endpoints = {
|
4
|
-
who_is:
|
4
|
+
who_is: "nasystem/who_is",
|
5
5
|
licence_list: "nasystem/licence_list",
|
6
|
-
user_list:
|
7
|
-
hunt_list:
|
8
|
-
dir_list:
|
9
|
-
extn_list:
|
10
|
-
accountCode:
|
11
|
-
user_info:
|
12
|
-
user_info2:
|
13
|
-
user_info3:
|
14
|
-
member_of:
|
15
|
-
call_list:
|
16
|
-
call_info:
|
17
|
-
call_info2:
|
18
|
-
hunt_info:
|
6
|
+
user_list: "nasystem/user_list#{var2}",
|
7
|
+
hunt_list: "nasystem/hunt_list",
|
8
|
+
dir_list: "nasystem/dir_list",
|
9
|
+
extn_list: "nasystem/extn_list",
|
10
|
+
accountCode: "nasystem/AccountCode",
|
11
|
+
user_info: "nasystem/user_info/#{var2}",
|
12
|
+
user_info2: "nasystem/user_info2/#{var2}",
|
13
|
+
user_info3: "nasystem/user_info3/#{var2}",
|
14
|
+
member_of: "nasystem/MemberOf/#{var2}",
|
15
|
+
call_list: "nasystem/call_list/1/1",
|
16
|
+
call_info: "nasystem/call_info/#{var2}",
|
17
|
+
call_info2: "nasystem/call_info2/#{var2}",
|
18
|
+
hunt_info: "nasystem/hunt_info/#{var2}",
|
19
19
|
|
20
20
|
}
|
21
21
|
endpoints[end_point]
|
data/lib/avaya/hunt_info.rb
CHANGED
data/lib/avaya/hunt_list.rb
CHANGED
@@ -9,7 +9,6 @@ module Avaya
|
|
9
9
|
def self.get
|
10
10
|
hunt_list = self.new
|
11
11
|
hunt_list.get
|
12
|
-
|
13
12
|
end
|
14
13
|
|
15
14
|
def get
|
@@ -17,18 +16,16 @@ module Avaya
|
|
17
16
|
directory.each do |row|
|
18
17
|
row = row.split(",")
|
19
18
|
list << {
|
20
|
-
name:
|
21
|
-
ext:
|
22
|
-
queue:
|
19
|
+
name: row[0],
|
20
|
+
ext: row[1],
|
21
|
+
queue: row[2],
|
23
22
|
voice_mails: row[7],
|
24
|
-
hunt_id:
|
23
|
+
hunt_id: row[9]
|
25
24
|
}
|
26
25
|
end
|
27
26
|
|
28
27
|
list
|
29
|
-
end
|
30
|
-
|
31
28
|
|
29
|
+
end
|
32
30
|
end
|
33
|
-
|
34
31
|
end
|
data/lib/avaya/member_of.rb
CHANGED
@@ -17,14 +17,12 @@ module Avaya
|
|
17
17
|
groups.each do |group|
|
18
18
|
group = group.split(",")
|
19
19
|
list << {
|
20
|
-
group:
|
21
|
-
ext:
|
22
|
-
queue:
|
20
|
+
group: group[0],
|
21
|
+
ext: group[1],
|
22
|
+
queue: group[2],
|
23
23
|
group_id: group.last
|
24
|
-
|
25
24
|
}
|
26
25
|
end
|
27
|
-
|
28
26
|
list
|
29
27
|
end
|
30
28
|
|
data/lib/avaya/tftp.rb
CHANGED
data/lib/avaya/user_info.rb
CHANGED
@@ -1,38 +1,41 @@
|
|
1
1
|
module Avaya
|
2
2
|
class UserInfo
|
3
|
-
attr_reader :
|
4
|
-
:
|
5
|
-
:
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
3
|
+
attr_reader :raw,
|
4
|
+
:user,
|
5
|
+
:login_name,
|
6
|
+
:full_name,
|
7
|
+
:ext,
|
8
|
+
:forward_unconditional,
|
9
|
+
:forward_unconditional_number,
|
10
|
+
:forward_unconditional_all_calls,
|
11
|
+
:forward_busy,
|
12
|
+
:dnd
|
13
|
+
|
14
|
+
def initialize(ext)
|
15
|
+
@ext = ext
|
11
16
|
end
|
12
17
|
|
13
|
-
def self.get (
|
14
|
-
user_info = self.new(
|
18
|
+
def self.get (ext)
|
19
|
+
user_info = self.new(ext)
|
20
|
+
user_info.get
|
15
21
|
user_info
|
16
22
|
end
|
17
23
|
|
18
24
|
def get
|
19
|
-
@
|
20
|
-
@
|
21
|
-
|
22
|
-
@login_name
|
23
|
-
@full_name
|
24
|
-
@ext
|
25
|
-
@forward_busy
|
26
|
-
@forward_no_answer
|
27
|
-
@forward_unconditional
|
28
|
-
@forward_unconditional_number
|
29
|
-
@dnd
|
30
|
-
|
31
|
-
@
|
32
|
-
|
33
|
-
@voicemail_to_email = @user[11] == "1" ? true : false
|
34
|
-
@voicemail_count = @user[11]
|
35
|
-
"updated"
|
25
|
+
@raw = Avaya::TFTP.read(:"user_info#{3}", @ext)
|
26
|
+
@user_info = @raw[0].split(',')
|
27
|
+
|
28
|
+
@login_name = @user_info[0]
|
29
|
+
@full_name = @user_info[1]
|
30
|
+
@ext = @user_info[2]
|
31
|
+
@forward_busy = @user_info[3] == "1" ? true : false
|
32
|
+
@forward_no_answer = @user_info[4] == "1" ? true : false
|
33
|
+
@forward_unconditional = @user_info[5] == "1" ? true : false
|
34
|
+
@forward_unconditional_number = @user_info[6]
|
35
|
+
@dnd = @user_info[8] == "1" ? true : false
|
36
|
+
@forward_unconditional_all_calls = @user_info[25] == "1" ? true : false
|
37
|
+
@voicemail_count = @user_info[11]
|
38
|
+
self
|
36
39
|
end
|
37
40
|
|
38
41
|
|
data/lib/avaya/user_list.rb
CHANGED
@@ -15,15 +15,15 @@ module Avaya
|
|
15
15
|
def get
|
16
16
|
list= []
|
17
17
|
user_list.each do |row|
|
18
|
-
row
|
18
|
+
row = row.split(",")
|
19
19
|
new_row = {
|
20
|
-
name:
|
21
|
-
ext:
|
20
|
+
name: row[0],
|
21
|
+
ext: row[1],
|
22
22
|
full_name: row[2],
|
23
|
-
user_id:
|
23
|
+
user_id: row.last
|
24
24
|
|
25
25
|
}
|
26
|
-
|
26
|
+
unless @list_id == "" or @list_id == "2"
|
27
27
|
new_row.merge! ex_directory: (row[3] =="1")
|
28
28
|
new_row.merge! active: (row[4] == "1")
|
29
29
|
end
|
data/lib/avaya/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avaya
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
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-
|
11
|
+
date: 2014-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: net-tftp
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.1.0
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.1.0
|
41
55
|
description: If you are looking to talk to you Avaya Ip Office then this is the gem
|
42
56
|
for you!
|
43
57
|
email:
|
@@ -87,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
87
101
|
version: '0'
|
88
102
|
requirements: []
|
89
103
|
rubyforge_project:
|
90
|
-
rubygems_version: 2.
|
104
|
+
rubygems_version: 2.3.0
|
91
105
|
signing_key:
|
92
106
|
specification_version: 4
|
93
107
|
summary: A gem to talk to Avaya Ip Office Platform.
|