Summary: | ASTERISK-00658: [patch] APP_AGI will not accept multiple arguments (fix included) | ||
Reporter: | sbingner (sbingner) | Labels: | |
Date Opened: | 2003-12-11 23:01:52.000-0600 | Date Closed: | 2008-01-15 14:48:38.000-0600 |
Priority: | Trivial | Regression? | No |
Status: | Closed/Complete | Components: | Core/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) app_agi-multi-arg.diff ( 1) app_agi-multi-arg-fixed.diff | |
Description: | APP_AGI will only use the first argument passed to it as an argument to the command being executed. This patch modifies that so it will accept up to MAX_ARGS in arguments, and removes the 'ringy' feature. If that feture is needed, could easily check for it in last argument provided. ****** ADDITIONAL INFORMATION ****** Current CVS | ||
Comments: | By: Tilghman Lesher (tilghman) 2003-12-12 00:20:14.000-0600 Actually, all applications in Asterisk accept only one argument. If you need to pass more than one argument, compound your arguments together with an ampersand, then separate them back out in your application. Or, set your arguments to variables and query the value of those variables inside your AGI script. Making an exception for AGI is just that - an exception - which is an inconsistent interface and should probably be avoided. By: sbingner (sbingner) 2003-12-12 00:30:13.000-0600 it is not chaning how the argument string is passed to app_agi, it is changing how app_agi execs the external AGI script. res_musiconhold is the only other place I know if in * where an external program is executed (other than system which isn't really relevant), and it passes multiple arguments there. If this is not how AGI is supposed to work, the help needs to be change from: [E]AGI(command|args): to [E]AGI(command|arg): edited on: 12-12-03 00:22 By: Brian West (bkw918) 2003-12-14 12:01:59.000-0600 Also attach a proper patch otherwise it won't make it.. all the rx/txfax stuff MUST GO! By: sbingner (sbingner) 2003-12-14 13:32:08.000-0600 Crap, sorry about that... didn't realize I hadn't done a diff on that file only. Attached is corrected diff. By: exomorph (exomorph) 2004-03-21 11:52:47.000-0600 Checked against the cvs-head, applies, and works as noted above. Its got my vote. :) By: jerjer (jerjer) 2004-03-23 07:53:06.000-0600 applied to cvs -head By: Digium Subversion (svnbot) 2008-01-15 14:48:38.000-0600 Repository: asterisk Revision: 2535 U trunk/apps/app_agi.c ------------------------------------------------------------------------ r2535 | jeremy | 2008-01-15 14:48:37 -0600 (Tue, 15 Jan 2008) | 2 lines fix agi to accept multiple arguments. Bug ASTERISK-658 ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=2535 |