Index: apps/app_originate.c =================================================================== --- apps/app_originate.c (revision 326468) +++ apps/app_originate.c (working copy) @@ -66,6 +66,9 @@ 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. @@ -97,12 +100,13 @@ 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; - static const unsigned int timeout = 30; + int timeout = 30; static const char default_exten[] = "s"; ast_autoservice_start(chan); @@ -120,6 +124,12 @@ ast_log(LOG_ERROR, "Incorrect number of arguments\n"); goto return_cleanup; } + + if (!ast_strlen_zero(args.timeout)) + { + timeout = atoi(args.timeout); + ast_log(LOG_NOTICE, "Timeout set to %d seconds.\n", timeout); + } chandata = ast_strdupa(args.tech_data); chantech = strsep(&chandata, "/");