summaryrefslogtreecommitdiff
path: root/channels/chan_mgcp.c
diff options
context:
space:
mode:
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) {