[asterisk-users] System Application with java

Andre Gustavo Lomonaco lomonaco at easybyte.com.br
Fri Dec 22 05:48:27 MST 2006


Hi,

I created a script named example2.sh which goal is read some text from my HP Service Desk using an application in java and send this text to the text2wave application for TTS.

example2.sh

java -Xbatch Example10 | text2wave -f 8000 -o /var/lib/asterisk/sounds/my-sd.wav

When I execute the script in prompt, everything is ok, but when I use the system() command in my
extensions.conf it isn´t work, just a small file my-sd.wav is created.

Here my extensions.conf configuration 

;testing text2wav
exten => 666,1,Answer
exten => 666,2,system(/root/example2.sh >> /root/log.txt )
exten => 666,3,system(echo "${SYSTEMSTATUS}" >> /root/log.txt)
exten => 666,4,wait(10)
exten => 666,5,Playback(my-sd)
exten => 666,6,Hangup

And here the logging by Asterisk..

Connected to Asterisk 1.2.13 currently running on fedora (pid = 1951)
Verbosity is at least 3
    -- Remote UNIX connection
    -- Executing Answer("SIP/lomonaco-0945fd18", "") in new stack
    -- Executing System("SIP/lomonaco-0945fd18", "/root/example2.sh >> /root/log.txt ") in new stack
    -- Executing System("SIP/lomonaco-0945fd18", "echo "SUCCESS" >> /root/log.txt") in new stack
    -- Executing Wait("SIP/lomonaco-0945fd18", "10") in new stac

Any help or tip

Thanks in Advanced

Andre Lomonaco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20061222/b18fe748/attachment.htm


More information about the asterisk-users mailing list