1

所以我已经实现了 fastagi,但是我在播放音频文件、从最终用户接收 DTMF 并将其返回时遇到了 get_data 函数的问题。我遇到的问题是一切似乎都正常,但音频文件没有播放(这个文件适用于 agi 并且 fastagi 能够访问它)并且函数立即返回 1。请参阅下面的日志摘录,我正在运行 Ubuntu 16.04 和星号 13.1.0:

日志:

<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代码:

        $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'];

拨号方案代码:

[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
4

1 回答 1

0

Asterisk 首先需要一个 ANSWER 才能让它工作

于 2020-01-23T10:47:03.430 回答