Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pbxm-perl-lib-el7
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
static
pbxm-perl-lib-el7
Commits
c495a28b
Commit
c495a28b
authored
2 years ago
by
Andrey Shevchuk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed InboundRoutes maps
parent
03541d10
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
67 deletions
+60
-67
InboundRoutes.pm
...irdlane/perl_lib/Asterisk/API/Structures/InboundRoutes.pm
+60
-67
No files found.
opt/thirdlane/perl_lib/Asterisk/API/Structures/InboundRoutes.pm
View file @
c495a28b
...
...
@@ -9,15 +9,6 @@ use Asterisk::API::Documentation::Generic;
our
$VERSION
=
"1"
;
our
%
out_hash_map
=
(
"assigned"
=>
{
"description"
=>
"Assigned"
,
"format"
=>
"raw"
,
"hidden"
=>
0
,
"required"
=>
0
,
"sample"
=>
""
,
"transform"
=>
"assigned"
,
"type"
=>
"string"
},
"billable"
=>
{
"description"
=>
"Billable"
,
"format"
=>
"raw"
,
...
...
@@ -25,7 +16,7 @@ our %out_hash_map = (
"required"
=>
0
,
"sample"
=>
""
,
"transform"
=>
"billable"
,
"type"
=>
"
string
"
"type"
=>
"
bool
"
},
"channels"
=>
{
"description"
=>
"Channels"
,
...
...
@@ -72,56 +63,28 @@ our %out_hash_map = (
"transform"
=>
"prompt_language"
,
"type"
=>
"string"
},
"routetype"
=>
{
"description"
=>
"Routetype"
,
"tz"
=>
{
"default"
=>
""
,
"description"
=>
"Time zone"
,
"format"
=>
"raw"
,
"hidden"
=>
0
,
"required"
=>
0
,
"required"
=>
1
,
"sample"
=>
""
,
"transform"
=>
"
routetype
"
,
"transform"
=>
"
tz
"
,
"type"
=>
"string"
},
"
tenant
"
=>
{
"description"
=>
"
Tenant
"
,
"
routetype
"
=>
{
"description"
=>
"
Routetype
"
,
"format"
=>
"raw"
,
"hidden"
=>
0
,
"required"
=>
0
,
"sample"
=>
""
,
"transform"
=>
"
tenant
"
,
"transform"
=>
"
routetype
"
,
"type"
=>
"string"
},
"tenantid"
=>
{
"description"
=>
"Tenant ID"
,
"format"
=>
"int64"
,
"hidden"
=>
0
,
"required"
=>
1
,
"sample"
=>
1
,
"transform"
=>
"tenant_id"
,
"type"
=>
"integer"
}
);
my
%
in_hash_map
=
(
"action_0"
=>
{
"default"
=>
"tl-reroute"
,
"description"
=>
"Route action"
,
"format"
=>
"raw"
,
"hidden"
=>
0
,
"required"
=>
0
,
"sample"
=>
"tl-reroute"
,
"transform"
=>
"action_0"
,
"type"
=>
"string"
},
"assigned"
=>
{
"description"
=>
"Assigned"
,
"format"
=>
"raw"
,
"hidden"
=>
0
,
"required"
=>
0
,
"sample"
=>
""
,
"transform"
=>
"assigned"
,
"type"
=>
"string"
},
"billable"
=>
{
"description"
=>
"Billable"
,
"format"
=>
"raw"
,
...
...
@@ -129,7 +92,7 @@ my %in_hash_map = (
"required"
=>
0
,
"sample"
=>
""
,
"transform"
=>
"billable"
,
"type"
=>
"
string
"
"type"
=>
"
bool
"
},
"channels"
=>
{
"description"
=>
"Channels"
,
...
...
@@ -175,6 +138,16 @@ my %in_hash_map = (
"transform"
=>
"prompt_language"
,
"type"
=>
"string"
},
"tz"
=>
{
"default"
=>
""
,
"description"
=>
"Time zone"
,
"format"
=>
"raw"
,
"hidden"
=>
0
,
"required"
=>
1
,
"sample"
=>
""
,
"transform"
=>
"tz"
,
"type"
=>
"string"
},
"routetype"
=>
{
"default"
=>
"schedule"
,
"description"
=>
"Route type"
,
...
...
@@ -184,27 +157,7 @@ my %in_hash_map = (
"sample"
=>
"schedule"
,
"transform"
=>
"routetype"
,
"type"
=>
"string"
},
"schedule_0"
=>
{
"default"
=>
"tl-allhours-thirdlane"
,
"description"
=>
"Route schedule"
,
"format"
=>
"raw"
,
"hidden"
=>
0
,
"required"
=>
0
,
"sample"
=>
"tl-allhours-thirdlane"
,
"transform"
=>
"schedule_0"
,
"type"
=>
"string"
},
"tenant_id"
=>
{
"description"
=>
"Tenant id"
,
"format"
=>
"raw"
,
"hidden"
=>
0
,
"required"
=>
0
,
"sample"
=>
""
,
"transform"
=>
"tenantid"
,
"type"
=>
"string"
}
);
our
%
requests
=
(
...
...
@@ -438,6 +391,32 @@ sub map_out {
$out_hash
=
$self
->
{
mapper
}
->
fix_type
(
$out_hash
,
$self
->
{
type
}
->
{
out
},
$self
->
{
reverse
}
->
{
out
});
$out_hash
->
{
options
}
=
[
];
my
$options
=
{
};
foreach
my
$key
(
keys
%
{
$hash
}
)
{
if
(
$key
=~
m/^(.*?)_(\d+)_(\d+)$/
)
{
$options
->
{
$2
}
->
{
args
}
->
{
$3
}
=
$hash
->
{
$key
};
}
elsif
(
$key
=~
m/^(.*?)_(\d+)$/
)
{
if
(
$1
eq
"args"
)
{
my
$i
=
0
;
foreach
my
$arg
(
split
/,/
,
$hash
->
{
$key
}
)
{
$options
->
{
$2
}
->
{
args
}
->
{
$i
++
}
=
$arg
;
}
}
elsif
(
not
grep
{
$1
eq
$_
}
qw(var schedule_name)
)
{
$options
->
{
$2
}
->
{
$1
}
=
$hash
->
{
$key
};
}
}
}
foreach
my
$key
(
keys
%
{
$options
}
)
{
$options
->
{
$key
}
->
{
args
}
=
[
map
{
$options
->
{
$key
}
->
{
args
}
->
{
$_
}
}
sort
{
int
(
$a
)
<=>
int
(
$b
)
}
keys
%
{
$options
->
{
$key
}
->
{
args
}
//
=
{}
}
];
}
$out_hash
->
{
options
}
=
[
map
{
$options
->
{
$_
}
}
sort
{
int
(
$a
)
<=>
int
(
$b
)
}
keys
%
{
$options
}
];
return
$out_hash
;
}
...
...
@@ -462,6 +441,20 @@ sub map_in {
if
exists
$self
->
{
map
}
->
{
in
}
->
{
$key
}
&&
exists
$hash
->
{
$key
};
}
if
(
exists
$hash
->
{
options
}
)
{
for
(
my
$i
=
0
;
$i
<
scalar
@
{
$hash
->
{
options
}
};
$i
++
)
{
$out_hash
->
{
"schedule_$i"
}
=
$hash
->
{
options
}
->
[
$i
]
->
{
schedule
};
$out_hash
->
{
"action_$i"
}
=
$hash
->
{
options
}
->
[
$i
]
->
{
action
};
if
(
exists
$hash
->
{
options
}
->
[
$i
]
->
{
args
}
)
{
$out_hash
->
{
"args_$i"
}
=
join
","
,
@
{
$hash
->
{
options
}
->
[
$i
]
->
{
args
}
};
for
(
my
$t
=
0
;
$t
<
scalar
@
{
$hash
->
{
options
}
->
[
$i
]
->
{
args
}
};
$t
++
)
{
$out_hash
->
{
$hash
->
{
options
}
->
[
$i
]
->
{
action
}
.
"_"
.
$i
.
"_"
.
$t
}
=
$hash
->
{
options
}
->
[
$i
]
->
{
args
}
->
[
$t
];
}
}
}
}
return
$out_hash
;
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment