suggestion or fix for extensions with dashes in it
Posted: Wed Jun 29, 2011 8:51 pm
the dialer will not populate the live_sip_channel table if the exntesion in the phones table has a - in it..
here is a code suggestions update for AST_update.pl
#old code
#$extension =~ s/^SIP\/|-\S+$//gi;
#new code
$extension =~ s/^SIP\/|-[^-]*$//gi;
#old code
if ($SIP_client_count)
{
$channel_match=$channel;
$channel_match =~ s/-\S+$//gi;
$channel_match =~ s/^SIP\///gi;
$channel_match =~ s/\*/\\\*/gi;
# print "checking for SIP client: |$channel_match|\n";
if ($SIP_client_list =~ /\|$channel_match\|/i) {$line_type = 'CLIENT';}
}
#new code
if ($SIP_client_count)
{
$channel_match=$channel;
#$channel_match =~ s/-\S+$//gi;
$channel_match =~ s/-[^-]*$//gi;
$channel_match =~ s/^SIP\///gi;
$channel_match =~ s/\*/\\\*/gi;
# print "checking for SIP client: |$channel_match|\n";
if ($SIP_client_list =~ /\|$channel_match\|/i) {$line_type = 'CLIENT';}
}
here is a code suggestions update for AST_update.pl
#old code
#$extension =~ s/^SIP\/|-\S+$//gi;
#new code
$extension =~ s/^SIP\/|-[^-]*$//gi;
#old code
if ($SIP_client_count)
{
$channel_match=$channel;
$channel_match =~ s/-\S+$//gi;
$channel_match =~ s/^SIP\///gi;
$channel_match =~ s/\*/\\\*/gi;
# print "checking for SIP client: |$channel_match|\n";
if ($SIP_client_list =~ /\|$channel_match\|/i) {$line_type = 'CLIENT';}
}
#new code
if ($SIP_client_count)
{
$channel_match=$channel;
#$channel_match =~ s/-\S+$//gi;
$channel_match =~ s/-[^-]*$//gi;
$channel_match =~ s/^SIP\///gi;
$channel_match =~ s/\*/\\\*/gi;
# print "checking for SIP client: |$channel_match|\n";
if ($SIP_client_list =~ /\|$channel_match\|/i) {$line_type = 'CLIENT';}
}