summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorlevinse <levinse>2011-01-11 15:49:13 +0000
committerlevinse <levinse>2011-01-11 15:49:13 +0000
commit05ff1db02237afada9acbbf43990b4bbf4c78636 (patch)
tree4f77945a1854bb23e00e83db140d0f85ed4d343b /httemplate
parent51e350319a224c3212ab9406da7ecf3ebe8f285d (diff)
Vitelity DID selection improvements, RT4868
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/elements/select-did.html10
-rw-r--r--httemplate/misc/phonenums.cgi6
2 files changed, 9 insertions, 7 deletions
diff --git a/httemplate/elements/select-did.html b/httemplate/elements/select-did.html
index 5256ae44d..6cc63b961 100644
--- a/httemplate/elements/select-did.html
+++ b/httemplate/elements/select-did.html
@@ -13,9 +13,8 @@ Example:
</%doc>
% if ( $use_selector ) {
-% if ( $export->exporttype eq 'vitelity' &&
-% ( $export->option('restrict_selection') eq 'non-tollfree'
-% || !$export->option('restrict_selection')) ) {
+% if ( $export->option('restrict_selection') eq 'non-tollfree'
+% || !$export->option('restrict_selection') ) {
<TABLE>
<TR>
@@ -63,9 +62,8 @@ Example:
</TABLE>
% }
-% if ( $export->exporttype eq 'vitelity' &&
-% ( $export->option('restrict_selection') eq 'tollfree'
-% || !$export->option('restrict_selection')) ) {
+% if ( $export->option('restrict_selection') eq 'tollfree'
+% || !$export->option('restrict_selection') ) {
<font size="-1">Toll-free</font>
<% include('/elements/select-phonenum.html',
'svcpart' => $svcpart,
diff --git a/httemplate/misc/phonenums.cgi b/httemplate/misc/phonenums.cgi
index b86d03f5d..108a5f7cd 100644
--- a/httemplate/misc/phonenums.cgi
+++ b/httemplate/misc/phonenums.cgi
@@ -13,11 +13,15 @@ if ( scalar(@exports) > 1 ) {
die "no DID providing export attached to svcpart $svcpart";
}
my $export = $exports[0];
-
+
my %opts = ();
if ( $exchangestring eq 'tollfree' ) {
$opts{'tollfree'} = 1;
}
+elsif ( $exchangestring =~ /^([\w\s]+), ([A-Z][A-Z])$/ ) {
+ $opts{'ratecenter'} = $1;
+ $opts{'state'} = $2;
+}
else {
$exchangestring =~ /\((\d{3})-(\d{3})-XXXX\)\s*$/i
or die "unparsable exchange: $exchangestring";