From: Gregory Nietsky Date: Thu, 22 Sep 2011 06:42:42 +0000 (+0000) Subject: Revert commit r337261 X-Git-Tag: 10.0.0-beta2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee9db5269c8efe6119b961c4aa6240c03ba81876;p=thirdparty%2Fasterisk.git Revert commit r337261 This commit is for trunk not version 10 ----- Adds a timeout argument to app_originate the default is 30s this will be used if the timout supplied is invalid or no timeout is supplied. ----- git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@337433 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/CHANGES b/CHANGES index bc419ee12e..6e623fed0b 100644 --- a/CHANGES +++ b/CHANGES @@ -204,7 +204,6 @@ Applications a MeetMe conference * Added 'k' option to MeetMe to automatically kill the conference when there's only one participant left (much like a normal call bridge) - * Added extra argument to Originate to set timeout. Asterisk Database ----------------- diff --git a/apps/app_originate.c b/apps/app_originate.c index 03bb6c44b8..5cfd413867 100644 --- a/apps/app_originate.c +++ b/apps/app_originate.c @@ -70,9 +70,6 @@ static const char app_originate[] = "Originate"; If the type is exten, then this is the priority that the channel is sent to. If the type is app, then this parameter is ignored. - - Timeout in seconds. Default is 30 seconds. - This application originates an outbound call and connects it to a specified extension or application. This application will block until the outgoing call fails or gets answered. At that point, this application will exit with the status variable set and dialplan processing will continue. @@ -104,13 +101,12 @@ static int originate_exec(struct ast_channel *chan, const char *data) AST_APP_ARG(arg1); AST_APP_ARG(arg2); AST_APP_ARG(arg3); - AST_APP_ARG(timeout); ); char *parse; char *chantech, *chandata; int res = -1; int outgoing_status = 0; - unsigned int timeout = 30; + static const unsigned int timeout = 30; static const char default_exten[] = "s"; struct ast_format tmpfmt; struct ast_format_cap *cap_slin = ast_format_cap_alloc_nolock(); @@ -135,13 +131,6 @@ static int originate_exec(struct ast_channel *chan, const char *data) goto return_cleanup; } - if (!ast_strlen_zero(args.timeout)) { - if(sscanf(args.timeout, "%u", &timeout) != 1) { - ast_log(LOG_NOTICE, "Invalid timeout: '%s'. Setting timeout to 30 seconds\n", args.timeout); - timeout = 30; - } - } - chandata = ast_strdupa(args.tech_data); chantech = strsep(&chandata, "/");