summaryrefslogtreecommitdiff
path: root/FS/FS/part_export/netsapiens.pm
diff options
context:
space:
mode:
authorivan <ivan>2011-06-03 16:33:01 +0000
committerivan <ivan>2011-06-03 16:33:01 +0000
commitd55b0bcfea714c60d87c68ad24741fbeba6cd74b (patch)
treeaa5aa91e18350e3563a65baf78ca79a4e296384c /FS/FS/part_export/netsapiens.pm
parentaa5ded92573a8f848d3652234bcfd4f8e4f0f06d (diff)
escape ("percent-encode") : and @ in netsapeins URLs, RT#12447
Diffstat (limited to 'FS/FS/part_export/netsapiens.pm')
-rw-r--r--FS/FS/part_export/netsapiens.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/FS/FS/part_export/netsapiens.pm b/FS/FS/part_export/netsapiens.pm
index 83f0f01..285db7e 100644
--- a/FS/FS/part_export/netsapiens.pm
+++ b/FS/FS/part_export/netsapiens.pm
@@ -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 @@ sub ns_registrar {
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 @@ sub ns_dialplan {
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 @@ sub export_device_insert {
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),