-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlistcallpickupgroup.rb
52 lines (39 loc) · 1007 Bytes
/
listcallpickupgroup.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
require 'savon'
require 'json'
require_relative 'config'
uuid = Array.new
client = Savon.client(
wsdl: "lib/axl/#{VERSION}/AXLAPI.wsdl",
namespace: "http://www.cisco.com/AXL/API/#{VERSION}",
endpoint: "https://#{IP}:8443/axl/",
basic_auth: [USERNAME, PASSWORD],
headers: {'Content-Type' => 'text/xml; charset=utf-8'},
ssl_verify_mode: :none)
params = { returnedTags: {
uuid: ''
}, searchCriteria: {
pattern: '%'
}}
begin
response = client.call(:list_call_pickup_group) do
message params
end
puts response
response.body[:list_call_pickup_group_response][:return][:call_pickup_group].each do |r|
uuid << r[:@uuid]
puts uuid
end
end
=begin
uuid.each do |u|
paramlist = {
uuid: u
}
begin
responselist = client.call(:get_call_pickup_group) do
message paramlist
end
end
# puts responselist.body[:get_call_pickup_group_response][:return].to_json
end
=end