[asterisk-dev] System/SHELL in redirecting macro hangs asterisk
Tzafrir Cohen
tzafrir.cohen at xorcom.com
Sun Sep 23 06:05:54 CDT 2012
On Mon, Sep 17, 2012 at 03:31:19PM +0200, J.A. Bezemer wrote:
>
> Hi all,
>
> Asterisk 1.8.8.0 on Debian 6.0.5, stock Debian-backports kernel
> 2.6.39-bpo.2-486.
>
> Three SIP phones: 123, 456 and 789. All have sendrpid=pai.
>
> Phone 456 is set to unconditionally forward all calls to 789; it
> correctly says 302 "Moved Temporarily".
>
> Minimal dialplan:
>
> [fromsip]
> exten => 456,1,NoOp(This is ${CONTEXT}:${EXTEN})
> exten => 456,n,Set(__REDIRECTING_CALLER_SEND_MACRO=redirtest1)
> exten => 456,n,Set(__REDIRECTING_CALLEE_SEND_MACRO=redirtest1)
> exten => 456,n,Dial(SIP/456)
> exten => 789,1,NoOp(This is ${CONTEXT}:${EXTEN})
> exten => 789,n,Dial(SIP/789)
>
> [macro-redirtest1]
> exten => s,1,NoOp(This is ${CONTEXT}:${EXTEN})
> ;exten => s,n,System(/bin/true) ; HANGS asterisk
> ;exten => s,n,Set(DUMMY=${SHELL(echo abc)}) ; HANGS asterisk
What do you see in strace? What is asterisk hung on?
What if you use 'touch /tmp/test' instead? Does asterisk hang before, at or
after the shell command?
>
>
> Phone 123 dials 456. Phone 456 forwards the call to 789.
>
> Once I use System or SHELL in the redirecting macro, asterisk will
> hang on it. Actually, console will still work, but no SIP traffic is
> processed at all and that's all I can test with.
>
> Am I doing something wrong? Is this forbidden? Can anyone reproduce?
Err... writing about this to asterisk-dev instead of a bug report or
asterisk-users, I guess.
>
> (Above minimal dialplan was distilled from something rather more
> elaborate, using Answer'ed channels, thkTHK Dial flags, and one or
> more Local channels in-between; in that scenario, SHELL would
> actually properly execute a shell script _unless_ wget was used
> inside it. Am I going crazy?)
--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir
More information about the asterisk-dev
mailing list