So I've implemented fastagi however I'm having an issue with the get_data function to play an audio file, receive DTMF from the end user and have that returned. The issue I'm having is that everything seems to kick-off ok, but the audio file is not playing (This same file works with agi and fastagi is able to access it) and the function returns 1 instantly. Please see below the log extracts, I'm running Ubuntu 16.04 and asterisk 13.1.0:
Log:
<SIP/208_fleek-00000008>AGI Rx << VERBOSE "IVRs found = 1" 1
agi://192.168.20.144/agi-bin/ivr.php,fleek,5,1,,23: IVRs found = 1
<SIP/208_fleek-00000008>AGI Tx >> 200 result=1
<SIP/208_fleek-00000008>AGI Rx << GET DATA /usr/share/asterisk/sounds/fleek_ivr 2000 10
-- <SIP/208_fleek-00000008> Playing '/usr/share/asterisk/sounds/fleek_ivr.slin' (language 'en')
<SIP/208_fleek-00000008>AGI Rx << VERBOSE "Selection detected: 1" 1
agi://192.168.20.144/agi-bin/ivr.php,fleek,5,1,,23: Selection detected: 1
<SIP/208_fleek-00000008>AGI Tx >> 200 result=1
php code:
$name = '/usr/share/asterisk/sounds/fleek_ivr';
$timeout = $row2['timeout'];
$ntimeout = 2000;
$expect = '10';
$ivr = $fastagi->get_data($name,$ntimeout,$expect);
$fastagi->verbose("Selection detected: ".$ivr['result']);
$dtmf = $ivr['result'];
Dialplan Code:
[function_ivr]
exten => _X.,1,Answer()
same => n,Noop('type is ${dtype}..... type id is ${dtype_id} BLABLABLABLA)
same => n,AGI(ivr.php)
same => n,AGI(agi://X.X.X.X/agi-bin/ivr.php,fleek,5,1,,23
same => n,Hangup
Asterisk requires an ANSWER first in order to get this to work