Skip to content

Instantly share code, notes, and snippets.

@dice
Created July 29, 2012 12:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dice/3198293 to your computer and use it in GitHub Desktop.
Save dice/3198293 to your computer and use it in GitHub Desktop.
PHP code snippet for FullCourt Call Tracking Sample Code
function save_call() { //https://www.fullcourt.co/ja/docs/PhoneXML/request
$CallTo = $_REQUEST['To'];
$CallFrom=$_REQUEST['From'];
$DialCallDuration=$_REQUEST['variable_billsec'];
$Direction=$_REQUEST['Direction'];
$CallerName=$_REQUEST['CallerName'];
$CallSid = $_REQUEST['CallUUID'];
$CallStatus=$_REQUEST['CallStatus'];
$DialCallSid='';
$stmt = $this->db->prepare('INSERT INTO calls (DateCreated,CallSid,CallFrom,CallTo,CallStatus,Direction,CallerName,DialCallDuration,DialCallSid) VALUES (DATETIME('now','localtime'),?,?,?,?,?,?,?,?)');
$vars=array($CallSid,$CallFrom,$CallTo,$CallStatus,$Direction,$CallerName,$DialCallDuration,$DialCallSid);
$stmt->execute($vars);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment