[asterisk-bugs] [JIRA] (ASTERISK-21304) AGI Async Agi with parameters
Dirk Wendland (JIRA)
noreply at issues.asterisk.org
Wed Mar 20 05:15:01 CDT 2013
[ https://issues.asterisk.org/jira/browse/ASTERISK-21304?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dirk Wendland updated ASTERISK-21304:
-------------------------------------
Environment:
exten => _X.,1,AGI(agi:async,arg1,arg2)
was:
exten => _X.,1,AGI(agi:async,arg1,arg2)
Patch is in the description
So I get in the AsyncAGI event
Event: AsyncAGI
Privilege: agi,all
SubEvent: Start
Channel: SIP/10-0000002a
Env: agi_request:%20async%0aagi_channel:%20SIP/10-0000002a%0aagi_language:%20en%0aagi_type:%20SIP%0aagi_uniqueid:%20asterisk-1363774303.83%0aagi_callerid:%2010%0aagi_calleridname:%2010%0aagi_callingpres:%200%0aagi_callingani2:%200%0aagi_callington:%200%0aagi_callingtns:%200%0aagi_dnid:%20200%0aagi_rdnis:%20unknown%0aagi_context:%20international%0aagi_extension:%20200%0aagi_priority:%201%0aagi_enhanced:%200.0%0aagi_accountcode:%20%0aagi_arg_1:%20%0aagi_arg_2:%20%0a%0a
With agi_arg_1:%20%0aagi_arg_2:%20%0a%0a for aditional Informations
> AGI Async Agi with parameters
> -----------------------------
>
> Key: ASTERISK-21304
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-21304
> Project: Asterisk
> Issue Type: New Feature
> Security Level: None
> Components: Resources/res_agi
> Affects Versions: 11.2.1
> Environment: exten => _X.,1,AGI(agi:async,arg1,arg2)
> Reporter: Dirk Wendland
> Severity: Trivial
>
> --- asterisk-11.2.1.orig/res/res_agi.c 2012-10-04 17:42:07.000000000 +0200
> +++ asterisk-11.2.1/res/res_agi.c 2013-03-19 21:17:18.286734792 +0100
> @@ -1234,7 +1234,7 @@ static enum agi_result async_agi_read_fr
> return AGI_RESULT_SUCCESS;
> }
>
> -static enum agi_result launch_asyncagi(struct ast_channel *chan, char *argv[], int *efd)
> +static enum agi_result launch_asyncagi(struct ast_channel *chan, int argc, char *argv[], int *efd)
> {
> /* This buffer sizes might cause truncation if the AGI command writes more data
> than AGI_BUF_SIZE as result. But let's be serious, is there an AGI command
> @@ -1300,7 +1300,7 @@ static enum agi_result launch_asyncagi(s
>
> /* notify possible manager users of a new channel ready to
> receive commands */
> - setup_env(chan, "async", fds[1], 0, 0, NULL);
> + setup_env(chan, "async", fds[1], 0, argc, argv);
> /* read the environment */
> res = read(fds[0], agi_buffer, AGI_BUF_SIZE);
> if (res <= 0) {
> @@ -1615,7 +1615,7 @@ static enum agi_result launch_ha_netscri
> return AGI_RESULT_FAILURE;
> }
>
> -static enum agi_result launch_script(struct ast_channel *chan, char *script, char *argv[], int *fds, int *efd, int *opid)
> +static enum agi_result launch_script(struct ast_channel *chan, char *script, int argc, char *argv[], int *fds, int *efd, int *opid)
> {
> char tmp[256];
> int pid, toast[2], fromast[2], audio[2], res;
> @@ -1628,7 +1628,7 @@ static enum agi_result launch_script(str
> return (efd == NULL) ? launch_ha_netscript(script, argv, fds) : AGI_RESULT_FAILURE;
> }
> if (!strncasecmp(script, "agi:async", sizeof("agi:async") - 1)) {
> - return launch_asyncagi(chan, argv, efd);
> + return launch_asyncagi(chan, argc, argv, efd);
> }
>
> if (script[0] != '/') {
> @@ -3896,7 +3896,7 @@ static int agi_exec_full(struct ast_chan
> return -1;
> }
> #endif
> - res = launch_script(chan, args.argv[0], args.argv, fds, enhanced ? &efd : NULL, &pid);
> + res = launch_script(chan, args.argv[0], args.argc, args.argv, fds, enhanced ? &efd : NULL, &pid);
> /* Async AGI do not require run_agi(), so just proceed if normal AGI
> or Fast AGI are setup with success. */
> if (res == AGI_RESULT_SUCCESS || res == AGI_RESULT_SUCCESS_FAST) {
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the asterisk-bugs
mailing list