mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user