Summary:ASTERISK-02430: [patch] to call cli functions from agi script
Reporter:mnugent (mnugent)Labels:
Date Opened:2004-09-18 20:53:39Date Closed:2004-10-02 21:25:22
Versions:Frequency of
Environment:Attachments:( 0) res_agi-callcli.c.diff
Description:This patch allows the CALLCLI directive to call the ast_cli_command function.  The implementation is a bit of a hack, but it was done this way in order to have minimal impact on the overall code.  Note the pipe default buffer size for your operating system and version vs the amount of data that you want from the pipe.  Modifications might need to be made to increase pipe buffer size.

This patch was originally against app_agi.c, but that no longer exists in the codebase.  I've applied it to res_agi.c as they look extremely similar and it compiles without warning, but little testing has been done on this.  All of my testing in depth testing has been done on app_agi.c

The diff is against the current res_agi in CVS.  The diff against app_agi.c is also available if anyone wants it.
Comments:By: Mark Spencer (markster) 2004-09-25 19:30:42

That would seem to have serious security implications since not everything exposed on the CLI should be exposed to an IVR script.  I would rather see what specific things you need from the CLI that can be exposed to AGI.

By: Brian West (bkw918) 2004-09-28 09:32:20

This isn't even needed.. if you need access to the CLI then connect to the manager and issue the commands.


By: Mark Spencer (markster) 2004-10-02 10:01:56

Due to the dangers of having full command line access, I would prefer to see a patch bringing in whichever specific feature you need over AGI.

I will leave this in the bug tracker for anyone else who wants the same functionality, however.