fix caller id fields in show channels show calls etc

This commit is contained in:
Anthony Minessale committed 2010-08-17 17:26:36 -05:00
1 parent 1413a9d5db
commit 5f763d0d1b
5 files changed
+70 -25

No files matched your search

+7
View File
@@ -1847,8 +1847,10 @@ SWITCH_DECLARE(void) switch_channel_event_set_basic_data(switch_channel_t *chann
} else {
/* Index Originator's Profile */
if (originator_caller_profile) {
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Other-Type", "originator");
switch_caller_profile_event_set_data(originator_caller_profile, "Other-Leg", event);
} else if (originatee_caller_profile) { /* Index Originatee's Profile */
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Other-Type", "originatee");
switch_caller_profile_event_set_data(originatee_caller_profile, "Other-Leg", event);
}
}
@@ -1932,6 +1934,7 @@ SWITCH_DECLARE(void) switch_channel_set_caller_profile(switch_channel_t *channel
switch_mutex_lock(channel->profile_mutex);
switch_assert(caller_profile != NULL);
caller_profile->direction = channel->direction;
uuid = switch_core_session_get_uuid(channel->session);
if (!caller_profile->uuid || strcasecmp(caller_profile->uuid, uuid)) {
@@ -1974,6 +1977,7 @@ SWITCH_DECLARE(void) switch_channel_set_caller_profile(switch_channel_t *channel
caller_profile->times->created = switch_micro_time_now();
}
caller_profile->next = channel->caller_profile;
channel->caller_profile = caller_profile;
caller_profile->profile_index = switch_core_sprintf(caller_profile->pool, "%d", ++channel->profile_index);
@@ -2017,6 +2021,7 @@ SWITCH_DECLARE(void) switch_channel_set_hunt_caller_profile(switch_channel_t *ch
switch_assert(channel->caller_profile != NULL);
switch_mutex_lock(channel->profile_mutex);
caller_profile->direction = channel->direction;
channel->caller_profile->hunt_caller_profile = NULL;
if (channel->caller_profile && caller_profile) {
channel->caller_profile->hunt_caller_profile = caller_profile;
@@ -2030,6 +2035,7 @@ SWITCH_DECLARE(void) switch_channel_set_originatee_caller_profile(switch_channel
switch_assert(channel->caller_profile != NULL);
switch_mutex_lock(channel->profile_mutex);
if (channel->caller_profile) {
caller_profile->next = channel->caller_profile->originatee_caller_profile;
channel->caller_profile->originatee_caller_profile = caller_profile;
@@ -2044,6 +2050,7 @@ SWITCH_DECLARE(switch_caller_profile_t *) switch_channel_get_originator_caller_p
switch_assert(channel != NULL);
switch_mutex_lock(channel->profile_mutex);
if (channel->caller_profile) {
profile = channel->caller_profile->originator_caller_profile;
}