Index: CHANGES =================================================================== --- CHANGES (revision 154148) +++ CHANGES (working copy) @@ -35,6 +35,8 @@ Applications ------------ + * DAHDISendCallreroutingFacility parameters are now comma-separated, + instead of the old pipe. * Scheduled meetme conferences may now have their end times extended by using MeetMeAdmin. * app_authenticate now gives the ability to select a prompt other than Index: channels/chan_dahdi.c =================================================================== --- channels/chan_dahdi.c (revision 154149) +++ channels/chan_dahdi.c (working copy) @@ -118,7 +118,7 @@ Send QSIG call rerouting facility over a PRI. - + Destination number. @@ -2994,11 +2994,16 @@ { /* Data will be our digit string */ struct dahdi_pvt *p; - char *parse, *tok, *tokb; + char *parse; char *dest = NULL; char *original = NULL; char *reason = NULL; int res = -1; + AST_DECLARE_APP_ARGS(args, + AST_APP_ARG(destination); + AST_APP_ARG(original); + AST_APP_ARG(reason); + ); if (ast_strlen_zero(data)) { ast_log(LOG_DEBUG, "No data sent to application!\n"); @@ -3012,28 +3017,25 @@ return -1; } - parse = ast_strdupa(data); - tok = strtok_r(parse, "|", &tokb); + AST_STANDARD_APP_ARGS(args, parse); - if (!tok) { + if (ast_strlen_zero(args.destination)) { ast_log(LOG_WARNING, "callrerouting facility requires at least destination number argument\n"); return -1; } - dest = tok; + dest = args.destination; - tok = strtok_r(NULL, "|", &tokb); - if (!tok) { + if (ast_strlen_zero(args.original)) { ast_log(LOG_WARNING, "Callrerouting Facility without original called number argument\n"); } else { - original = tok; + original = args.original; } - tok = strtok_r(NULL, "|", &tokb); - if (!tok) { + if (ast_strlen_zero(args.reason)) { ast_log(LOG_NOTICE, "Callrerouting Facility without diversion reason argument, defaulting to unknown\n"); } else { - reason = tok; + reason = args.reason; } ast_mutex_lock(&p->lock);