I need uninterrupted background music to be playing while I receive DTMF characters from calling party. I am using phpagi and the closest way I found to do this is as such:
$agi->set_music();
$count = 0;
$dtmf = "";
while (true) {
$result = $AGI->wait_for_digit(4000);
if ($result['result'] > 0){
$dtmf = $dtmf . chr($result['result']);
}
else{
break;
}
}
The problem with this is that as the DTMF characters are being dialed (by an android application), there is a silent intermittent break in the music until all the DTMF characters are dialed and then the music is consistent again (i.e. music, 0.5sec stop, music, 0.5sec stop… etc.)
Things I’ve tried:
Will play music but will stop completely when the first DTMF is received
Will play music but the command blocks until its done (and thus doesn’t receive the DTMF)