]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
another step closer
authorAnthony Minessale <anthony.minessale@gmail.com>
Fri, 20 Oct 2006 06:55:30 +0000 (06:55 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Fri, 20 Oct 2006 06:55:30 +0000 (06:55 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3119 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_channel.c

index d62ddb96d2f13b8ef55da563062bd1a2c1666108..0207f87b12a98fd1e33b0974f10c98d912dc6954 100644 (file)
@@ -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)