[Asterisk-Users] can't run "cat $filename" inside scripts with system()

Robert Michel news at robertmichel.de
Sat Jul 1 12:45:49 MST 2006


Asterisk 1.2.1 built by kk @ nyx on a x86_64 running Linux 
on 2006-01-02 00:19:54 UTC

Salve!

I can't run "cat $filename" inside scripts with system()
Simple example for my problem:

#test.source:
yes 

#test.bash
#!/bin/bash
u=test.source
cat $u >> test.out

touch test.out
chmod uoa+rwx test.*

When I run ./test.sh test.out got a new line with "yes".
But when I run it from asterisk:
exten => 228,1,Answer()
exten => 228,2,System(/etc/asterisk/scripts/test.sh)
exten => 228,3,Playback(vm-goodbye)
exten => 228,4,Hangup

I got *no* new line. ;(
What is the key?
What do I have to know?

Greetings,
rob





PS: I know that chmod uoa+rwx test.* is no good idea,
    this is only for this test. ;)



More information about the asterisk-users mailing list