Closed acheraime closed 12 years ago
Make sure that the user that owns the asterisk process has the right to execute the script.
Sure the user has right to execute the script.
On Sun, Feb 5, 2012 at 12:29 PM, Lefteris Zafiris < reply@reply.github.com
wrote:
Make sure that the user that owns the asterisk process has the right to execute the script.
Reply to this email directly or view it on GitHub: https://github.com/zaf/asterisk-googletts/issues/2#issuecomment-3819106
**
I cannot reproduce the bug neither on centos or debian machines starting asterisk via safe_asterisk or distributors own init scripts. Can you please provide some more info, asterisk console output or even enabling debbuging messages in the agi script (by setting $debug = 1; )
I'm having the same issue. When I run asterisk in foreground I have this output:
-- Launched AGI Script /var/lib/asterisk/agi-bin/googletts.agi
-- /var/lib/asterisk/agi-bin/googletts.agi: Found sox version 14 in: /usr/bin/sox, mpg123 in: /usr/local/bin/mpg123
-- /var/lib/asterisk/agi-bin/googletts.agi: Command returned: 200 result=6
-- /var/lib/asterisk/agi-bin/googletts.agi: Command returned: 200 result=1 ((ulaw))
-- /var/lib/asterisk/agi-bin/googletts.agi: Text passed for synthesis: Google text to speech for Asterisk.
-- /var/lib/asterisk/agi-bin/googletts.agi: Language: en, Interrupt keys: , Sample rate: 8000
-- /var/lib/asterisk/agi-bin/googletts.agi: Speed: 1, Caching: 1, Cache dir: /tmp
-- /var/lib/asterisk/agi-bin/googletts.agi: File already in cache.
-- Playing '/tmp/66543be195cb5de8722a9fa1be8b3cfa' (escape_digits=) (sample_offset 0)
-- /var/lib/asterisk/agi-bin/googletts.agi: Command returned: 200 result=0 endpos=21600
-- <SIP/didlogic-00000000>AGI Script /var/lib/asterisk/agi-bin/googletts.agi completed, returning 0
When I run asterisk as a service, I have this:
-- Launched AGI Script /var/lib/asterisk/agi-bin/googletts.agi
-- <SIP/didlogic-00000000>AGI Script /var/lib/asterisk/agi-bin/googletts.agi completed, returning 0
As noted previously check file/dir permissions and ownership, starting asterisk via command line (asterisk -c) forces it to run under user root, while when using an init script it is probably running under a different user (usually user asterisk)
I checked that several times, and as a service asterisk also run as root user (in my configuration).
Get the debug output of the script, either via the tty that asterisk was started (usually tty9) or via the logger and check whats going on. Also check for stuff like SELinux etc etc
Finally I reinstall mpg123 (using yum, the first time I download the package and use rpm) and now It works.
I'm not sure why It works now and not previously, and why always works when asterisk was running in foreground. Maybe is more a bug in asterisk than in this script.
Anyway thanks @zaf
I suppose binaries were installed in different places? $PATH differs? either-way good to know its now working.
I have the same problem.
@zaf
@izee Maybe you can try and reinstall mpg123. As I said, I reinstalled it using a yum repo (not rpm package as the first time), and tts works.
@sebastian-rivas Thank you,I got the solution: #9
Hi, When asterisk is in normal run mode, tts does not render any sound. However when start in foreground with verbosity, the TTS works normally. I try with centOS 5.7 and CentOS 6.2 with different version of mpg123.