예제 #1
0
				$tropo[] = array(
					'say' => array(
						'value' => $nextQuestion['say']
					),
					'voice' => $voice
				);
				$nextQuestion = $questions[$nextQuestionIndex + 1];
			}
			askQuestion($nextQuestion);
		}
		else
			complete();
	}
	else
	{
		askQuestion($thisQuestion, TRUE);
	}
}
else
{
	$tropo[] = array(
		'say' => array('value'=>'Sorry, there was an error. Goodbye.'),
		'voice' => $voice
	);
	sendCurrentCall();
}



function getQuestionName($key)
{
예제 #2
0
		$query->bindValue(':date', date('Y-m-d H:i:s'));
		$query->bindValue(':callerID', $_SESSION['callerID']);
		$query->bindValue(':sessionID', session_id());
		$query->execute();
		$_SESSION['callID'] = db()->lastInsertId();

		include('survey.php');

		$tropo[] = array(
			'say' => array(
				'value' => '. . . ' . $firstPrompt,
			),
			'voice' => $voice
		);
		
		askQuestion(array_shift($questions));

		break;
	case 'hangup':
		if(defined('REMOTE_UPLOAD_SERVER') && REMOTE_UPLOAD_SERVER)
			sendCallToServer($_SESSION['callID'], REMOTE_UPLOAD_SERVER);
		ircdebug('Call completed');
		break;
	default: 
		define('SURVEY_MODE', TRUE);
		include('include/question.php');
		break;
}


$json = json_encode(array('tropo'=>$tropo));