adding some inter channel communication and other code for real-world usage (not totally done)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@646 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2006-02-22 02:50:33 +00:00
parent 4ff821ef76
commit fe3e994237
11 changed files with 194 additions and 36 deletions

View File

@@ -450,6 +450,16 @@ SWITCH_DECLARE(void) switch_channel_event_set_data(switch_channel *channel, swit
SWITCH_DECLARE(void) switch_channel_set_caller_profile(switch_channel *channel, switch_caller_profile *caller_profile)
{
assert(channel != NULL);
assert(channel->session != NULL);
if (!caller_profile->uuid) {
caller_profile->uuid = switch_core_session_strdup(channel->session, switch_core_session_get_uuid(channel->session));
}
if (!caller_profile->chan_name) {
caller_profile->chan_name = switch_core_session_strdup(channel->session, channel->name);
}
channel->caller_profile = caller_profile;
}
@@ -479,6 +489,13 @@ SWITCH_DECLARE(switch_caller_profile *) switch_channel_get_originator_caller_pro
return channel->originator_caller_profile;
}
SWITCH_DECLARE(char *) switch_channel_get_uuid(switch_channel *channel)
{
assert(channel != NULL);
assert(channel->session != NULL);
return switch_core_session_get_uuid(channel->session);
}
SWITCH_DECLARE(switch_caller_profile *) switch_channel_get_originatee_caller_profile(switch_channel *channel)
{
assert(channel != NULL);