From: Anthony Minessale Date: Fri, 6 Jan 2012 17:21:06 +0000 (-0600) Subject: scope err X-Git-Tag: v1.2-rc1~19^2~1^2~101 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1ec52b024c01115f4db9dde005b5c55008b724e;p=thirdparty%2Ffreeswitch.git scope err --- diff --git a/src/mod/applications/mod_httapi/mod_httapi.c b/src/mod/applications/mod_httapi/mod_httapi.c index 96514d61f4..e88ce1d5c7 100644 --- a/src/mod/applications/mod_httapi/mod_httapi.c +++ b/src/mod/applications/mod_httapi/mod_httapi.c @@ -491,9 +491,11 @@ static switch_status_t parse_playback(const char *tag_name, client_t *client, sw if (sub_action && client->matching_action_binding && client->matching_action_binding->match_digits) { if (!strncasecmp(sub_action, "dial:", 5)) { + char *context = NULL; + char *dp = NULL; + if (client->profile->perms.dial.set_context) { - char *context = switch_core_session_strdup(client->session, sub_action + 5); - char *dp; + context = switch_core_session_strdup(client->session, sub_action + 5); if ((dp = strchr(context, ':'))) { *dp++ = '\0'; @@ -501,10 +503,11 @@ static switch_status_t parse_playback(const char *tag_name, client_t *client, sw dp = NULL; } } - - switch_ivr_session_transfer(client->session, client->matching_action_binding->match_digits, dp, context); - status = SWITCH_STATUS_FALSE; } + + switch_ivr_session_transfer(client->session, client->matching_action_binding->match_digits, dp, context); + status = SWITCH_STATUS_FALSE; + } else { switch_event_add_header_string(client->params, SWITCH_STACK_BOTTOM, "url", sub_action); }