Summary:ASTERISK-09072: Festival hangs up a channel instead of doing its job
Reporter:shawn (welles)Labels:
Date Opened:2007-03-22 02:40:24Date Closed:2011-06-07 14:08:01
Versions:Frequency of
Environment:Attachments:( 0) iax.txt
( 1) sip.txt
( 2) sipdebug.txt
Description:i use asterisk manager interface to originate a call. params as following:
chan = sip/888111111@sip-gateway,
exten = 1000,
context= test ,
priority =1,
callerid = 123455,
variable = var1=asterisk|var2=hello|var3=world
the others are null.
test context config as fellowing:
exten => 1000,1,answer
exten => 1000,n,BackGround(demo-congrats)
exten => 1000,n,festival(${var1})
exten => 1000,n,festival(${var2})
exten => 1000,n,festival(${var3})
exten => 1000,n,hangup
when excute the ami command my phone will ring, after answer it, i will hear 'demo-congrats' ,after this it will excute festival(asterisk) ,but i can't hear .then hangup.
i use iax2 channel i can hear all. festival(asterisk) ,festival(hello)...
i am sure my festival works fine.
what 's wrong? thanks in advance.
my asterisk version :1.2.6
Comments:By: Serge Vecher (serge-v) 2007-03-22 08:28:45

Please provide the console log of a problem reproduced as per following:
1) Prepare test environment (reduce the amount of unrelated traffic on the server);
2) Make sure your logger.conf has the following line:
  console => notice,warning,error,debug
3) restart Asterisk with the following command:
  'asterisk -Tvvvvvdddddngc | tee /tmp/verbosedebug.txt'
4) Enable SIP transaction logging with the following CLI commands (1.4/trunk commands in parenthesis):
set debug 4 (core set debug 4)
set verbose 4 (core set verbose 4)
sip debug (sip set debug)
5) Reproduce the problem
6) Trim startup information and attach verbosedebug.txt to the issue.

