<HTML>
<HEAD>
<TITLE>Asterisk not working with Festival</TITLE>
</HEAD>
<BODY>
<FONT SIZE="4"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Hello,<BR>
<BR>
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:<BR>
<BR>
[connect-to-me]<BR>
exten => s,1,Answer<BR>
Exten => s,n,SayDigits(‘1’)<BR>
exten => s,n,Festival(hello john)<BR>
exten => s,n,Hangup<BR>
<BR>
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:<BR>
<BR>
festival.conf:<BR>
<BR>
; Festival Configuration<BR>
[general]<BR>
host=localhost<BR>
port=1314<BR>
usecache=yes<BR>
cachedir=/var/lib/asterisk/festivalcache/<BR>
festivalcommand=(tts_textasterisk "%s" 'file)(quit)\n<BR>
<BR>
And, festival.scm :<BR>
<BR>
(define (tts_textasterisk string mode)<BR>
"(tts_textasterisk STRING MODE)<BR>
Apply tts to STRING. This function is specifically designed for use in<BR>
server mode so a single function call may synthesize the string. This<BR>
function name may be added to the server safe functions."<BR>
(let ((wholeutt (utt.synth (eval (list 'Utterance 'Text string)))))<BR>
(utt.wave.resample wholeutt 8000)<BR>
(utt.wave.rescale wholeutt 5)<BR>
(utt.send.wave.client wholeutt)))<BR>
<BR>
I have placed the above text before the last line which is (provide 'festival). <BR>
<BR>
Below is the debug log shown on asterisk console :<BR>
<BR>
[Aug 4 17:50:11] > Channel SIP/gafachi1a-00000000 was answered.<BR>
[Aug 4 17:50:11] DEBUG[17094]: pbx.c:3692 pbx_extension_helper: Launching 'Answer'<BR>
[Aug 4 17:50:11] -- Executing [s@connect-to-me:1] Answer("SIP/gafachi1a-00000000", "") in new stack<BR>
[Aug 4 17:50:11] DEBUG[17094]: pbx.c:3692 pbx_extension_helper: Launching 'SayDigits'<BR>
[Aug 4 17:50:11] -- Executing [s@connect-to-me:2] SayDigits("SIP/gafachi1a-00000000", "'1'") in new stack<BR>
[Aug 4 17:50:11] DEBUG[17094]: channel.c:3881 set_format: Set channel SIP/gafachi1a-00000000 to write format slin<BR>
[Aug 4 17:50:11] DEBUG[17094]: rtp.c:3878 ast_rtp_write: Ooh, format changed from unknown to ulaw<BR>
[Aug 4 17:50:11] DEBUG[17094]: rtp.c:3904 ast_rtp_write: Created smoother: format: 4 ms: 20 len: 160<BR>
[Aug 4 17:50:11] DEBUG[17094]: channel.c:2488 ast_settimeout: Scheduling timer at (50 requested / 50 actual) timer ticks per second<BR>
[Aug 4 17:50:11] -- <SIP/gafachi1a-00000000> Playing 'digits/1.slin' (language 'en')<BR>
[Aug 4 17:50:12] DEBUG[17094]: channel.c:2488 ast_settimeout: Scheduling timer at (571 requested / 100 actual) timer ticks per second<BR>
[Aug 4 17:50:12] DEBUG[17094]: channel.c:2488 ast_settimeout: Scheduling timer at (0 requested / 0 actual) timer ticks per second<BR>
[Aug 4 17:50:12] DEBUG[17094]: channel.c:2488 ast_settimeout: Scheduling timer at (0 requested / 0 actual) timer ticks per second<BR>
[Aug 4 17:50:12] DEBUG[17094]: channel.c:2488 ast_settimeout: Scheduling timer at (0 requested / 0 actual) timer ticks per second<BR>
[Aug 4 17:50:12] DEBUG[17094]: channel.c:3881 set_format: Set channel SIP/gafachi1a-00000000 to write format ulaw<BR>
[Aug 4 17:50:12] DEBUG[17094]: pbx.c:3692 pbx_extension_helper: Launching 'Festival'<BR>
[Aug 4 17:50:12] -- Executing [s@connect-to-me:3] Festival("SIP/gafachi1a-00000000", "hello john") in new stack<BR>
[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<BR>
[Aug 4 17:50:12] == Found<BR>
[Aug 4 17:50:12] DEBUG[17094]: app_festival.c:376 festival_exec: Text passed to festival server : hello john<BR>
[Aug 4 17:50:12] DEBUG[17094]: app_festival.c:446 festival_exec: Cache file exists, strln=10, strlen=10<BR>
[Aug 4 17:50:12] DEBUG[17094]: app_festival.c:448 festival_exec: Size OK<BR>
[Aug 4 17:50:12] DEBUG[17094]: app_festival.c:467 festival_exec: Reading from cache...<BR>
[Aug 4 17:50:12] DEBUG[17094]: app_festival.c:491 festival_exec: Passing data to channel...<BR>
[Aug 4 17:50:12] DEBUG[17094]: app_festival.c:513 festival_exec: Festival WV command<BR>
[Aug 4 17:50:12] DEBUG[17094]: channel.c:3881 set_format: Set channel SIP/gafachi1a-00000000 to write format slin<BR>
[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<BR>
<BR>
And, festival server console looks like following:<BR>
<BR>
$ ./bin/festival --server<BR>
server Wed Aug 4 17:49:04 2010 : Festival server started on port 1314<BR>
client(1) Wed Aug 4 17:50:12 2010 : accepted from localhost<BR>
client(1) Wed Aug 4 17:50:12 2010 : disconnected<BR>
<BR>
I have to end the call after sometime. Festival works fine if I got into its console and type SayText(“hello john”)<BR>
<BR>
Please let me know how I can fix this.<BR>
<BR>
Thanks,<BR>
Davinder</SPAN></FONT></FONT>
</BODY>
</HTML>