This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
if($_REQUEST['event']=='NewCall') | |
{ | |
echo '<response>'; | |
$caller=get_user($_REQUEST['cid']); | |
if($caller != "") | |
echo '<playtext>Welcome '.$caller.'</playtext>'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
require_once("response.php");//response.php is the kookoo xml preparation class file | |
$r = new Response(); | |
$r->setFiller("yes"); | |
$recore_wav="update"; | |
if(isset ($_REQUEST['event']) && $_REQUEST['event']== "NewCall" ) | |
{ | |
$_SESSION['caller_number']=$_REQUEST['cid']; | |
$_SESSION['kookoo_number']=$_REQUEST['called_number']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Visual Force Page | |
<apex:page controller="ContactController" showheader="false" action="{!pageDetail}"> | |
<apex:detail subject="{!contactId}" relatedList="false"/> | |
</apex:page> | |
//Apex Controller | |
public class ContactController { | |
public string contactId { get; set; } | |
public ContactController() { | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*The controller sends the XML response*/ | |
public class CallManagementController { | |
/*state is required to know the call flow state*/ | |
public string state { get; set; } | |
public string response { get; set; } | |
public CallManagementController() { | |
state='start'; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:page controller="CallManagementController" showheader="false" | |
contentType="text/xml" action="{!kookooResponse}" | |
>{! '<?xml version=\"1.0\" encoding=\"UTF-8\"?>' } | |
{!response} | |
</apex:page> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once('response.php');// this is kookoo library. You can download it from KooKoo website. | |
$r= new Response(); | |
//you will get the key after registering at mixpanel. | |
$metrics = new MetricsTracker("your_mixpanel_api_key"); | |
if($_REQUEST['event'] == 'NewCall') | |
{ | |
//get the phone number of the person who called |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once('response.php');// this is kookoo library. You can download it from KooKoo website. | |
$r= new Response(); | |
if($_REQUEST['event'] == 'NewCall') | |
{ | |
//get the phone number of the person who called | |
$caller_id=$_REQUEST['cid']; | |
//get the deals for the categories chosen by the caller.getDealsForCustomer is the function | |
//which gets details from your database. |