Also, it would be helpful to see the same output with an IAX call (don't use 'sip set debug' command in that case).

By: shawn (welles) 2007-03-22 21:05:04

serge-v, thank you.
attachments are some output of asterisk console. i replace some private number or ip address with '*' or other numbers. wish help you find this issue. thanks in advance.

By: shawn (welles) 2007-03-22 21:16:30

when i use iax2 .i can hear all voice.but in console i see the following:
   -- Executing Answer("IAX2/1000-168", "") in new stack
   -- Executing Festival("IAX2/1000-168", "asterisk") in new stack
 == Parsing '/etc/asterisk/festival.conf': Found
Mar 23 10:09:23 NOTICE[32097]: chan_iax2.c:3161 iax2_read: I should never be called!
   -- Executing Festival("IAX2/1000-168", "hello") in new stack
 == Parsing '/etc/asterisk/festival.conf': Found
   -- Executing Festival("IAX2/1000-168", "world") in new stack
 == Parsing '/etc/asterisk/festival.conf': Found
Mar 23 10:09:26 NOTICE[32097]: chan_iax2.c:3161 iax2_read: I should never be called!
how occur the notice 'chan_iax2.c:3161 iax2_read: I should never be called!' ?

By: Serge Vecher (serge-v) 2007-03-23 12:04:39

attach the same output but for a working scenario (with IAX2 call).

By: shawn (welles) 2007-03-25 21:26:30

serge-v,please have a check the output of iax2 for the same scenario .thanks

By: Serge Vecher (serge-v) 2007-03-26 09:38:40

ok, thanks.

Does this problem occur if a sip device calls into an extension that launches festival too?

By: shawn (welles) 2007-03-26 20:02:31

serge-v, i use sip phone to have a call which launches festival. i can hear nothing. BTW,the following is my sip.conf :
port = 5060           ; Port to bind to (SIP is 5060)
bindaddr =    ; Address to bind to (all addresses on machine)
context = from-sip-external ; Send unknown SIP callers to this context
callerid = Unknown

extensions.conf :
exten => 1000,1,answer
exten => 1000,n,BackGround(demo-congrats)
exten => 1000,n,festival(welcome)
exten => 1000,n,hangup

i can hear 'demo-congrats' but not welcome ,while using iax2 device i can hear both.

By: shawn (welles) 2007-03-28 07:23:16

it is a bug or i make something wrong?

By: Serge Vecher (serge-v) 2007-03-28 08:10:33

This indeed looks like a bug. From debug you can see that the SIP channel is promptly hung up after Festival gets involved. I'm going to downgrade the severity though, because you could replace Festival with a regular playback. Waiting for developer to pick this up.

[Mar 23 09:11:49] DEBUG[22669]: app_festival.c:491 festival_exec:  Festival WV command
[Mar 23 09:11:49] DEBUG[22669]: channel.c:2414 set_format:  Set channel SIP/sip-gw-00852e10 to write format slin
[Mar 23 09:11:50] DEBUG[22669]: pbx.c:2336 __ast_pbx_run:  Spawn extension (test,1040,3) exited non-zero on 'SIP/sip-gw-00852e10'

By: Serge Vecher (serge-v) 2007-03-29 12:28:45

welles: it is something that is remotely related to this bug, but a recently committed patch will hang up at the point where you see a "I should never be called!" warning. Can you please check out 1.4 from svn (rev > 59341) and test to see that Festival still works with and IAX channel?

By: Serge Vecher (serge-v) 2007-03-29 12:33:34

relating to 8590, even though the problem there seem to be the lack of Answer(), something that is present here, but perhaps the issue needs a second look.

By: shawn (welles) 2007-03-29 21:28:46

using asterisk 1.4.2:sip channel doesn't hangup when executing festival appliction. but i still can't hear voice. all festival applications can be executed. while iax2 channel works fine with festival.
using SVN-branch-1.4-r59363:the same with asterisk 1.4.2 when channel is sip.
console info as followings:
   -- Executing [1000@test:1] Answer("SIP/welles-08305500", "") in new stack
   -- Executing [1000@test:2] BackGround("SIP/welles-08305500", "demo-congrats") in new stack
   -- <SIP/welles-08305500> Playing 'demo-congrats' (language 'en')
   -- Executing [1000@test:3] Festival("SIP/welles-08305500", "how are you") in new stack
 == Parsing '/etc/asterisk/festival.conf': Found
   -- Executing [1000@test:4] Festival("SIP/welles-08305500", "asterisk") in new stack
 == Parsing '/etc/asterisk/festival.conf': Found
   -- Executing [1000@test:5] Festival("SIP/welles-08305500", "thank you") in new stack
 == Parsing '/etc/asterisk/festival.conf': Found
   -- Executing [1000@test:6] Festival("SIP/welles-08305500", "good bye") in new stack
 == Parsing '/etc/asterisk/festival.conf': Found
   -- Executing [1000@test:7] Hangup("SIP/welles-08305500", "") in new stack
 == Spawn extension (test, 1000, 7) exited non-zero on 'SIP/welles-08305500'
when channel is iax2, it becomes much worse. when executing  festival application, channel hangup. console info :
-- Executing [1000@test:1] Answer("IAX2/welles-1", "") in new stack
   -- Executing [1000@test:2] BackGround("IAX2/welles-1", "demo-congrats") in new stack
   -- <IAX2/welles-1> Playing 'demo-congrats' (language 'en')
   -- Executing [1000@test:3] Festival("IAX2/welles-1", "how are you") in new stack
 == Parsing '/etc/asterisk/festival.conf': Found
[Mar 30 10:24:39] NOTICE[30780]: chan_iax2.c:2989 iax2_read: I should never be called! Hanging up.
[Mar 30 10:24:39] WARNING[30780]: app_festival.c:215 send_waveform_to_channel: Null frame == hangup() detected
 == Spawn extension (test, 1000, 3) exited non-zero on 'IAX2/welles-1'
   -- Hungup 'IAX2/welles-1'
thank you.

By: Serge Vecher (serge-v) 2007-03-30 08:45:36

russell, looks like the patch from 8286 has exacerbated the situation here. I didn't reopen the issue, since it seems that the Festival app seems to be the culprit here. In case you have a second to look this over, please do ;)

By: Joshua C. Colp (jcolp) 2007-10-22 12:20:47

I'm suspending this for now since it's a 1.2 issue. If it's applicable to 1.4 feel free to reopen and I will attempt to get Festival going and debug things.