FS-3686 sigh
This commit is contained in:
parent
04469bb5c9
commit
1bf80f0509
|
@ -196,6 +196,26 @@ static void extract_header_vars(sofia_profile_t *profile, sip_t const *sip,
|
|||
|
||||
SWITCH_STANDARD_STREAM(stream);
|
||||
|
||||
if (switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND) {
|
||||
char *tmp[128] = { 0 };
|
||||
int y = 0;
|
||||
|
||||
for(rrp = sip->sip_record_route; rrp; rrp = rrp->r_next) {
|
||||
char *rr = sip_header_as_string(nh->nh_home, (void *) rrp);
|
||||
tmp[y++] = rr;
|
||||
if (y == 127) break;
|
||||
}
|
||||
|
||||
y--;
|
||||
|
||||
while(y >= 0) {
|
||||
stream.write_function(&stream, x == 0 ? "%s" : ",%s", tmp[y]);
|
||||
su_free(nh->nh_home, tmp[y]);
|
||||
y--;
|
||||
x++;
|
||||
}
|
||||
|
||||
} else {
|
||||
for(rrp = sip->sip_record_route; rrp; rrp = rrp->r_next) {
|
||||
char *rr = sip_header_as_string(nh->nh_home, (void *) rrp);
|
||||
|
||||
|
@ -204,6 +224,7 @@ static void extract_header_vars(sofia_profile_t *profile, sip_t const *sip,
|
|||
|
||||
x++;
|
||||
}
|
||||
}
|
||||
|
||||
switch_channel_set_variable(channel, "sip_invite_record_route", (char *)stream.data);
|
||||
free(stream.data);
|
||||
|
|
Loading…
Reference in New Issue