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 2012-10-18 13:23:05 -04:00
parent 3099445a95
commit 50cd5c28f5

View File

@ -552,7 +552,12 @@ static esl_status_t esl_event_base_add_header(esl_event_t *event, esl_stack_t st
esl_assert(hv); esl_assert(hv);
header->value = hv; header->value = hv;
if (header->idx > 1) {
esl_snprintf(header->value, len, "ARRAY::"); esl_snprintf(header->value, len, "ARRAY::");
} else {
*header->value = '\0';
}
for(j = 0; j < header->idx; j++) { for(j = 0; j < header->idx; j++) {
esl_snprintf(header->value + strlen(header->value), len - strlen(header->value), "%s%s", j == 0 ? "" : "|:", header->array[j]); esl_snprintf(header->value + strlen(header->value), len - strlen(header->value), "%s%s", j == 0 ? "" : "|:", header->array[j]);
} }