Mercie:) how to debug "System( script.sh )" Re: [solved] sorry... ; ) Re: [Asterisk-Users] can't run "cat $filename" inside scripts with system()

Robert Michel news at robertmichel.de
Sun Jul 2 03:23:46 MST 2006


Salve Tzafrir!

On Sun, 02 Jul 2006, Tzafrir Cohen wrote:
> #!/bin/bash -x

Very good tip! I missed to see what is going on ;)
Let me add:
to see the debug information of bash -x when run
a script with System() call from asterisk, use
this at the header of your script:

#!/bin/bash -x
exec 2>/var/log/debug.asterisk.script.name

I guess there is no trick to see this inside the
asterisk CLI? And probably it is better to write
it into an external logfile ;)

Mercie, and sunny greetings from Aachen(Europe),
rob



More information about the asterisk-users mailing list