[asterisk-users] Asterisk not working with Festival

Davinder Kumar Meen davinder at impingeonline.com
Wed Aug 4 07:28:54 CDT 2010


Hello,

I am having a Mac 10.6.4 (Snow Leopard). I have compiled and built Asterisk
1.6.2.9 and Festival 2.0.95:beta on my machine.  Asterisk is working fine
with SIP channels without Festival. I have written following context in
extension.conf:

[connect-to-me]
exten => s,1,Answer
Exten => s,n,SayDigits(Œ1¹)
exten => s,n,Festival(hello john)
exten => s,n,Hangup

I use call files to make calls to my mobile and once call is answered then
asterisk attaches it to ³connect-to-me² context. But after that, I can hear
only a voice saying ³one² but nothing after that. Please find below details
on configuration files:

festival.conf:

; Festival Configuration
[general]
host=localhost
port=1314
usecache=yes
cachedir=/var/lib/asterisk/festivalcache/
festivalcommand=(tts_textasterisk "%s" 'file)(quit)\n
 
And, festival.scm :

(define (tts_textasterisk string mode)
"(tts_textasterisk STRING MODE)
Apply tts to STRING. This function is specifically designed for use in
server mode so a single function call may synthesize the string. This
function name may be added to the server safe functions."
(let ((wholeutt (utt.synth (eval (list 'Utterance 'Text string)))))
(utt.wave.resample wholeutt 8000)
(utt.wave.rescale wholeutt 5)
(utt.send.wave.client wholeutt)))

I have placed the above text before the last line which is (provide
'festival). 

Below is the debug log shown on asterisk console :

[Aug  4 17:50:11]        > Channel SIP/gafachi1a-00000000 was answered.
[Aug  4 17:50:11] DEBUG[17094]: pbx.c:3692 pbx_extension_helper: Launching
'Answer'
[Aug  4 17:50:11]     -- Executing [s at connect-to-me:1]
Answer("SIP/gafachi1a-00000000", "") in new stack
[Aug  4 17:50:11] DEBUG[17094]: pbx.c:3692 pbx_extension_helper: Launching
'SayDigits'
[Aug  4 17:50:11]     -- Executing [s at connect-to-me:2]
SayDigits("SIP/gafachi1a-00000000", "'1'") in new stack
[Aug  4 17:50:11] DEBUG[17094]: channel.c:3881 set_format: Set channel
SIP/gafachi1a-00000000 to write format slin
[Aug  4 17:50:11] DEBUG[17094]: rtp.c:3878 ast_rtp_write: Ooh, format
changed from unknown to ulaw
[Aug  4 17:50:11] DEBUG[17094]: rtp.c:3904 ast_rtp_write: Created smoother:
format: 4 ms: 20 len: 160
[Aug  4 17:50:11] DEBUG[17094]: channel.c:2488 ast_settimeout: Scheduling
timer at (50 requested / 50 actual) timer ticks per second
[Aug  4 17:50:11]     -- <SIP/gafachi1a-00000000> Playing 'digits/1.slin'
(language 'en')
[Aug  4 17:50:12] DEBUG[17094]: channel.c:2488 ast_settimeout: Scheduling
timer at (571 requested / 100 actual) timer ticks per second
[Aug  4 17:50:12] DEBUG[17094]: channel.c:2488 ast_settimeout: Scheduling
timer at (0 requested / 0 actual) timer ticks per second
[Aug  4 17:50:12] DEBUG[17094]: channel.c:2488 ast_settimeout: Scheduling
timer at (0 requested / 0 actual) timer ticks per second
[Aug  4 17:50:12] DEBUG[17094]: channel.c:2488 ast_settimeout: Scheduling
timer at (0 requested / 0 actual) timer ticks per second
[Aug  4 17:50:12] DEBUG[17094]: channel.c:3881 set_format: Set channel
SIP/gafachi1a-00000000 to write format ulaw
[Aug  4 17:50:12] DEBUG[17094]: pbx.c:3692 pbx_extension_helper: Launching
'Festival'
[Aug  4 17:50:12]     -- Executing [s at connect-to-me:3]
Festival("SIP/gafachi1a-00000000", "hello john") in new stack
[Aug  4 17:50:12]   == Parsing '/usr/local/etc/asterisk/festival.conf': [Aug
4 17:50:12] DEBUG[17094]: config.c:1330 config_text_file_load: Parsing
/usr/local/etc/asterisk/festival.conf
[Aug  4 17:50:12]   == Found
[Aug  4 17:50:12] DEBUG[17094]: app_festival.c:376 festival_exec: Text
passed to festival server : hello john
[Aug  4 17:50:12] DEBUG[17094]: app_festival.c:446 festival_exec: Cache file
exists, strln=10, strlen=10
[Aug  4 17:50:12] DEBUG[17094]: app_festival.c:448 festival_exec: Size OK
[Aug  4 17:50:12] DEBUG[17094]: app_festival.c:467 festival_exec: Reading
from cache...
[Aug  4 17:50:12] DEBUG[17094]: app_festival.c:491 festival_exec: Passing
data to channel...
[Aug  4 17:50:12] DEBUG[17094]: app_festival.c:513 festival_exec: Festival
WV command
[Aug  4 17:50:12] DEBUG[17094]: channel.c:3881 set_format: Set channel
SIP/gafachi1a-00000000 to write format slin
[Aug  4 17:50:34] DEBUG[17094]: chan_sip.c:3562 __sip_xmit: Trying to put
'SIP/2.0 200' onto UDP socket destined for 67.216.35.162:5060

And, festival server console looks like following:

$ ./bin/festival --server
server    Wed Aug  4 17:49:04 2010 : Festival server started on port 1314
client(1) Wed Aug  4 17:50:12 2010 : accepted from localhost
client(1) Wed Aug  4 17:50:12 2010 : disconnected

I have to end the call after sometime. Festival works fine if I got into its
console and type SayText(³hello john²)

Please let me know how I can fix this.

Thanks,
Davinder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100804/0484e940/attachment.htm 


More information about the asterisk-users mailing list