[freeside-commits] branch master updated. 92713b3eb2e1511b71e850af3e47296cbf5bc24f
Mark Wells
mark at 420.am
Mon Aug 8 13:25:30 PDT 2016
The branch, master has been updated
via 92713b3eb2e1511b71e850af3e47296cbf5bc24f (commit)
from 19c5403927d3d6071cb3c4026032aad87d715648 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 92713b3eb2e1511b71e850af3e47296cbf5bc24f
Author: Mark Wells <mark at freeside.biz>
Date: Mon Aug 8 13:23:25 2016 -0700
option to extract destination number from userfield, #71674
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index 1b50006..50fc7f0 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -4992,6 +4992,13 @@ and customer address. Include units.',
},
{
+ 'key' => 'cdr-userfield_dnis_rewrite',
+ 'section' => 'telephony',
+ 'description' => 'If the CDR userfield contains "DNIS=" followed by a sequence of digits, use that as the destination number for the call.',
+ 'type' => 'checkbox',
+ },
+
+ {
'key' => 'cdr-intl_to_domestic_rewrite',
'section' => 'telephony',
'description' => 'Strip the "011" international prefix from CDR destination numbers if the rest of the number is 7 digits or shorter, and so probably does not contain a country code.',
diff --git a/FS/bin/freeside-cdrrewrited b/FS/bin/freeside-cdrrewrited
index 1745d67..34a2068 100644
--- a/FS/bin/freeside-cdrrewrited
+++ b/FS/bin/freeside-cdrrewrited
@@ -219,6 +219,12 @@ while (1) {
}
+ if ( $conf->exists('cdr-userfield_dnis_rewrite') and
+ $cdr->userfield =~ /DNIS=(\d+)/ ) {
+ $cdr->dst($1);
+ push @status, 'userfield_dnis';
+ }
+
if ( $conf->exists('cdr-intl_to_domestic_rewrite') and
$cdr->dst =~ /^(011)(\d{0,7})$/ ) {
$cdr->dst($2);
@@ -261,6 +267,7 @@ sub _shouldrun {
|| $conf->exists('cdr-taqua-accountcode_rewrite')
|| $conf->exists('cdr-taqua-callerid_rewrite')
|| $conf->exists('cdr-intl_to_domestic_rewrite')
+ || $conf->exists('cdr-userfield_dnis_rewrite')
|| $conf->exists('cdr-skip_duplicate_rewrite')
|| 0
;
-----------------------------------------------------------------------
Summary of changes:
FS/FS/Conf.pm | 7 +++++++
FS/bin/freeside-cdrrewrited | 7 +++++++
2 files changed, 14 insertions(+)
More information about the freeside-commits
mailing list