mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 12:42:02 +00:00
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:
@@ -552,7 +552,12 @@ static esl_status_t esl_event_base_add_header(esl_event_t *event, esl_stack_t st
|
||||
esl_assert(hv);
|
||||
header->value = hv;
|
||||
|
||||
esl_snprintf(header->value, len, "ARRAY::");
|
||||
if (header->idx > 1) {
|
||||
esl_snprintf(header->value, len, "ARRAY::");
|
||||
} else {
|
||||
*header->value = '\0';
|
||||
}
|
||||
|
||||
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]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user