I found a solution that works fine for me
Set(var1=${SHELL(shellcommand)})
Bye Daniel
> Von: Daniel Knoll <[email protected]>
> Datum: 16. April 2011 13:13:28 MESZ
> An: Asterisk Users Mailing List - Non-Commercial Discussion
> <[email protected]>
> Betreff: write system command output into a variable
>
> Hey Guys,
>
> i would like to write the output from my bash script into a Variable, that is
> readable by Asterisk
>
> Using this:
> Set(var1=${FILE(/dev/shm/tempfile.txt,0,6)})
>
> is not very helpful because this command reading fixed character length. If i
> read 6 characters and in the file only 3 i get "123 "
> Can anyone help me ?
>
> Thanx a lot for help
>
> Daniel
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users