From: Michael B. <mbe...@gm...> - 2014-04-20 06:39:42
|
I've tried using both os.system as well as subprocess.call to invoke an external command that is not working for me. It has something to do with the command I am trying to run, which is squeezy, a command line interface for logitech media center. I've been able to use os.system as well as subprocess.call successfully in an agi using other commands, but not squeezy. I can get squeezy to work using both os.system as well as subprocess.call in an external python script if I copy out the revelant chunk of code, but it will not work in an agi. It works in an external python script if I run it as either root or asterisk, so I don't think it is a permissions issue... If I try to run squeezy in the agi using subprocess.call or subprocess.check_call, the python agi dies right there if I use os.system, the command still doesn't run as expected, but the agi continues normally. I don't know how to capture any useful output since the agi dies if I try to use subprocess.check_call. I don't see any of the regular python error messages in my asterisk CLI output, the only output I see I generate myself with agi.verbose How can I get to what is happening in the agi? Can the python errors/output be redirected somewhere I can see them? I have been debugging my issues using external python scripts to test, but in this case my issue goes away in the external script... I would appreciate any advice :) thank you very much to all for the wonderful piece of software, it is so nice to be able to use python for agi scripts! |