debug optimiert

git-svn-id: svn://svn.cccv.de/engel-system@183 29ba0400-6e00-0410-a75a-ca02368028f8
This commit is contained in:
cookie 2006-11-29 18:09:48 +00:00
parent 50befcb6cd
commit 861a2c99de
2 changed files with 5 additions and 4 deletions

View File

@ -10,7 +10,8 @@ include ("./inc/funktion_cron.php");
//ausfuerungs Ruetmuss (in s) //ausfuerungs Ruetmuss (in s)
$StartTimeBeforEvent = (60/4)*60; $StartTimeBeforEvent = (60/4)*60;
$AnrufDelay = -5; $AnrufDelay = -5;
$DebugDECT=FALSE; $DebugDECT = FALSE;
//$DebugDECT = TRUE;
//Timeout erhöhen; //Timeout erhöhen;
set_time_limit(50000); set_time_limit(50000);

View File

@ -26,7 +26,7 @@ function TID2Engeltype($TID)
function DialNumberIAX( $DECTnumber, $Time, $RID, $TID) function DialNumberIAX( $DECTnumber, $Time, $RID, $TID)
{ {
global $IAXenable, $IAXcontent, $IAXserver, $AnrufDelay; global $IAXenable, $IAXcontent, $IAXserver, $AnrufDelay, $DebugDECT;
//Parameter verarbeiten //Parameter verarbeiten
$TimeH = substr( $Time, 11, 2); $TimeH = substr( $Time, 11, 2);
@ -48,6 +48,7 @@ function DialNumberIAX( $DECTnumber, $Time, $RID, $TID)
if( $IAXenable) if( $IAXenable)
{ {
if($DebugDECT) echo "IAX create file for dialing Number $DECTnumber\n";
$file = fopen( $CallFile, 'w' ); $file = fopen( $CallFile, 'w' );
if( $file != FALSE) if( $file != FALSE)
{ {
@ -63,13 +64,12 @@ function DialNumberIAX( $DECTnumber, $Time, $RID, $TID)
fputs( $file, "SetVar: Room=". RID2Room( $RID). "\n"); fputs( $file, "SetVar: Room=". RID2Room( $RID). "\n");
fputs( $file, "SetVar: Engeltype=". TID2Engeltype( $TID). "\n"); fputs( $file, "SetVar: Engeltype=". TID2Engeltype( $TID). "\n");
fclose($file); fclose($file);
system( "cat $CallFile");
system( "chmod 777 $CallFile"); system( "chmod 777 $CallFile");
system( "mv $CallFile /var/spool/asterisk/outgoing"); system( "mv $CallFile /var/spool/asterisk/outgoing");
} }
} }
else else
echo "IAX is disable\n"; if($DebugDECT) echo "IAX is disable\n";
} }
function DialNumberModem( $DECTnumber, $Time) function DialNumberModem( $DECTnumber, $Time)