[HELP]Using Asterisk Manager API: Command

hi guys,

i am trying to use system commands on the asterisk CLI. For now when I try
"!ls" on the asterisk cli, it works fine. But when I use asterisk manager to execute the command, it doesn’t seem to work. I’ve coded my program in delphi. Here is what i sent to the server:

strInputText := ‘Action: Command’ + #13#10 +
‘Command: !ls’ + #13#10;

Action commands such as the one below, works fine.

strInputText := ‘Action: Command’ + #13#10 +
‘Command: help’ + #13#10;

Thanks !

I’m having a similar problem except I’m trying to run a perl script. The script is the one that builds the extension.conf file from MySql.

I get back no errors and if I do it directly from the CLI with ! it works fine.