Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error code -1 #10

Closed
pilovis opened this issue Jun 11, 2014 · 4 comments
Closed

Error code -1 #10

pilovis opened this issue Jun 11, 2014 · 4 comments

Comments

@pilovis
Copy link

pilovis commented Jun 11, 2014

Before the script worked well, now every time I get "Error -1"
I use Ubuntu server 10.04 and Asterisk 1.6.2.4.
Could it depend on some Ubuntu update?
No useful indication on full debug output from the asterisk console.

-- Executing [1235@from-internal:1] Answer("SIP/270-00000007", "") in new stack
-- Executing [1235@from-internal:2] AGI("SIP/270-00000007", "googletts.agi,"Say something in English, when done press the pound key.",en") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/googletts.agi
-- Playing '/tmp/ggl_0mapTb' (escape_digits=) (sample_offset 0)
-- <SIP/270-00000007>AGI Script googletts.agi completed, returning 0
-- Executing [1235@from-internal:3] AGI("SIP/270-00000007", "speech-recog.agi,en-US") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/speech-recog.agi
-- <SIP/270-00000007> Playing 'beep.alaw'
-- <SIP/270-00000007>AGI Script speech-recog.agi completed, returning 0
-- Executing [1235@from-internal:4] Verbose("SIP/270-00000007", "1,Script returned: -1 , -1") in new stack
Script returned: -1 , -1
-- Executing [1235@from-internal:5] GotoIf("SIP/270-00000007", "0?playback:retry") in new stack
-- Goto (from-internal,1235,9)
-- Executing [1235@from-internal:9] AGI("SIP/270-00000007", "googletts.agi,"Can you please repeat more clearly?",en") in new stack

@zaf
Copy link
Owner

zaf commented Jun 11, 2014

Update to the latest version and get an API key from Google. Also make sure to read the README file and update your dialplan code accordingly.
Details about the API changes here:
#9

@zaf zaf closed this as completed Jun 11, 2014
@pilovis
Copy link
Author

pilovis commented Jun 11, 2014

I created the API key and added to speech-recorg.agi (latest version) but it does not work.
After saying "Say something in English, when done press the pound key." the scripts immediately returns "null" value without waiting for any vocal input .

-- Executing [1235@from-internal:1] Answer("SIP/270-00000001", "") in new stack
-- Executing [1235@from-internal:2] AGI("SIP/270-00000001", "googletts.agi,"Say something in English, when done press the pound key.",en") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/googletts.agi
-- Playing '/tmp/6be952445fa092f54aa606501ac6c1b9' (escape_digits=) (sample_offset 0)
-- <SIP/270-00000001>AGI Script googletts.agi completed, returning 0
-- Executing [1235@from-internal:3] AGI("SIP/270-00000001", "speech-recog.agi,en-US") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/speech-recog.agi
-- <SIP/270-00000001>AGI Script speech-recog.agi completed, returning 0
-- Executing [1235@from-internal:4] Verbose("SIP/270-00000001", "1,Script returned: , ") in new stack
Script returned: ,
-- Executing [1235@from-internal:5] GotoIf("SIP/270-00000001", "0?playback:retry") in new stack
-- Goto (from-internal,1235,9)
-- Executing [1235@from-internal:9] AGI("SIP/270-00000001", "googletts.agi,"Can you please repeat more clearly?",en") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/googletts.agi

@zaf
Copy link
Owner

zaf commented Jun 11, 2014

The link above contains detailed info about enabling debug on the AGI script and capturing it in asterisk console or log files. Follow them in order to debug the problems you have with your asterisk deployment. This is not a bug in the script.

@pilovis
Copy link
Author

pilovis commented Jun 11, 2014

I found the problem :)

missing libjson-perl

Info for Ubuntu 10.04 server:

sudo apt-get install libjson-perl
sudo apt-get install libio-socket-ssl-perl
sudo apt-get install libjson-xs-perl
sudo apt-get install perl
sudo apt-get install flac
sudo apt-get install libwww-perl

Thanks a lot for your excellent job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants