Fix for areacode duplicates in multiple countries in admin bulk tools
Several fxes for PJSIP compatibility git-svn-id: svn://192.168.202.10@4020 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
+2
-1
@@ -32,6 +32,7 @@
|
||||
#
|
||||
# changes:
|
||||
# 260509-1847 - First build
|
||||
# 260902-1619 - Added PJSIP
|
||||
#
|
||||
|
||||
$script = 'CID_change.agi';
|
||||
@@ -203,7 +204,7 @@ $sthA->finish();
|
||||
|
||||
|
||||
$phone_extension = $channel;
|
||||
$phone_extension =~ s/^SIP\/|^IAX\/|^IAX2\///gi;
|
||||
$phone_extension =~ s/^SIP\/|^PJSIP\/|^IAX\/|^IAX2\///gi;
|
||||
$phone_extension =~ s/-.*//gi;
|
||||
if ($AGILOG) {$agi_string = "Phone Account: ($phone_extension)"; &agi_output;}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# exten => _8331*.,n,AGI(agi-VDAD_RINGALL.agi,${EXTEN})
|
||||
# exten => _8331*.,n,Hangup
|
||||
#
|
||||
# Copyright (C) 2025 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2026 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# changes:
|
||||
# 110303-2325 - First build
|
||||
@@ -26,6 +26,7 @@
|
||||
# 240415-1702 - Fix for ConfBridge code
|
||||
# 250924-2157 - Added code for deprecation of "Monitor" application after Asterisk 20
|
||||
# 251006-0902 - If recording_dtmf_muting enabled, force use of MixMonitor for recording
|
||||
# 260902-1622 - Added PJSIP
|
||||
#
|
||||
|
||||
$script = 'agi-VDAD_RINGALL.agi';
|
||||
@@ -552,6 +553,21 @@ if ($NAGcount > 0)
|
||||
}
|
||||
$sthA->finish();
|
||||
}
|
||||
if ($orVLA_exten[$orct] =~ /^PJSIP/i)
|
||||
{
|
||||
$orVLA_exten[$orct] =~ s/^PJSIP\///gi;
|
||||
$stmtA = "SELECT dialplan_number FROM phones where extension='$orVLA_exten[$orct]' and server_ip='$orVLA_server_ip[$orct]' and protocol='PJSIP';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$Pcount=$sthA->rows;
|
||||
if ($Pcount > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$Pdialplan_number = $aryA[0];
|
||||
$exten_match = "STARSYM" . $Pdialplan_number . "ATSYM";
|
||||
}
|
||||
$sthA->finish();
|
||||
}
|
||||
if ($orVLA_exten[$orct] =~ /^IAX/i)
|
||||
{
|
||||
$orVLA_exten[$orct] =~ s/^IAX2\/|^IAX\///gi;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
# getAGENTchannel.agi by Omar Rodriguez www.ItContinental.com
|
||||
# Copyright (C) 2025 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2026 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# This script is able to return the name of the channel that belongs to the agent,
|
||||
# to allow administrators to whisper to the agents
|
||||
# Has been made using Vicidial code as Base
|
||||
@@ -11,6 +11,7 @@
|
||||
# 150804-0944 - Rewritten to work on multi-server systems and with different dialplan
|
||||
# 160523-2352 - Fixed issue with local channels in session
|
||||
# 250103-1608 - Added processing of monitorsession channel variable
|
||||
# 260902-1610 - Fix for PJSIP
|
||||
#
|
||||
|
||||
$script = 'getAGENTchannel.agi';
|
||||
@@ -146,8 +147,8 @@ $s=0;
|
||||
while ($sthArows > $s)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
# channel priority(highest to lowest): SIP, IAX, Local
|
||||
if ($aryA[0] =~ /^SIP/i)
|
||||
# channel priority(highest to lowest): SIP, PJSIP, IAX, Local
|
||||
if ( ($aryA[0] =~ /^SIP/i) || ($aryA[0] =~ /^PJSIP/i) )
|
||||
{$agent_zap_channel = $aryA[0];}
|
||||
if ( ($aryA[0] =~ /^IAX/i) && ( (length($agent_zap_channel) < 4) || ($agent_zap_channel =~ /^Local/i) ) )
|
||||
{$agent_zap_channel = $aryA[0];}
|
||||
|
||||
@@ -15,10 +15,11 @@
|
||||
# then put the above Custom Dialplan into it, then set the Phone's
|
||||
# 'phone context' to the call menu ID that you just created.
|
||||
#
|
||||
# Copyright (C) 2016 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2026 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# changes:
|
||||
# 160527-1415 - First build
|
||||
# 260902-1624 - Added PJSIP
|
||||
#
|
||||
|
||||
$script = 'phone_alt_CID.agi';
|
||||
@@ -176,7 +177,7 @@ $sthA->finish();
|
||||
|
||||
|
||||
$phone_extension = $channel;
|
||||
$phone_extension =~ s/^SIP\/|^IAX\/|^IAX2\///gi;
|
||||
$phone_extension =~ s/^SIP\/|^PJSIP\/|^IAX\/|^IAX2\///gi;
|
||||
$phone_extension =~ s/-.*//gi;
|
||||
if ($AGILOG) {$agi_string = "Phone Account: ($phone_extension)"; &agi_output;}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user