[Freeswitch-trunk] [commit] r13626 - freeswitch/trunk/src
FreeSWITCH SVN
mrene at freeswitch.org
Thu Jun 4 18:16:03 PDT 2009
Author: mrene
Date: Thu Jun 4 20:16:02 2009
New Revision: 13626
Log:
add hunt_caller_profile
Modified:
freeswitch/trunk/src/switch_caller.c
freeswitch/trunk/src/switch_channel.c
freeswitch/trunk/src/switch_core_session.c
Modified: freeswitch/trunk/src/switch_caller.c
==============================================================================
--- freeswitch/trunk/src/switch_caller.c (original)
+++ freeswitch/trunk/src/switch_caller.c Thu Jun 4 20:16:02 2009
@@ -50,6 +50,8 @@
switch_caller_profile_t *profile = NULL;
profile = switch_core_alloc(pool, sizeof(*profile));
+ memset(profile, 0, sizeof(*profile));
+
switch_assert(profile != NULL);
if (!context) {
Modified: freeswitch/trunk/src/switch_channel.c
==============================================================================
--- freeswitch/trunk/src/switch_channel.c (original)
+++ freeswitch/trunk/src/switch_channel.c Thu Jun 4 20:16:02 2009
@@ -495,7 +495,7 @@
switch_mutex_lock(channel->profile_mutex);
if (!channel->variables || !(v = switch_event_get_header(channel->variables, varname))) {
- switch_caller_profile_t *cp = channel->caller_profile;
+ switch_caller_profile_t *cp = switch_channel_get_caller_profile(channel);
if (cp) {
if (!strncmp(varname, "aleg_", 5)) {
@@ -1460,7 +1460,7 @@
switch_caller_profile_t *profile;
switch_assert(channel != NULL);
switch_mutex_lock(channel->profile_mutex);
- profile = channel->caller_profile;
+ profile = channel->hunt_caller_profile ? channel->hunt_caller_profile : channel->caller_profile;
switch_mutex_unlock(channel->profile_mutex);
return profile;
}
Modified: freeswitch/trunk/src/switch_core_session.c
==============================================================================
--- freeswitch/trunk/src/switch_core_session.c (original)
+++ freeswitch/trunk/src/switch_core_session.c Thu Jun 4 20:16:02 2009
@@ -1525,6 +1525,8 @@
}
dpstr = switch_core_session_strdup(session, new_profile->dialplan);
+
+
switch_channel_set_hunt_caller_profile(channel, new_profile);
argc = switch_separate_string(dpstr, ',', dp, (sizeof(dp) / sizeof(dp[0])));
More information about the Freeswitch-trunk
mailing list