if ($_REQUEST['data'] == '1') { $_SESSION['next_goto'] = 'Record_Status'; $r->addPlayText('Please record your message after beep '); //give unique file name for each recording $r->addRecord('filename2', 'wav', '120'); } else { if ($_REQUEST['data'] == '2') { $_SESSION['next_goto'] = 'DialMenu'; } else { if ($_REQUEST['data'] == '3') { $r->addPlayText('your conference number is 1 2 3 4 '); $r->addConference(1234); $_SESSION['next_goto'] = 'Dial1_Status'; } else { if ($_REQUEST['data'] == '4') { $r->addGoto('http://127.0.0.1/kookoophp/demo_gotopage.php'); //update the url to redirect from demo.php to demo_gotopage.php //url should be full url : 'http://host../nextapp.app' it will jump to next url $_SESSION['next_goto'] = 'Menu1'; } else { $r->addPlayText('Thats an invalid input'); } } } } } } else { if ($_SESSION['next_goto'] == 'DialMenu') { $collectInput = new CollectDtmf(); $collectInput->addPlayText('please enter the number that you want to dial followed by hash, if it is s t d number, enter 0 as pre fix ', 3); //$collectInput->addPlayText('press 1 for record, press 2 dial press 3 for cc transer',4);