Hallo ich habe den Lösungsansatz für eine generelle Feitagansage:
Die eingehende Route sollte möglichst weit oben bei den eingehenden Routen stehen so gilt die Feiertagansage dahinter (IVR Queue, oder was in der internal custom ael) noch vor den Öfnnungzeiten .
das Script heißt z.B. "route_aktivieren"
Zuerst braucht man die ID der Route die man aktivieren und deaktivieren will-- kommt man am besten über die SQL-DB hin bei mir hat die Route die ID 5
würde ich über Cron das script wie folgt aufrufen wird die Route aktiv:
route_aktivieren --routeid=5 --set=on
die Feiertagansage wir so nach Datum abgespielt
setze ich
route_aktivieren --routeid=5 --set=off
ist die Route deaktiviert und wird im eingehenden Routing übergangen--hier greifen die nachfolgenden Routen Öffnungszeiten ...spezielle Routings usw.
wenn eine Queue oder telefon von der Feiertagsschaltung ausgenommen werden müssen einfach 'über'
die Route positionieren --aber das ist denke ich klar:
<?php
/*******************************************************************\
* Extension for Gemeinschaft
*
* $Revision$
*
*
*Marian Kühner
*
* Aufruf:
* route_aktivieren --routeid=<ID> --set=on|off
*
* Funktion:
* Setzt das Feld "acitive" für die Routen-ID auf 1 (aktiviert) oder 0 (deaktiviert).
*
* --set on off
* active 1 0
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
\*******************************************************************/
define( 'GS_VALID', true ); /// this is a parent file
# require_once( dirName(__FILE__) .'/../inc/conf.php' );
require_once( '/opt/gemeinschaft/inc/conf.php' );
include_once( GS_DIR .'lib/getopt.php' );
include_once( GS_DIR .'inc/gs-lib.php' );
include_once( GS_DIR .'inc/gs-fns/gs_queue_add.php' );
/***********************************************************
* the shell parameters
***********************************************************/
$usage = 'Usage: '. baseName(__FILE__) .' --routeid=<extension> --set=on|off';
$opts = @getOptsNoMultiples( '',
array(
'routeid=',
'set='
),
$usage
);
if (! isSet($opts['routeid'])
|| ! isSet($opts['set'])
) {
gs_script_invalid_usage( $usage );
}
# connect to db
#
$db = gs_db_master_connect();
if (! $db)
gs_script_error( 'Could not connect to database.' );
# set values in var.
#
if ( $opts['set'] == 'on' )
{
$paf = 1;
}
else {
if ( $opts['set'] == 'off' )
{
$paf = 0;
}
else {
gs_script_error( 'Invalid set value.' );
}
}
# update database table
#
$ok = $db->execute( 'UPDATE `routes_in` SET `active` = '.
$paf .' WHERE `id` = \''. $db->escape($opts['routeid']) .'\'' );
if (! $ok)
gs_script_error( 'Could not update database.' );
echo "route modified.\n";