Summary: | ASTERISK-00003: Spooled Calls with Application/Data combination | ||
Reporter: | scaredycat (scaredycat) | Labels: | |
Date Opened: | 2003-07-19 17:38:24 | Date Closed: | 2008-01-15 14:33:17.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Core/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) asterisk-outappvars.patch | |
Description: | If the Application/Data combination is used in a .call file rather than context/exten/priority is used then the SetVar's are no passed to the AGI, or in fact any other application. ScaredyCat Example: Channel: local/s@blah MaxRetries: 1 RetryTime: 60 WaitTime: 30 Application: AGI Data: monitordevice.agi SetVar: callpurpose=test SetVar: callmessage=unitfail | ||
Comments: | By: scaredycat (scaredycat) 2003-07-20 18:10:09 managed to locate the problem: ast_pbx_outgoing_app doesn't allow for the passing of the variables from pbx_spool.c : res = ast_pbx_outgoing_app(o->tech, AST_FORMAT_SLINEAR, o->dest, o->waittime * 1000, o->app, o->data, &reason, 2 /* wait to finish */, o->callerid); res = ast_pbx_outgoing_exten(o->tech, AST_FORMAT_SLINEAR, o->dest, o->waittime * 1000, o->context, o->exten, o->priority, &reason, 2 /* wait to finish */, o->callerid, o->variable ); By: izo (izo) 2003-07-23 18:28:06 Variables are assigned to channel and Application doesnt have a channel, but you can probably send variables as parameters to your agi script By: John Laur (gork) 2003-07-30 10:27:00 yes, like izo, I believe that this is the intent. If SetVar needs to work in this instance, that's fine, but here are two other ways to do it: 1) Pass your variables in the "Data" string of the Application as izo mentioned. They will be accessible to your AGI this way 2) Create a named extension for your AGI that you can call with context/exten/priority. You can put it in its own conext to control access very easily. This is the method that I use and find that works the best. It is good to do this too because it keeps the call handling independent from the application that creates the queue spool file. By: scaredycat (scaredycat) 2003-07-30 12:59:28 I agree i could use the data field, but it;s a big kludge, especially when there is a funtion (SetVar) already.. just not implemented in the Application data combo. Creating a named exten is another work around, I just can't help feeling that this should be enabled.. Actually this all stems from the fact that *I* want to control the call flow.. I'd like to be able to initiate the call and track its status. Currently once you copy the file to the outgoing dir then you have no way of knowing if the initial call part (eg Channel: Zap/g1/124567890) was actually successful. The only way around that appears to be to parse the call log, and that's a pretty poor solution imho. By: James Golovich (jamesgolovich) 2003-08-25 16:59:06 I sent a patch for this to Mark via email, then I noticed there was a bug open on it already so I've attached the patch here as well By: Mark Spencer (markster) 2003-08-25 17:33:46 Fixed in CVS By: Digium Subversion (svnbot) 2008-01-15 14:33:17.000-0600 Repository: asterisk Revision: 1432 U trunk/include/asterisk/pbx.h U trunk/manager.c U trunk/pbx/pbx_spool.c U trunk/pbx.c ------------------------------------------------------------------------ r1432 | markster | 2008-01-15 14:33:17 -0600 (Tue, 15 Jan 2008) | 2 lines Merge james's patch (bug ASTERISK-3) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=1432 |