projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT# 83204 - added link to service or tower causing error.
[freeside.git]
/
FS
/
FS
/
part_export
/
phone_shellcommands.pm
diff --git
a/FS/FS/part_export/phone_shellcommands.pm
b/FS/FS/part_export/phone_shellcommands.pm
index
411c263
..
3f01de3
100644
(file)
--- a/
FS/FS/part_export/phone_shellcommands.pm
+++ b/
FS/FS/part_export/phone_shellcommands.pm
@@
-5,6
+5,7
@@
use vars qw(@ISA %info);
use Tie::IxHash;
use String::ShellQuote;
use FS::part_export;
use Tie::IxHash;
use String::ShellQuote;
use FS::part_export;
+use Carp qw(carp);
@ISA = qw(FS::part_export);
@ISA = qw(FS::part_export);
@@
-53,7
+54,9
@@
old_ for replace operations):
<LI><code>$cust_name</code> - Customer name (quoted for the shell)
<LI><code>$pkgnum</code> - Internal package number
<LI><code>$custnum</code> - Internal customer number
<LI><code>$cust_name</code> - Customer name (quoted for the shell)
<LI><code>$pkgnum</code> - Internal package number
<LI><code>$custnum</code> - Internal customer number
+ <LI><code>$phone_name</code> - Phone name (quoted for the shell)
<LI><code>$mac_addr</code> - MAC address (Device MAC address insert and delete commands only)
<LI><code>$mac_addr</code> - MAC address (Device MAC address insert and delete commands only)
+ <LI><code>$devicename</code> - Device type (Device type insert and delete commands only)
</UL>
END
);
</UL>
END
);
@@
-83,14
+86,16
@@
sub _export_unsuspend {
sub export_device_insert {
my( $self, $svc_phone, $phone_device ) = @_;
$self->_export_command('mac_insert', $svc_phone,
sub export_device_insert {
my( $self, $svc_phone, $phone_device ) = @_;
$self->_export_command('mac_insert', $svc_phone,
- 'mac_addr'=>$phone_device->mac_addr
+ mac_addr => $phone_device->mac_addr,
+ devicename => $phone_device->part_device->devicename,
);
}
sub export_device_delete {
my( $self, $svc_phone, $phone_device ) = @_;
$self->_export_command('mac_delete', $svc_phone,
);
}
sub export_device_delete {
my( $self, $svc_phone, $phone_device ) = @_;
$self->_export_command('mac_delete', $svc_phone,
- 'mac_addr'=>$phone_device->mac_addr
+ mac_addr => $phone_device->mac_addr,
+ devicename => $phone_device->part_device->devicename,
);
}
);
}
@@
-99,6
+104,12
@@
sub _export_command {
my $command = $self->option($action);
return '' if $command =~ /^\s*$/;
my $command = $self->option($action);
return '' if $command =~ /^\s*$/;
+ if ( $FS::svc_Common::noexport_hack ) {
+ carp "_export_command($action) suppressed by noexport_hack"
+ if $self->option('debug');
+ return;
+ }
+
#set variable for the command
no strict 'vars';
{
#set variable for the command
no strict 'vars';
{
@@
-112,6
+123,7
@@
sub _export_command {
my $cust_name = $cust_pkg ? $cust_pkg->cust_main->name : '';
$cust_name = shell_quote $cust_name;
my $sip_password = shell_quote $svc_phone->sip_password;
my $cust_name = $cust_pkg ? $cust_pkg->cust_main->name : '';
$cust_name = shell_quote $cust_name;
my $sip_password = shell_quote $svc_phone->sip_password;
+ my $phone_name = shell_quote $svc_phone->phone_name;
#done setting variables for the command
$self->shellcommands_queue( $svc_phone->svcnum,
#done setting variables for the command
$self->shellcommands_queue( $svc_phone->svcnum,