X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Fbroadworks.pm;h=a04a70e9b1cf03212e210253b6275ff57089d96a;hb=7dd7870cac67454c84c1dc3b3003a64a61b3451f;hp=7a9ed70f4101ed57e288d1710bcdbdf6cfea0d96;hpb=6bc36a712285e9616a00ae38b136d7b8cd6cb58f;p=freeside.git diff --git a/FS/FS/part_export/broadworks.pm b/FS/FS/part_export/broadworks.pm index 7a9ed70f4..a04a70e9b 100644 --- a/FS/FS/part_export/broadworks.pm +++ b/FS/FS/part_export/broadworks.pm @@ -6,7 +6,6 @@ use strict; use Tie::IxHash; use FS::Record qw(dbh qsearch qsearchs); use Locale::SubCountry; -use BroadWorks::OCI; our $me = '[broadworks]'; our %client; # exportnum => client object @@ -42,7 +41,8 @@ number, this requires a svc_phone definition and a part_device. The "title" field ("external name") of the part_device must be one of the access device type names recognized by BroadWorks, such as "Polycom Soundpoint IP 550", "SNOM 320", or "Generic SIP Phone".

-

+

Each phone service must have a device linked before it will be functional. +Until then, authentication will be denied.

END ); @@ -86,6 +86,11 @@ sub export_replace { newUserId => $newUserId ); return $message if !$success; + + if ( my $device = qsearchs('phone_device', { svcnum => $svc_new->svcnum }) ) { + # there's a Line/Port configured for the device, and it also needs to be renamed. + $error ||= $self->set_endpoint( $newUserId, $self->deviceName($device) ); + } } if ( $svc_old->phonenum ne $svc_new->phonenum ) {