From 4943c5939f9ffbf57922fd6f22030d20e06ef39d Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 20 Oct 2006 06:55:30 +0000 Subject: [PATCH] another step closer git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3119 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_channel.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/switch_channel.c b/src/switch_channel.c index d62ddb96d2..0207f87b12 100644 --- a/src/switch_channel.c +++ b/src/switch_channel.c @@ -307,8 +307,14 @@ SWITCH_DECLARE(switch_status_t) switch_channel_init(switch_channel_t *channel, SWITCH_DECLARE(char *) switch_channel_get_variable(switch_channel_t *channel, char *varname) { + char *v; assert(channel != NULL); - return switch_core_hash_find(channel->variables, varname); + + if (!(v=switch_core_hash_find(channel->variables, varname))) { + v = switch_caller_get_field_by_name(channel->caller_profile, varname); + } + + return v; } SWITCH_DECLARE(switch_hash_index_t *) switch_channel_variable_first(switch_channel_t *channel, switch_memory_pool_t *pool)