FSCORE-471 and any other update related bugs

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15186 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2009-10-21 18:48:28 +00:00
parent 6b0f923f49
commit 4d9f7de25b
11 changed files with 126 additions and 53 deletions

View File

@@ -2531,6 +2531,32 @@ SWITCH_DECLARE(char *) switch_channel_build_param_string(switch_channel_t *chann
return stream.data;
}
SWITCH_DECLARE(switch_status_t) switch_channel_pass_callee_id(switch_channel_t *channel, switch_channel_t *other_channel)
{
int x = 0;
switch_assert(channel);
switch_assert(other_channel);
switch_mutex_lock(channel->profile_mutex);
switch_mutex_lock(other_channel->profile_mutex);
if (!switch_strlen_zero(channel->caller_profile->callee_id_name)) {
other_channel->caller_profile->callee_id_name = switch_core_strdup(channel->caller_profile->pool, channel->caller_profile->callee_id_name);
x++;
}
if (!switch_strlen_zero(channel->caller_profile->callee_id_number)) {
other_channel->caller_profile->callee_id_number = switch_core_strdup(channel->caller_profile->pool, channel->caller_profile->callee_id_number);
x++;
}
switch_mutex_unlock(other_channel->profile_mutex);
switch_mutex_unlock(channel->profile_mutex);
return x ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_FALSE;
}
SWITCH_DECLARE(switch_status_t) switch_channel_get_variables(switch_channel_t *channel, switch_event_t **event)
{
switch_status_t status;