From 861a2c99de091d167d556a8d50aeb9bda7623016 Mon Sep 17 00:00:00 2001 From: cookie Date: Wed, 29 Nov 2006 18:09:48 +0000 Subject: [PATCH] debug optimiert git-svn-id: svn://svn.cccv.de/engel-system@183 29ba0400-6e00-0410-a75a-ca02368028f8 --- services/cron_dect.php | 3 ++- www-ssl/inc/funktion_cron.php | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/services/cron_dect.php b/services/cron_dect.php index 73e1f199..f59a00f1 100755 --- a/services/cron_dect.php +++ b/services/cron_dect.php @@ -10,7 +10,8 @@ include ("./inc/funktion_cron.php"); //ausfuerungs Ruetmuss (in s) $StartTimeBeforEvent = (60/4)*60; $AnrufDelay = -5; -$DebugDECT=FALSE; +$DebugDECT = FALSE; +//$DebugDECT = TRUE; //Timeout erhöhen; set_time_limit(50000); diff --git a/www-ssl/inc/funktion_cron.php b/www-ssl/inc/funktion_cron.php index d2afa70b..09b627d2 100755 --- a/www-ssl/inc/funktion_cron.php +++ b/www-ssl/inc/funktion_cron.php @@ -26,7 +26,7 @@ function TID2Engeltype($TID) function DialNumberIAX( $DECTnumber, $Time, $RID, $TID) { - global $IAXenable, $IAXcontent, $IAXserver, $AnrufDelay; + global $IAXenable, $IAXcontent, $IAXserver, $AnrufDelay, $DebugDECT; //Parameter verarbeiten $TimeH = substr( $Time, 11, 2); @@ -48,6 +48,7 @@ function DialNumberIAX( $DECTnumber, $Time, $RID, $TID) if( $IAXenable) { + if($DebugDECT) echo "IAX create file for dialing Number $DECTnumber\n"; $file = fopen( $CallFile, 'w' ); if( $file != FALSE) { @@ -63,13 +64,12 @@ function DialNumberIAX( $DECTnumber, $Time, $RID, $TID) fputs( $file, "SetVar: Room=". RID2Room( $RID). "\n"); fputs( $file, "SetVar: Engeltype=". TID2Engeltype( $TID). "\n"); fclose($file); - system( "cat $CallFile"); system( "chmod 777 $CallFile"); system( "mv $CallFile /var/spool/asterisk/outgoing"); } } else - echo "IAX is disable\n"; + if($DebugDECT) echo "IAX is disable\n"; } function DialNumberModem( $DECTnumber, $Time)