On Thursday 11 September 2008 03:09:19 Julien Claassen
wrote:> 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.
Without seeing the source, it's difficult to say, but it might be as simple
as you running the Asterisk program as a non-privileged user, which has
insufficient permission to listen to certain port numbers.
--
Tilghman