projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3bbe0f7
)
set required parameters for netsapiens DND and simul ring features, RT#17319
author
Ivan Kohler
<ivan@freeside.biz>
Wed, 2 May 2012 23:57:27 +0000
(16:57 -0700)
committer
Ivan Kohler
<ivan@freeside.biz>
Wed, 2 May 2012 23:57:27 +0000
(16:57 -0700)
FS/FS/part_export/netsapiens.pm
patch
|
blob
|
history
diff --git
a/FS/FS/part_export/netsapiens.pm
b/FS/FS/part_export/netsapiens.pm
index
aa89d47
..
6e2ee8a
100644
(file)
--- a/
FS/FS/part_export/netsapiens.pm
+++ b/
FS/FS/part_export/netsapiens.pm
@@
-43,6
+43,11
@@
my %features = (
'sim' => 'Simultaneous Ring',
);
'sim' => 'Simultaneous Ring',
);
+my %feature_param = (
+ 'dnd' => 'n/a',
+ 'sim' => '$phonenum',
+);
+
tie my %options, 'Tie::IxHash',
'login' => { label=>'NetSapiens tac2 User API username' },
'password' => { label=>'NetSapiens tac2 User API password' },
tie my %options, 'Tie::IxHash',
'login' => { label=>'NetSapiens tac2 User API username' },
'password' => { label=>'NetSapiens tac2 User API password' },
@@
-262,11
+267,14
@@
sub ns_create_or_update {
###
foreach $feature (split /\s+/, $self->option('features') ) {
###
foreach $feature (split /\s+/, $self->option('features') ) {
+ my $param= exists($feature_param{$feature}) ? $feature_param{$feature} : '';
+ $param = $phonenum if $param eq '$phonenum';
+
my $nsf = $self->ns_command( 'PUT', $self->ns_feature($svc_phone, $feature),
'control' => 'd', #User Control, disable
'expires' => 'never',
#'ts' => '', #?
my $nsf = $self->ns_command( 'PUT', $self->ns_feature($svc_phone, $feature),
'control' => 'd', #User Control, disable
'expires' => 'never',
#'ts' => '', #?
-
#'parameters' => ''
,
+
'parameters' => $param
,
'hour_match' => '*',
'time_frame' => '*',
'activation' => 'now',
'hour_match' => '*',
'time_frame' => '*',
'activation' => 'now',