add originated_legs and originate_causes to A leg when present in an originate to detail the B leg data

This commit is contained in:
Anthony Minessale committed 2012-10-18 13:22:52 -04:00
1 parent 1276387c24
commit 3099445a95
2 files changed
+32 -1

No files matched your search

+6 -1
View File
@@ -1016,7 +1016,12 @@ static switch_status_t switch_event_base_add_header(switch_event_t *event, switc
switch_assert(hv);
header->value = hv;
switch_snprintf(header->value, len, "ARRAY::");
if (header->idx > 1) {
switch_snprintf(header->value, len, "ARRAY::");
} else {
*header->value = '\0';
}
for(j = 0; j < header->idx; j++) {
switch_snprintf(header->value + strlen(header->value), len - strlen(header->value), "%s%s", j == 0 ? "" : "|:", header->array[j]);
}