use DateTime;
use Number::Phone;
use Try::Tiny;
+use Carp qw(carp);
our $me = '[sipwise]';
our $DEBUG = 0;
END
);
-sub export_insert {
+sub _export_insert {
my($self, $svc_x) = (shift, shift);
local $SIG{__DIE__};
'';
}
-sub export_replace {
+sub _export_replace {
my ($self, $svc_new, $svc_old) = @_;
local $SIG{__DIE__};
'';
}
-sub export_delete {
+sub _export_delete {
my ($self, $svc_x) = (shift, shift);
local $SIG{__DIE__};
# logic to set subscribers to locked/active is in replace_subscriber
-sub export_suspend {
+sub _export_suspend {
my $self = shift;
my $svc_x = shift;
my $role = $self->svc_role($svc_x);
'';
}
-sub export_unsuspend {
+sub _export_unsuspend {
my $self = shift;
my $svc_x = shift;
my $role = $self->svc_role($svc_x);
sub export_did {
my $self = shift;
my ($new, $old) = @_;
+
+ if ( $FS::svc_Common::noexport_hack ) {
+ carp 'export_did() suppressed by noexport_hack'
+ if $self->option('debug') || $DEBUG;
+ return;
+ }
+
if ( $old and $new->forward_svcnum ne $old->forward_svcnum ) {
my $old_svc_acct = $self->acct_for_did($old);
$self->replace_subscriber( $old_svc_acct ) if $old_svc_acct;