API is reading but it wont recognize voice. Using cloud Speech

I wounder what i am missing, any dependency? The API is defiantly reading. so whats going on here?

Here is the full output of AGI debug. Asterisk 13.17.1, Centos 7.3 – it just says -1. Did a packet capture to see, whether any packet has been send to cloud none.

– Executing [2017@india:3] AGI(“SIP/2018-000051cd”, “speech-recog.agi,en-EN”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/speech-recog.agi
<SIP/2018-000051cd>AGI Tx >> agi_request: speech-recog.agi
<SIP/2018-000051cd>AGI Tx >> agi_channel: SIP/2018-000051cd
<SIP/2018-000051cd>AGI Tx >> agi_language: en
<SIP/2018-000051cd>AGI Tx >> agi_type: SIP
<SIP/2018-000051cd>AGI Tx >> agi_uniqueid: 1527178246.147414
<SIP/2018-000051cd>AGI Tx >> agi_version: 13.17.1
<SIP/2018-000051cd>AGI Tx >> agi_callerid: 2018
<SIP/2018-000051cd>AGI Tx >> agi_calleridname: IT-Paul
<SIP/2018-000051cd>AGI Tx >> agi_callingpres: 0
<SIP/2018-000051cd>AGI Tx >> agi_callingani2: 0
<SIP/2018-000051cd>AGI Tx >> agi_callington: 0
<SIP/2018-000051cd>AGI Tx >> agi_callingtns: 0
<SIP/2018-000051cd>AGI Tx >> agi_dnid: 2017
<SIP/2018-000051cd>AGI Tx >> agi_rdnis: unknown
<SIP/2018-000051cd>AGI Tx >> agi_context: india
<SIP/2018-000051cd>AGI Tx >> agi_extension: 2017
<SIP/2018-000051cd>AGI Tx >> agi_priority: 3
<SIP/2018-000051cd>AGI Tx >> agi_enhanced: 0.0
<SIP/2018-000051cd>AGI Tx >> agi_accountcode: 2018
<SIP/2018-000051cd>AGI Tx >> agi_threadid: 139844844660480
<SIP/2018-000051cd>AGI Tx >> agi_arg_1: en-EN
<SIP/2018-000051cd>AGI Tx >>
<SIP/2018-000051cd>AGI Rx << SET VARIABLE “utterance” “-1”
<SIP/2018-000051cd>AGI Tx >> 200 result=1
<SIP/2018-000051cd>AGI Rx << SET VARIABLE “confidence” “-1”
<SIP/2018-000051cd>AGI Tx >> 200 result=1
– <SIP/2018-000051cd>AGI Script speech-recog.agi completed, returning 0

What API are you using for the voice recogntion ?

Thanks very much, i am using latest speech-recog.agi. I did have the Key created and added to the agi file.

I dont know how that agi works , it is written on perl and I dont perl. If you want to converts audio to text using google use this documentation :


I have use it and it is very accurate and easy to integrate with Asterisk as far as you know how to use Python or PHP or any other programming language supported

Thanks very much, i was able to have the API work with PHP. Would like to check, was there any php agi available which i can use with dial plan.

You have to develope your own agi or serch one on the Internet