System() command freeze my Asterisk

Hi all,

I’m running an Asterisk box version 1.6.1.2 on a CentOS 5.3 machine.

When I try to place a call trough .call file I got something strange.
My callback is something similar:

[size=75]
[callback]
exten => s,1,System(echo -E “Channel:SIP/${numberToCall}@${trunkToUse}” > /tmp/callback-${CALLERID(num)}-${UNIQUEID}.call)
exten => s,n,System(echo -E “Context: disa” >>/tmpcallback-${CALLERID(num)}-${UNIQUEID}.call)
exten => s,n,System(echo -E “Extension: s” >> /tmp/callback-${CALLERID(num)}-${UNIQUEID}.call)
exten => s,n,System(echo -E “Priority: 1” >> /tmp/callback-${CALLERID(num)}-${UNIQUEID}.call)
exten => s,n,System(echo -E “Archive: yes” >> /tmp/callback-${CALLERID(num)}-${UNIQUEID}.call)
exten => s,n,System(mv /tmp/callback-${CALLERID(num)}-${UNIQUEID}.call /var/spool/asterisk/outgoing)
[/size]

Ok, now this code works fine but sometime one of the System(echo) command don’t work.
The execution of the command is freezed and this left an open channel on my asterisk.
from console:

[size=75]core show channels
Channel Location State Application(Data)
SIP/ip-address-580 s@callback:1 Ring System(echo -E "Channel:SIP …
1 active channels
1 active calls
42 calls processed
[/size]

Now the crap part of the problem…

If i place or receive other call the execution of them also get stuck:

[size=75]core show channels
Channel Location State Application(Data)
IP/ip-address-00d inbound-DID-number@inbound: Ring MYSQL(Connect db_conn
SIP/ip-address-00 inbound-DID-number@inbound: Ring MYSQL(Connect db_conn
SIP/ip-address-00 inbound-DID-number@inbound: Ring MYSQL(Connect db_conn
SIP/ip-address-00c inbound-DID-number@inbound: Ring MYSQL(Connect db_conn
SIP/ip-address-00c inbound-DID-number@inbound: Ring MYSQL(Connect db_conn
SIP/ip-address-00cd inbound-DID-number@inbound: Ring MYSQL(Connect db_conn
SIP/siptraffic-00c91 s@disa:1 Up MYSQL(Connect db_conn
8 active channels
8 active calls
[/size]

In this case this also block the connection to the MYSQL server and I can’t connect to it anymore !!

Please help me.

Best Regards,

Marco