Skip to content
Snippets Groups Projects
Commit d40e3437 authored by Sebastien Duthil's avatar Sebastien Duthil Committed by George Joseph
Browse files

func_channel: allow reading 4 fields from dialplan

The following fields return an error when read from dialplan:

- exten
- context
- userfield
- channame

ASTERISK-28796 #close

Change-Id: Ieacaac629490f8710fdacc9de80ed5916c5f6ee2
parent b38f6642
Branches
Tags
No related merge requests found
......@@ -357,13 +357,13 @@ static int func_channel_read(struct ast_channel *chan, const char *function,
locked_copy_string(chan, buf, ast_channel_appl(chan), len);
else if (!strcasecmp(data, "appdata") && ast_channel_data(chan))
locked_copy_string(chan, buf, ast_channel_data(chan), len);
else if (!strcasecmp(data, "exten") && ast_channel_data(chan))
else if (!strcasecmp(data, "exten"))
locked_copy_string(chan, buf, ast_channel_exten(chan), len);
else if (!strcasecmp(data, "context") && ast_channel_data(chan))
else if (!strcasecmp(data, "context"))
locked_copy_string(chan, buf, ast_channel_context(chan), len);
else if (!strcasecmp(data, "userfield") && ast_channel_data(chan))
else if (!strcasecmp(data, "userfield"))
locked_copy_string(chan, buf, ast_channel_userfield(chan), len);
else if (!strcasecmp(data, "channame") && ast_channel_data(chan))
else if (!strcasecmp(data, "channame"))
locked_copy_string(chan, buf, ast_channel_name(chan), len);
else if (!strcasecmp(data, "linkedid")) {
ast_channel_lock(chan);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment