[asterisk-users] SHELL function strangeness

Julien Claassen julien at c-lab.de
Thu Sep 11 03:09:19 CDT 2008


Greetings!
   I have got a "systematic" problem with the SHELL function. Consider this 
dialplan snippet:
*** CUT ***
exten => NUM,1,Set(myreturn=${SHELL(ast_picker sound_file)})
exten => NUM,2,Answer()
exten => NUM,3,GotoIf($[${myreturn} = 0]?4:6)
[...]
*** CUT ***
   ast_picker does simultaneously play a sound_file and wait for input from a 
socket. If input comes or timeout expires, it sends a kill -15 signal to the 
player.
   If I start ast_picker from the linux shell prompt the player stops 
immediately if one of the conditions arrive. If I start it from the dialplan, 
like seen above, the player continues to the end of the file.
   Why does this happen? Is there anything to guard myself against it?
   If it would be helpful, I'd gladly upload the code for ast_picker, it's 
still very small.
   Please help me try figuring out what's wrong here or which extra condition I 
missed in dialplan application execution.
   Kindest regards
         Julien

--------
Music was my first love and it will be my last (John Miles)

======== FIND MY WEB-PROJECT AT: ========
http://ltsb.sourceforge.net
the Linux TextBased Studio guide
======= AND MY PERSONAL PAGES AT: =======
http://www.juliencoder.de



More information about the asterisk-users mailing list