Module: kamailio Branch: master Commit: 9045c8d537b8960a18451f870effe2255cb4861d URL: https://github.com/kamailio/kamailio/commit/9045c8d537b8960a18451f870effe225...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2025-01-21T21:22:38+01:00
core: add extra params to first via only for generated replies
---
Modified: src/core/msg_translator.c
---
Diff: https://github.com/kamailio/kamailio/commit/9045c8d537b8960a18451f870effe225... Patch: https://github.com/kamailio/kamailio/commit/9045c8d537b8960a18451f870effe225...
---
diff --git a/src/core/msg_translator.c b/src/core/msg_translator.c index 50e867804be..7ad113aa955 100644 --- a/src/core/msg_translator.c +++ b/src/core/msg_translator.c @@ -2712,16 +2712,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