Skip to content
Snippets Groups Projects
Commit 8ee7419d authored by Joshua Colp's avatar Joshua Colp
Browse files

If no number is specified in the SIP_HEADER dialplan function, then just use...

If no number is specified in the SIP_HEADER dialplan function, then just use the first one. (issue #7854 reported by sxpert and issue #7863 reported by hristo)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41689 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent cd8635b9
Branches
Tags
No related merge requests found
......@@ -10909,9 +10909,13 @@ static int func_header_read(struct ast_channel *chan, char *function, char *data
}
 
AST_STANDARD_APP_ARGS(args, data);
sscanf(args.number, "%d", &number);
if (number < 1)
if (!args.number) {
number = 1;
} else {
sscanf(args.number, "%d", &number);
if (number < 1)
number = 1;
}
 
p = chan->tech_pvt;
 
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment