/var/lib/asterisk/agi-bin googletts.agi и speech-recog.agi залил с ресурсов - https://github.com/zaf/asterisk-googletts и https://github.com/zaf/asterisk-speech-recog.
extensions.conf
exten => 8888,1,Answer()
exten => 8888,n,Goto(razgovor,8888,1)
[razgovor]
exten => 8888,1,Answer()
exten => 8888,n,agi(googletts.agi,”Hello world”,en)
exten => 8888,n(record),agi(speech-recog.agi,en)
exten => 8888,n,GotoIf($[$["${status}" = «0»] & $["${confidence}" > «0.8»]]?if1:retry)
exten => 8888,n(if1),GotoIf($[“${utterance}” = “Vasia”]?vasya:retry)
exten => 8888,n(retry),agi(googletts.agi,”Please help”,en-EN)
exten => 8888,n(vasya),Dial(SIP/7010)
exten => 8888,n,Goto(razgovor,8888,1)
[razgovor]
exten => 8888,1,Answer()
exten => 8888,n,agi(googletts.agi,”Hello world”,en)
exten => 8888,n(record),agi(speech-recog.agi,en)
exten => 8888,n,GotoIf($[$["${status}" = «0»] & $["${confidence}" > «0.8»]]?if1:retry)
exten => 8888,n(if1),GotoIf($[“${utterance}” = “Vasia”]?vasya:retry)
exten => 8888,n(retry),agi(googletts.agi,”Please help”,en-EN)
exten => 8888,n(vasya),Dial(SIP/7010)
Сперва решил не заморачиваться с Русским, оставил английский
asterisk-tt*CLI> agi set debug on
-- Executing [8888@outbound:1] Answer("SIP/7777-00000705", "") in new stack
-- Executing [8888@outbound:2] Goto("SIP/7777-00000705", "razgovor,8888,1") in new stack
-- Goto (razgovor,8888,1)
-- Executing [8888@razgovor:1] Answer("SIP/7777-00000705", "") in new stack
-- Executing [8888@razgovor:2] AGI("SIP/7777-00000705", "googletts.agi,”Hello world”,en") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/googletts.agi
AGI Tx >> agi_request: googletts.agi
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_channel: SIP/7777-00000705
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_language: en
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_type: SIP
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_uniqueid: 1366812806.1797
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_version: 11.2.1
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_callerid: mozg
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_calleridname: device
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_callingpres: 0
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_callingani2: 0
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_callington: 0
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_callingtns: 0
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_dnid: 8888
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_rdnis: unknown
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_context: razgovor
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_extension: 8888
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_priority: 2
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_enhanced: 0.0
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_accountcode:
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_threadid: 139733373794048
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_arg_1: ”Hello world”
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_arg_2: en
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >>
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Rx > 200 result=1
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
-- Executing [8888@razgovor:3] AGI("SIP/7777-00000705", "speech-recog.agi,en") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/speech-recog.agi
AGI Tx >> agi_request: speech-recog.agi
AGI Tx >> agi_channel: SIP/7777-00000705
AGI Tx >> agi_language: en
AGI Tx >> agi_type: SIP
AGI Tx >> agi_uniqueid: 1366812806.1797
AGI Tx >> agi_version: 11.2.1
AGI Tx >> agi_callerid: mozg
AGI Tx >> agi_calleridname: device
AGI Tx >> agi_callingpres: 0
AGI Tx >> agi_callingani2: 0
AGI Tx >> agi_callington: 0
AGI Tx >> agi_callingtns: 0
AGI Tx >> agi_dnid: 8888
AGI Tx >> agi_rdnis: unknown
AGI Tx >> agi_context: razgovor
AGI Tx >> agi_extension: 8888
AGI Tx >> agi_priority: 3
AGI Tx >> agi_enhanced: 0.0
AGI Tx >> agi_accountcode:
AGI Tx >> agi_threadid: 139733373794048
AGI Tx >> agi_arg_1: en
AGI Tx >>
AGI Rx > 200 result=1
-- Executing [8888@razgovor:4] GotoIf("SIP/7777-00000705", "0?if1:retry") in new stack
-- Goto (razgovor,8888,6)
-- Executing [8888@razgovor:6] AGI("SIP/7777-00000705", "googletts.agi,”Please help”,en-EN") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/googletts.agi
AGI Tx >> agi_request: googletts.agi
AGI Tx >> agi_channel: SIP/7777-00000705
AGI Tx >> agi_language: en
AGI Tx >> agi_type: SIP
AGI Tx >> agi_uniqueid: 1366812806.1797
AGI Tx >> agi_version: 11.2.1
AGI Tx >> agi_callerid: mozg
AGI Tx >> agi_calleridname: device
AGI Tx >> agi_callingpres: 0
AGI Tx >> agi_callingani2: 0
AGI Tx >> agi_callington: 0
AGI Tx >> agi_callingtns: 0
AGI Tx >> agi_dnid: 8888
AGI Tx >> agi_rdnis: unknown
AGI Tx >> agi_context: razgovor
AGI Tx >> agi_extension: 8888
AGI Tx >> agi_priority: 6
AGI Tx >> agi_enhanced: 0.0
AGI Tx >> agi_accountcode:
AGI Tx >> agi_threadid: 139733373794048
AGI Tx >> agi_arg_1: ”Please help”
AGI Tx >> agi_arg_2: en-EN
AGI Tx >>
AGI Rx > 200 result=1
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
-- Executing [8888@razgovor:7] Dial("SIP/7777-00000705", "SIP/7010") in new stack
== Using SIP RTP CoS mark 5
-- Called SIP/7010
-- SIP/7010-00000706 is ringing
-- Got SIP response 603 "Decline" back from 82.117.234.137:4672
-- SIP/7010-00000706 is busy
-- Executing [8888@outbound:2] Goto("SIP/7777-00000705", "razgovor,8888,1") in new stack
-- Goto (razgovor,8888,1)
-- Executing [8888@razgovor:1] Answer("SIP/7777-00000705", "") in new stack
-- Executing [8888@razgovor:2] AGI("SIP/7777-00000705", "googletts.agi,”Hello world”,en") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/googletts.agi
AGI Tx >> agi_request: googletts.agi
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_channel: SIP/7777-00000705
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_language: en
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_type: SIP
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_uniqueid: 1366812806.1797
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_version: 11.2.1
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_callerid: mozg
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_calleridname: device
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_callingpres: 0
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_callingani2: 0
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_callington: 0
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_callingtns: 0
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_dnid: 8888
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_rdnis: unknown
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_context: razgovor
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_extension: 8888
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_priority: 2
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_enhanced: 0.0
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_accountcode:
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_threadid: 139733373794048
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_arg_1: ”Hello world”
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >> agi_arg_2: en
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >>
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
AGI Rx > 200 result=1
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
-- Executing [8888@razgovor:3] AGI("SIP/7777-00000705", "speech-recog.agi,en") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/speech-recog.agi
AGI Tx >> agi_request: speech-recog.agi
AGI Tx >> agi_channel: SIP/7777-00000705
AGI Tx >> agi_language: en
AGI Tx >> agi_type: SIP
AGI Tx >> agi_uniqueid: 1366812806.1797
AGI Tx >> agi_version: 11.2.1
AGI Tx >> agi_callerid: mozg
AGI Tx >> agi_calleridname: device
AGI Tx >> agi_callingpres: 0
AGI Tx >> agi_callingani2: 0
AGI Tx >> agi_callington: 0
AGI Tx >> agi_callingtns: 0
AGI Tx >> agi_dnid: 8888
AGI Tx >> agi_rdnis: unknown
AGI Tx >> agi_context: razgovor
AGI Tx >> agi_extension: 8888
AGI Tx >> agi_priority: 3
AGI Tx >> agi_enhanced: 0.0
AGI Tx >> agi_accountcode:
AGI Tx >> agi_threadid: 139733373794048
AGI Tx >> agi_arg_1: en
AGI Tx >>
AGI Rx > 200 result=1
-- Executing [8888@razgovor:4] GotoIf("SIP/7777-00000705", "0?if1:retry") in new stack
-- Goto (razgovor,8888,6)
-- Executing [8888@razgovor:6] AGI("SIP/7777-00000705", "googletts.agi,”Please help”,en-EN") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/googletts.agi
AGI Tx >> agi_request: googletts.agi
AGI Tx >> agi_channel: SIP/7777-00000705
AGI Tx >> agi_language: en
AGI Tx >> agi_type: SIP
AGI Tx >> agi_uniqueid: 1366812806.1797
AGI Tx >> agi_version: 11.2.1
AGI Tx >> agi_callerid: mozg
AGI Tx >> agi_calleridname: device
AGI Tx >> agi_callingpres: 0
AGI Tx >> agi_callingani2: 0
AGI Tx >> agi_callington: 0
AGI Tx >> agi_callingtns: 0
AGI Tx >> agi_dnid: 8888
AGI Tx >> agi_rdnis: unknown
AGI Tx >> agi_context: razgovor
AGI Tx >> agi_extension: 8888
AGI Tx >> agi_priority: 6
AGI Tx >> agi_enhanced: 0.0
AGI Tx >> agi_accountcode:
AGI Tx >> agi_threadid: 139733373794048
AGI Tx >> agi_arg_1: ”Please help”
AGI Tx >> agi_arg_2: en-EN
AGI Tx >>
AGI Rx > 200 result=1
[Apr 24 17:13:26] ERROR[27192][C-0000017f]: utils.c:1187 ast_carefulwrite: write() returned error: Broken pipe
-- Executing [8888@razgovor:7] Dial("SIP/7777-00000705", "SIP/7010") in new stack
== Using SIP RTP CoS mark 5
-- Called SIP/7010
-- SIP/7010-00000706 is ringing
-- Got SIP response 603 "Decline" back from 82.117.234.137:4672
-- SIP/7010-00000706 is busy
Нужные пакеты установил: Perl, perl-libwww, IO-Socket-SSL, flac, sox, mpg123 установил. В чём может быть дело? Заранее спасибо
запишите фразы себе локально на винт и не мучайтесь
_________________
«Choose a job you love, and you will never have to work a day in your life» — Confucius