Ken D'Ambrosio
2009-Jan-22 22:16 UTC
[asterisk-users] Dumb question: retrieve values from OS-level commands?
Hi, all. I want to execute a script, and return the value of said (Python) script to the dialplan. I thought something like exten => 1,1,Set(MyWorkingDir=System(/bin/pwd)) might work, but apparently not. I also looked into AGI stuff, but that doesn't quite seem to be the right approach. Surely there's *some* way to do this... Any suggestions? Thanks! -Ken
Tilghman Lesher
2009-Jan-22 23:21 UTC
[asterisk-users] Dumb question: retrieve values from OS-level commands?
On Thursday 22 January 2009 16:16:33 Ken D'Ambrosio wrote:> Hi, all. I want to execute a script, and return the value of said > (Python) script to the dialplan. I thought something like > > exten => 1,1,Set(MyWorkingDir=System(/bin/pwd)) > > might work, but apparently not. I also looked into AGI stuff, but that > doesn't quite seem to be the right approach. Surely there's *some* way to > do this... > > Any suggestions?Set(foo=${SHELL(my_shell_script.sh)}) -- Tilghman
Paul Hales
2009-Jan-23 01:10 UTC
[asterisk-users] Dumb question: retrieve values from OS-level commands?
Not sure if this is still valid - I used it on a project quite a while ago: http://www.voip-info.org/wiki/view/Asterisk+cmd+Backticks PaulH Ken D'Ambrosio wrote:> Hi, all. I want to execute a script, and return the value of said > (Python) script to the dialplan. I thought something like > > exten => 1,1,Set(MyWorkingDir=System(/bin/pwd)) > > might work, but apparently not. I also looked into AGI stuff, but that > doesn't quite seem to be the right approach. Surely there's *some* way to > do this... > > Any suggestions? > > Thanks! > > -Ken > > > _______________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >