Several fixes for ConfBridge patches and documentation
git-svn-id: svn://192.168.202.10@3639 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
--- ADMIN_keepalive_ALL.pl.old 2022-08-26 15:53:26.415030606 -0400
|
||||
+++ ADMIN_keepalive_ALL.pl 2022-08-26 15:53:09.559088829 -0400
|
||||
--- ADMIN_keepalive_ALL.pl.orig 2022-09-14 10:37:18.395450572 -0400
|
||||
+++ ADMIN_keepalive_ALL.pl 2022-09-15 08:53:43.353869671 -0400
|
||||
@@ -438,6 +438,7 @@
|
||||
# 9 - Timeclock auto logout\n";
|
||||
# E - Email parser script
|
||||
@@ -29,7 +29,7 @@
|
||||
if ($DBX) {print "Asterisk version: $ast_ver_str{major} $ast_ver_str{minor}\n";}
|
||||
|
||||
+$vicidial_conf_table = 'vicidial_conferences';
|
||||
+if ( $conf_engine eq "CONFBRIDGE" ) { $vicidial_conf_table = 'vicidial_confbridge'; }
|
||||
+if ( $conf_engine eq "CONFBRIDGE" ) { $vicidial_conf_table = 'vicidial_confbridges'; }
|
||||
+if ($DBX) {print "Server is using $conf_engine for conferences. Conference table is $vicidial_conf_table\n";}
|
||||
+
|
||||
if ($VARactive_keepalives =~ /X/)
|
||||
@@ -296,13 +296,15 @@
|
||||
|
||||
|
||||
### Only run the following on one server in the cluster, the one set as the active voicemail server ###
|
||||
@@ -2692,9 +2727,14 @@
|
||||
@@ -2692,9 +2727,16 @@
|
||||
$Lext .= "; Agent session audio playback meetme entry\n";
|
||||
$Lext .= "exten => _473782178600XXX,1,Meetme(\${EXTEN:8},q)\n";
|
||||
$Lext .= "exten => _473782178600XXX,n,Hangup()\n";
|
||||
+ $Lext .= "; Agent session audio playback ConfBridge entry\n";
|
||||
+ $Lext .= "exten => _473782178600XXX,n,ConfBridge(\${EXTEN:8},vici_agent_bridge,vici_audio_user)\n";
|
||||
+ $Lext .= "exten => _473782178600XXX,n,Hangup()\n";
|
||||
+ $Lext .= "exten => _473782179600XXX,1,Answer()\n";
|
||||
+ $Lext .= "exten => _473782179600XXX,n,Playback(sip-silence)\n";
|
||||
+ $Lext .= "exten => _473782179600XXX,n,ConfBridge(\${EXTEN:8},vici_agent_bridge,vici_audio_user)\n";
|
||||
+ $Lext .= "exten => _473782179600XXX,n,Hangup()\n";
|
||||
$Lext .= "; Agent session audio playback loop\n";
|
||||
$Lext .= "exten => _473782168600XXX,1,Dial(\${TRUNKplay}/47378217\${EXTEN:8},5,To)\n";
|
||||
$Lext .= "exten => _473782168600XXX,n,Hangup()\n";
|
||||
@@ -311,7 +313,7 @@
|
||||
$Lext .= "; Agent session audio playback extension\n";
|
||||
$Lext .= "exten => 473782158521111,1,Answer\n";
|
||||
$Lext .= "exten => 473782158521111,n,ControlPlayback(\${CALLERID(name)},99999,0,1,2,3,4)\n";
|
||||
@@ -2715,6 +2755,14 @@
|
||||
@@ -2715,6 +2757,14 @@
|
||||
$Lext .= "exten => _473782188600XXX,n,GotoIf(\$[ \"\${agent_zap_channel}\" = \"101\" ]?fin)\n";
|
||||
$Lext .= "exten => _473782188600XXX,n,ChanSpy(\${agent_zap_channel},qw)\n";
|
||||
$Lext .= "exten => _473782188600XXX,n(fin),Hangup()\n";
|
||||
@@ -326,7 +328,59 @@
|
||||
}
|
||||
|
||||
$Lext .= "\n";
|
||||
@@ -3782,6 +3830,7 @@
|
||||
@@ -3750,7 +3800,7 @@
|
||||
|
||||
##### BEGIN Generate custom meetme entries if set #####
|
||||
$meetme_custom_ext='';
|
||||
- if ( (length($meetme_enter_login_filename) > 0) || (length($meetme_enter_leave3way_filename) > 0) )
|
||||
+ if ( ($conf_engine eq "MEETME") && ( (length($meetme_enter_login_filename) > 0) || (length($meetme_enter_leave3way_filename) > 0) ) )
|
||||
{
|
||||
if (length($meetme_enter_login_filename) < 1) {$meetme_enter_login_filename='sip-silence';}
|
||||
if (length($meetme_enter_leave3way_filename) < 1) {$meetme_enter_leave3way_filename='sip-silence';}
|
||||
@@ -3773,6 +3823,42 @@
|
||||
if ($DBX>0) {print "Custom Meetme login and leave3way entries generated: |$meetme_enter_login_filename|$meetme_enter_leave3way_filename|\n";}
|
||||
}
|
||||
##### END Generate custom meetme entries if set #####
|
||||
+
|
||||
+ ##### BEGIN Generate custom ConfBridge entries if set #####
|
||||
+ $confbridge_custom_ext='';
|
||||
+ if ( ($conf_engine eq "CONFBRIDGE") && ( (length($meetme_enter_login_filename) > 0) || (length($meetme_enter_leave3way_filename) > 0) ) )
|
||||
+ {
|
||||
+ if (length($meetme_enter_login_filename) < 1) {$meetme_enter_login_filename='sip-silence';}
|
||||
+ if (length($meetme_enter_leave3way_filename) < 1) {$meetme_enter_leave3way_filename='sip-silence';}
|
||||
+
|
||||
+ $confbridge_custom_ext .= '[confbridge-enter-login]';
|
||||
+ $confbridge_custom_ext .= "\n; confbridge entry for Vicidial agent logging in, Asterisk 16+ compatible only\n";
|
||||
+ $confbridge_custom_ext .= "exten => _29600XXX,1,Answer()\n";
|
||||
+ $confbridge_custom_ext .= "exten => _29600XXX,n,Playback(sip-silence)\n";
|
||||
+ $confbridge_custom_ext .= "exten => _29600XXX,n,Set(CONFBRIDGE(bridge,template)=vici_agent_bridge)\n";
|
||||
+ $confbridge_custom_ext .= "exten => _29600XXX,n,Set(CONFBRIDGE(bridge,sound_only_person)=$meetme_enter_login_filename)\n";
|
||||
+ $confbridge_custom_ext .= "exten => _29600XXX,n,Set(CONFBRIDGE(user,template)=vici_agent_user)\n";
|
||||
+ $confbridge_custom_ext .= "exten => _29600XXX,n,ConfBridge(\${EXTEN:1})\n";
|
||||
+ $confbridge_custom_ext .= "exten => _29600XXX,n,Hangup()\n";
|
||||
+ $confbridge_custom_ext .= "\n";
|
||||
+ $confbridge_custom_ext .= $hangup_exten_line;
|
||||
+ $confbridge_custom_ext .= "\n\n";
|
||||
+ $confbridge_custom_ext .= '[confbridge-enter-leave3way]';
|
||||
+ $confbridge_custom_ext .= "\n; confbridge entry for Vicidial agent leaving 3way call, Asterisk 16+ compatible only\n";
|
||||
+ $confbridge_custom_ext .= "exten => _29600XXX,1,Answer()\n";
|
||||
+ $confbridge_custom_ext .= "exten => _29600XXX,n,Playback(sip-silence)\n";
|
||||
+ $confbridge_custom_ext .= "exten => _29600XXX,n,Set(CONFBRIDGE(bridge,template)=vici_agent_bridge)\n";
|
||||
+ $confbridge_custom_ext .= "exten => _29600XXX,n,Set(CONFBRIDGE(bridge,sound_only_person)=$meetme_enter_leave3way_filename)\n";
|
||||
+ $confbridge_custom_ext .= "exten => _29600XXX,n,Set(CONFBRIDGE(user,template)=vici_agent_user)\n";
|
||||
+ $confbridge_custom_ext .= "exten => _29600XXX,n,ConfBridge(\${EXTEN:1})\n";
|
||||
+ $confbridge_custom_ext .= "exten => _29600XXX,n,Hangup()\n";
|
||||
+ $confbridge_custom_ext .= "\n";
|
||||
+ $confbridge_custom_ext .= $hangup_exten_line;
|
||||
+ $confbridge_custom_ext .= "\n\n";
|
||||
+
|
||||
+ if ($DBX>0) {print "Custom ConfBridge login and leave3way entries generated: |$meetme_enter_login_filename|$meetme_enter_leave3way_filename|\n";}
|
||||
+ }
|
||||
+ ##### END Generate ConfBridge meetme entries if set #####
|
||||
|
||||
|
||||
##### BEGIN Generate the Call Menu entries #####
|
||||
@@ -3782,6 +3868,7 @@
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$i=0;
|
||||
@@ -334,7 +388,7 @@
|
||||
while ($sthArows > $i)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
@@ -4376,53 +4425,56 @@
|
||||
@@ -4376,53 +4463,56 @@
|
||||
##### END generate voicemail accounts for all distinct phones on dedicated voicemail server
|
||||
|
||||
|
||||
@@ -434,7 +488,15 @@
|
||||
}
|
||||
##### END generate meetme entries for this server
|
||||
|
||||
@@ -4878,7 +4930,7 @@
|
||||
@@ -4503,6 +4593,7 @@
|
||||
print ext "; WARNING- THIS FILE IS AUTO-GENERATED BY VICIDIAL, ANY EDITS YOU MAKE WILL BE LOST\n";
|
||||
print ext "$ext\n";
|
||||
print ext "$meetme_custom_ext\n";
|
||||
+ print ext "$confbridge_custom_ext\n";
|
||||
print ext "$call_menu_ext\n";
|
||||
print ext "\n";
|
||||
if (length($SScustom_dialplan_entry)>5)
|
||||
@@ -4878,7 +4969,7 @@
|
||||
if ($screenoutput[$i] =~ /\.asterisk/)
|
||||
{
|
||||
$asteriskSCREEN++;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
VICIdial ConfBridge Support: STARTED: 2022-06-22 UPDATED: 2022-09-08
|
||||
VICIdial ConfBridge Support: STARTED: 2022-06-22 UPDATED: 2022-09-16
|
||||
|
||||
|
||||
!!! NOTE: VICIdial ConfBridge support is currently in BETA mode and is not recommended for systems that require a stable and tested codebase !!!
|
||||
@@ -223,6 +223,19 @@ to the bottom of the file. Then create the /etc/asterisk/confbridge-vicidial.con
|
||||
hear_own_join_sound=no
|
||||
dsp_drop_silence=yes
|
||||
|
||||
In the /etc/asterisk/manager.conf add:
|
||||
|
||||
[confcron]
|
||||
secret = 1234
|
||||
read = command,reporting
|
||||
write = command,reporting
|
||||
|
||||
eventfilter=Event: Meetme
|
||||
eventfilter=Event: Confbridge
|
||||
|
||||
to the bottom of the file.
|
||||
|
||||
|
||||
|
||||
- Database changes
|
||||
To accomodate the change to ConfBridge two fields were added to the "servers" table in Vicidial and another table was added. Here are the two fields added to the servers table:
|
||||
|
||||
@@ -1,6 +1,36 @@
|
||||
--- manager_send.php.old 2022-08-26 16:03:28.232951728 -0400
|
||||
+++ manager_send.php 2022-08-23 15:55:47.677934909 -0400
|
||||
@@ -1763,6 +1763,7 @@
|
||||
--- manager_send.php.orig 2022-09-14 10:36:59.611513030 -0400
|
||||
+++ manager_send.php 2022-09-14 10:35:51.303740728 -0400
|
||||
@@ -403,9 +403,17 @@
|
||||
{$SSagent_debug_logging=0;}
|
||||
}
|
||||
|
||||
+$stmtA="SELECT conf_engine FROM servers WHERE server_ip='$server_ip';";
|
||||
+$rslt=mysql_to_mysqli($stmtA, $link);
|
||||
+$row=mysqli_fetch_row($rslt);
|
||||
+$conf_engine = $row[0];
|
||||
+
|
||||
$threeway_context = $ext_context;
|
||||
if (strlen($meetme_enter_leave3way_filename) > 0)
|
||||
- {$threeway_context = 'meetme-enter-leave3way';}
|
||||
+ {
|
||||
+ $threeway_context = 'meetme-enter-leave3way';
|
||||
+ if ($conf_engine == "CONFBRIDGE") { $threeway_context = 'confbridge-enter-leave3way'; }
|
||||
+ }
|
||||
|
||||
$auth=0;
|
||||
$auth_message = user_authorization($user,$pass,'',0,1,0,0,'manager_send');
|
||||
@@ -576,7 +584,9 @@
|
||||
print "<!-- sending login sipsak message: $SIPSAK_prefix$campaign -->\n";
|
||||
passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_prefix$campaign\" -r 5060 -s sip:$extension@$phone_ip > /dev/null");
|
||||
$queryCID = "$SIPSAK_prefix$campaign$DS$CIDdate";
|
||||
- }
|
||||
+ }
|
||||
+ if ($conf_engine == "CONFBRIDGE") { $exten = "2$exten"; }
|
||||
+
|
||||
$ACTION="Originate";
|
||||
}
|
||||
|
||||
@@ -1763,6 +1773,7 @@
|
||||
$row=''; $rowx='';
|
||||
$channel_liveX=1;
|
||||
$channel_liveY=1;
|
||||
@@ -8,7 +38,7 @@
|
||||
if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($session_id)<3) or ( ( (strlen($extrachannel)<3) or (strlen($exten)<1) ) and (!preg_match("/NEXTAVAILABLE/",$exten)) ) )
|
||||
{
|
||||
$channel_liveX=0;
|
||||
@@ -1790,19 +1791,26 @@
|
||||
@@ -1790,19 +1801,26 @@
|
||||
{
|
||||
if (preg_match("/NEXTAVAILABLE/",$exten))
|
||||
{
|
||||
@@ -38,7 +68,7 @@
|
||||
if ($format=='debug') {echo "\n<!-- $stmtC -->";}
|
||||
$rslt=mysql_to_mysqli($stmtC, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmtC,'02031',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
@@ -1814,12 +1822,12 @@
|
||||
@@ -1814,12 +1832,12 @@
|
||||
$extension = "$extension$user";
|
||||
}
|
||||
|
||||
@@ -53,7 +83,7 @@
|
||||
if ($format=='debug') {echo "\n<!-- $stmtE -->";}
|
||||
$rslt=mysql_to_mysqli($stmtE, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmtE,'02033',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
@@ -1857,7 +1865,7 @@
|
||||
@@ -1857,7 +1875,7 @@
|
||||
else
|
||||
{
|
||||
$channel_liveX=0;
|
||||
@@ -62,7 +92,7 @@
|
||||
if (preg_match("/SECOND|FIRST|DEBUG/",$filename)) {$DBout .= "Cannot find empty conference on $server_ip";}
|
||||
$stage .= "|ERROR $server_ip|";
|
||||
}
|
||||
@@ -1989,6 +1997,7 @@
|
||||
@@ -1989,6 +2007,7 @@
|
||||
$row=''; $rowx='';
|
||||
$channel_liveX=1;
|
||||
$channel_liveY=1;
|
||||
@@ -70,7 +100,7 @@
|
||||
if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($session_id)<3) or ( ( (strlen($extrachannel)<3) or (strlen($exten)<1) ) and (!preg_match("/NEXTAVAILABLE/",$exten)) ) )
|
||||
{
|
||||
$channel_liveX=0;
|
||||
@@ -2018,31 +2027,38 @@
|
||||
@@ -2018,31 +2037,38 @@
|
||||
{
|
||||
if (preg_match("/NEXTAVAILABLE/",$exten))
|
||||
{
|
||||
@@ -114,7 +144,7 @@
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02049',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
@@ -2076,7 +2092,7 @@
|
||||
@@ -2076,7 +2102,7 @@
|
||||
else
|
||||
{
|
||||
$channel_liveX=0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--- vicidial.php.old 2022-08-26 16:06:54.916237481 -0400
|
||||
+++ vicidial.php 2022-08-26 16:06:39.472290841 -0400
|
||||
--- vicidial.php.orig 2022-09-14 10:57:14.823660709 -0400
|
||||
+++ vicidial.php 2022-09-14 10:38:50.167146363 -0400
|
||||
@@ -3446,6 +3446,15 @@
|
||||
}
|
||||
else
|
||||
@@ -25,7 +25,17 @@
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01085',$VD_login,$server_ip,$session_name,$one_mysql_log);}
|
||||
@@ -3674,14 +3683,15 @@
|
||||
@@ -3644,9 +3653,6 @@
|
||||
|
||||
if (strlen($webphone_layout_override)>0)
|
||||
{$webphone_layout = $webphone_layout_override;}
|
||||
- $login_context = $ext_context;
|
||||
- if (strlen($meetme_enter_login_filename) > 0)
|
||||
- {$login_context = 'meetme-enter-login';}
|
||||
|
||||
if ( ($phone_login == 'nophone') or ($on_hook_agent == 'Y') )
|
||||
{
|
||||
@@ -3674,14 +3680,15 @@
|
||||
$local_gmt = ($local_gmt + $isdst);
|
||||
}
|
||||
|
||||
@@ -43,7 +53,20 @@
|
||||
if ( ($use_external_server_ip=='Y') and (strlen($external_web_socket_url) > 5) )
|
||||
{$web_socket_url = $external_web_socket_url;}
|
||||
$major_version = explode('.',$asterisk_version);
|
||||
@@ -3804,8 +3814,12 @@
|
||||
@@ -3693,6 +3700,12 @@
|
||||
$volumecontrol_active=0;
|
||||
}
|
||||
}
|
||||
+ $login_context = $ext_context;
|
||||
+ if (strlen($meetme_enter_login_filename) > 0)
|
||||
+ {
|
||||
+ $login_context = 'meetme-enter-login';
|
||||
+ if ( $conf_engine == "CONFBRIDGE" ) { $login_context = 'confbridge-enter-login'; }
|
||||
+ }
|
||||
|
||||
if ($protocol == 'EXTERNAL')
|
||||
{
|
||||
@@ -3804,8 +3817,12 @@
|
||||
|
||||
if ( ( ($campaign_allow_inbound == 'Y') and ($dial_method != 'MANUAL') ) || ($campaign_leads_to_call > 0) || (preg_match('/Y/',$no_hopper_leads_logins)) )
|
||||
{
|
||||
@@ -57,7 +80,7 @@
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01032',$VD_login,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
@@ -3818,30 +3832,30 @@
|
||||
@@ -3818,30 +3835,30 @@
|
||||
$i++;
|
||||
}
|
||||
if ($prev_login_ct > 0)
|
||||
@@ -94,15 +117,25 @@
|
||||
}
|
||||
|
||||
### mark leads that were not dispositioned during previous calls as ERI
|
||||
@@ -3984,8 +3998,10 @@
|
||||
@@ -3984,8 +4001,10 @@
|
||||
if ($on_hook_agent == 'Y')
|
||||
{$TEMP_SIP_user_DiaL = 'Local/8300@default';}
|
||||
### insert a NEW record to the vicidial_manager table to be processed
|
||||
- $agent_login_data="||$NOW_TIME|NEW|N|$server_ip||Originate|$SIqueryCID|Channel: $SIP_user_DiaL|Context: $login_context|Exten: $session_id|Priority: 1|Callerid: \"$SIqueryCID\" <$campaign_cid>|||||";
|
||||
- $agent_login_stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$SIqueryCID','Channel: $TEMP_SIP_user_DiaL','Context: $login_context','Exten: $session_id','Priority: 1','Callerid: \"$SIqueryCID\" <$campaign_cid>','','','','','');";
|
||||
+ $session_prepend = '';
|
||||
+ if ( $conf_engine == 'CONFBRIDGE' ) { $session_prepend = 2; }
|
||||
$agent_login_data="||$NOW_TIME|NEW|N|$server_ip||Originate|$SIqueryCID|Channel: $SIP_user_DiaL|Context: $login_context|Exten: $session_id|Priority: 1|Callerid: \"$SIqueryCID\" <$campaign_cid>|||||";
|
||||
- $agent_login_stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$SIqueryCID','Channel: $TEMP_SIP_user_DiaL','Context: $login_context','Exten: $session_id','Priority: 1','Callerid: \"$SIqueryCID\" <$campaign_cid>','','','','','');";
|
||||
+ $agent_login_data="||$NOW_TIME|NEW|N|$server_ip||Originate|$SIqueryCID|Channel: $SIP_user_DiaL|Context: $login_context|Exten: $session_prepend$session_id|Priority: 1|Callerid: \"$SIqueryCID\" <$campaign_cid>|||||";
|
||||
+ $agent_login_stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$SIqueryCID','Channel: $TEMP_SIP_user_DiaL','Context: $login_context','Exten: $session_prepend$session_id','Priority: 1','Callerid: \"$SIqueryCID\" <$campaign_cid>','','','','','');";
|
||||
if ( ($is_webphone != 'Y') and ($is_webphone != 'Y_API_LAUNCH') )
|
||||
{
|
||||
if ($DB) {echo "$agent_login_stmt\n";}
|
||||
@@ -23087,7 +23106,7 @@
|
||||
<br /><br /><br />
|
||||
<?php echo _QXZ("Manager Username"); ?>: <input type="text" size="20" name="MgrApr_user" id="MgrApr_user" maxlength="20" class="cust_form" value="" />
|
||||
<br />
|
||||
- <?php echo _QXZ("Manager Password"); ?>: <input type="password" size="20" name="MgrApr_pass" id="MgrApr_pass" maxlength="20" class="cust_form" value="" />
|
||||
+ <?php echo _QXZ("Manager Password"); ?>: <input type="password" size="20" name="MgrApr_pass" id="MgrApr_pass" maxlength="100" class="cust_form" value="" />
|
||||
<br /><br />
|
||||
|
||||
<font size="3" face="Arial, Helvetica, sans-serif" style="BACKGROUND-COLOR: #FFFFCC"><b><a href="#" onclick="PauseCodeSelect_MgrApr();return false;"><?php echo _QXZ("Submit"); ?></a></font>
|
||||
|
||||
Reference in New Issue
Block a user