summaryrefslogtreecommitdiff
path: root/channels/chan_mgcp.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2012-10-29 21:27:09 +0000
committerMark Michelson <mmichelson@digium.com>2012-10-29 21:27:09 +0000
commitda85f8489f76d50989f1f030eea7b13dc1fda52d (patch)
tree2d73dea0a4ccd82b65bc8f35012cf1e5a66c2a8e /channels/chan_mgcp.c
parent1eb14dbff8bb10caba4e7bd6ebb284056d328821 (diff)
Make evaluation of channel variables consistently case-sensitive.
Due to inconsistencies in how variable names were evaluated, the decision was made to make all evaluations case-sensitive. See the UPGRADE.txt file or https://wiki.asterisk.org/wiki/display/AST/Case+Sensitivity for more details. (closes issue ASTERISK-20163) reported by Matt Jordan Review: https://reviewboard.asterisk.org/r/2160 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375442 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_mgcp.c')
-rw-r--r--channels/chan_mgcp.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c
index ff909a3be..0c3dac607 100644
--- a/channels/chan_mgcp.c
+++ b/channels/chan_mgcp.c
@@ -842,20 +842,11 @@ static int mgcp_call(struct ast_channel *ast, const char *dest, int timeout)
struct mgcp_endpoint *p;
struct mgcp_subchannel *sub;
char tone[50] = "";
- const char *distinctive_ring = NULL;
- struct varshead *headp;
- struct ast_var_t *current;
+ const char *distinctive_ring = pbx_builtin_getvar_helper(ast, "ALERT_INFO");
ast_debug(3, "MGCP mgcp_call(%s)\n", ast_channel_name(ast));
sub = ast_channel_tech_pvt(ast);
p = sub->parent;
- headp = ast_channel_varshead(ast);
- AST_LIST_TRAVERSE(headp,current,entries) {
- /* Check whether there is an ALERT_INFO variable */
- if (strcasecmp(ast_var_name(current),"ALERT_INFO") == 0) {
- distinctive_ring = ast_var_value(current);
- }
- }
ast_mutex_lock(&sub->lock);
switch (p->hookstate) {