#!/usr/bin/php5
<?php
$Calls = $argv[1];

$CallNum=0;

while($CallNum < $Calls)
{
	$CallNum++;
	$FOut = "Channel: Local/*32251@MerchantsSTT
CallerID: Test-Caller $CallNum <$CallNum>
MaxRetries: 3
WaitTime: 3600
Archive: Yes
Context:MonkeyVM
Extension: s
Priority: 1
";

$handle = fopen("/tmp/callfile.$CallNum","w");
	fwrite($handle,$FOut);
	fclose($handle);
	echo shell_exec("mv /tmp/callfile.$CallNum /var/spool/asterisk/outgoing/");
	sleep(2);	
}


?>
