[freeside-commits] freeside/FS/FS/part_export netsapiens.pm, 1.9.2.2, 1.9.2.3
Ivan,,,
ivan at wavetail.420.am
Sun Mar 7 23:03:02 PST 2010
Update of /home/cvs/cvsroot/freeside/FS/FS/part_export
In directory wavetail.420.am:/tmp/cvs-serv12482/FS/FS/part_export
Modified Files:
Tag: FREESIDE_1_9_BRANCH
netsapiens.pm
Log Message:
domain names in netsapiens export (domain name association w/svc_phone), RT#5864
Index: netsapiens.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_export/netsapiens.pm,v
retrieving revision 1.9.2.2
retrieving revision 1.9.2.3
diff -u -w -d -r1.9.2.2 -r1.9.2.3
--- netsapiens.pm 8 Feb 2010 15:32:37 -0000 1.9.2.2
+++ netsapiens.pm 8 Mar 2010 07:03:00 -0000 1.9.2.3
@@ -72,10 +72,15 @@
$ns;
}
+sub ns_domain {
+ my($self, $svc_phone) = (shift, shift);
+ $svc_phone->domain || $self->option('domain');
+}
+
sub ns_subscriber {
my($self, $svc_phone) = (shift, shift);
- my $domain = $self->option('domain');
+ my $domain = $self->ns_domain($svc_phone);
my $phonenum = $svc_phone->phonenum;
"/domains_config/$domain/subscriber_config/$phonenum";
@@ -91,7 +96,7 @@
sub ns_devicename {
my( $self, $svc_phone ) = (shift, shift);
- my $domain = $self->option('domain');
+ my $domain = $self->ns_domain($svc_phone);
#my $countrycode = $svc_phone->countrycode;
my $phonenum = $svc_phone->phonenum;
@@ -121,7 +126,7 @@
sub ns_create_or_update {
my($self, $svc_phone, $dial_policy) = (shift, shift, shift);
- my $domain = $self->option('domain');
+ my $domain = $self->ns_domain($svc_phone);
#my $countrycode = $svc_phone->countrycode;
my $phonenum = $svc_phone->phonenum;
@@ -238,7 +243,7 @@
sub export_device_insert {
my( $self, $svc_phone, $phone_device ) = (shift, shift, shift);
- #my $domain = $self->option('domain');
+ my $domain = $self->ns_domain($svc_phone);
my $countrycode = $svc_phone->countrycode;
my $phonenum = $svc_phone->phonenum;
@@ -256,7 +261,7 @@
#'notes' =>
'server' => 'SiPbx',
- 'domain' => $self->option('domain'),
+ 'domain' => $domain,
'brand' => $phone_device->part_device->devicename,
More information about the freeside-commits
mailing list