diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2012-05-02 16:57:28 -0700 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2012-05-02 16:57:28 -0700 |
| commit | de1a54d9bc43092548662a8c3eb6b03e9d0c608d (patch) | |
| tree | 5755f5e6903ae6ed9eb84a25569907b2ec03fb2d | |
| parent | 7bef15b442c2dbc34b7e30ee4a8f9fe753bd456d (diff) | |
set required parameters for netsapiens DND and simul ring features, RT#17319
| -rw-r--r-- | FS/FS/part_export/netsapiens.pm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/FS/FS/part_export/netsapiens.pm b/FS/FS/part_export/netsapiens.pm index aa89d47a2..6e2ee8ae3 100644 --- a/FS/FS/part_export/netsapiens.pm +++ b/FS/FS/part_export/netsapiens.pm @@ -43,6 +43,11 @@ my %features = ( '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' }, @@ -262,11 +267,14 @@ sub ns_create_or_update { ### 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' => '', #? - #'parameters' => '', + 'parameters' => $param, 'hour_match' => '*', 'time_frame' => '*', 'activation' => 'now', |
