1. for($i=0; $i<2; $i++){
2. $agi->stream_file('hello'); //no hello in 1st loop
3. $res_dtmf = $agi->get_data('please-enter-first-three-letters', 5000, 1); //no prompt in 1st loop and -1 was returned
4. $userSelection = $res_dtmf['result'];
5. $A2B -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, "REG1: USER SELECTED[$userSelection]");
6. }
i tried this and surprisingly, in the first loop the ivr didn’t execute line (1) and line (2). $userSelection carried value = -1 which i dont know from where it comes. In the second loop, it executed the code line by line perfectly. It’s weird.