Module: kamailio
Branch: 5.8
Commit: 8eff811614b72fbf80af6d546d65c65e6b59c1a5
URL:
https://github.com/kamailio/kamailio/commit/8eff811614b72fbf80af6d546d65c65…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-01-22T10:49:34+01:00
core: add extra params to first via only for generated replies
(cherry picked from commit 9045c8d537b8960a18451f870effe2255cb4861d)
---
Modified: src/core/msg_translator.c
---
Diff:
https://github.com/kamailio/kamailio/commit/8eff811614b72fbf80af6d546d65c65…
Patch:
https://github.com/kamailio/kamailio/commit/8eff811614b72fbf80af6d546d65c65…
---
diff --git a/src/core/msg_translator.c b/src/core/msg_translator.c
index 262ba07a23a..f7590dc5161 100644
--- a/src/core/msg_translator.c
+++ b/src/core/msg_translator.c
@@ -2692,16 +2692,17 @@ char *build_res_buf_from_sip_req(unsigned int code, str *text, str
*new_tag,
(hdr->body.s + hdr->body.len) - hdr->name.s,
msg);
}
- if(received_buf)
+ if(received_buf) {
append_str(p, received_buf, received_len);
+ }
+ if(xparams.len > 0) {
+ append_str(p, xparams.s, xparams.len);
+ }
} else {
/* normal whole via copy */
append_str_trans(p, hdr->name.s,
(hdr->body.s + hdr->body.len) - hdr->name.s, msg);
}
- if(xparams.len > 0) {
- append_str(p, xparams.s, xparams.len);
- }
append_str(p, CRLF, CRLF_LEN);
/* if is HTTP, replace Via with Sia
* - HTTP Via format is different than SIP Via