#--
-my $domestic_prefix = 1; #hmm, global config?
-
while (1) {
#hmm... don't want to do an expensive search with an ever-growing bunch
$found = 1;
- if ( $cdr->dstchannel =~ /^Local\/($domestic_prefix)?(\d+)/i
- && $2 ne $cdr->dst
+ if ( $cdr->dstchannel =~ /^Local\/(\d+)/i && $1 ne $cdr->dst
)
{
- my $dst = $2;
+ my $dst = $1;
warn "dst ". $cdr->dst. " does not match dstchannel $dst ".
"(". $cdr->dstchannel. "); rewriting CDR as a forwarded call";