[freeside-commits] freeside/FS/FS/part_export netsapiens.pm, 1.12, 1.12.4.1
Ivan,,,
ivan at wavetail.420.am
Fri Jun 3 09:33:04 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/FS/part_export
In directory wavetail.420.am:/tmp/cvs-serv16449
Modified Files:
Tag: FREESIDE_2_1_BRANCH
netsapiens.pm
Log Message:
escape ("percent-encode") : and @ in netsapeins URLs, RT#12447
Index: netsapiens.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_export/netsapiens.pm,v
retrieving revision 1.12
retrieving revision 1.12.4.1
diff -u -w -d -r1.12 -r1.12.4.1
--- netsapiens.pm 8 Mar 2010 07:02:58 -0000 1.12
+++ netsapiens.pm 3 Jun 2011 16:33:02 -0000 1.12.4.1
@@ -1,7 +1,8 @@
package FS::part_export::netsapiens;
use vars qw(@ISA $me %info);
-use URI;
+use URI; #needed?
+use URI::Escape;
use MIME::Base64;
use Tie::IxHash;
use FS::part_export;
@@ -90,7 +91,7 @@
my($self, $svc_phone) = (shift, shift);
$self->ns_subscriber($svc_phone).
- '/registrar_config/'. $self->ns_devicename($svc_phone);
+ '/registrar_config/'. uri_escape($self->ns_devicename($svc_phone));
}
sub ns_devicename {
@@ -111,7 +112,7 @@
my $phonenum = $svc_phone->phonenum;
#"/dialplans/DID+Table/dialplan_config/sip:$countrycode$phonenum\@*"
- "/dialplans/DID+Table/dialplan_config/sip:$phonenum\@*"
+ "/dialplans/DID+Table/dialplan_config/". uri_escape("sip:$phonenum\@*")
}
sub ns_device {
@@ -246,8 +247,7 @@
my $domain = $self->ns_domain($svc_phone);
my $countrycode = $svc_phone->countrycode;
my $phonenum = $svc_phone->phonenum;
-
- my $device = $self->ns_devicename($svc_phone);
+ #my $device = $self->ns_devicename($svc_phone);
my $ns = $self->ns_device_command(
'PUT', $self->ns_device($svc_phone, $phone_device),
More information about the freeside-commits
mailing list