AGI not reading the input


(Dotcom) #1

Hi all,

I’m using an AGI script (using phpagi) to fetch the DTMF input (1 single digit).
Code i’m using:

$agi->exec("Read", "dtmf_tmp,custom/please_enter_your_code,1,,1,7");
$dtmf = $agi->get_variable("dtmf_tmp");
$dtmf = $dtmf['data'];
$agi->verbose("DTMF number entered: $dtmf");

50% of the time it works… but the other 50% I’m not getting the input in the $dtmf variable (remains empty):

Playing ‘custom/please_enter_your_code.slin’
app_read.c: User entered ‘1’
DTMF number entered:

Does anyone has any tips to improve the code above?

Thanks for your help!


(system) closed #2

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.