Module: kamailio
Branch: 5.7
Commit: 7af9dc940e29fa3aecda011096820e011de0b254
URL:
https://github.com/kamailio/kamailio/commit/7af9dc940e29fa3aecda011096820e0…
Author: Victor Seva <vseva(a)sipwise.com>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2023-10-25T18:31:13+02:00
pv_headers: pvh_xavi_get_child() fix fallback logic
* don't fallback to Initial request headers for Replies
(cherry picked from commit 19a32b863d9a79c0cbaf04a7a9864e0c08a914f7)
---
Modified: src/modules/pv_headers/pvh_xavp.c
---
Diff:
https://github.com/kamailio/kamailio/commit/7af9dc940e29fa3aecda011096820e0…
Patch:
https://github.com/kamailio/kamailio/commit/7af9dc940e29fa3aecda011096820e0…
---
diff --git a/src/modules/pv_headers/pvh_xavp.c b/src/modules/pv_headers/pvh_xavp.c
index 4f90808c6f6..426831db561 100644
--- a/src/modules/pv_headers/pvh_xavp.c
+++ b/src/modules/pv_headers/pvh_xavp.c
@@ -287,7 +287,7 @@ sr_xavp_t *pvh_xavi_get_child(struct sip_msg *msg, str *xname, str
*name)
pvh_get_branch_xname(msg, xname, &br_xname);
xavi = xavi_get_child(&br_xname, name);
- if(xavi == NULL) {
+ if(xavi == NULL && msg->first_line.type == SIP_REQUEST) {
if(cmp_str(xname, &br_xname) != 0) {
xavi = xavi_get_child(xname, name);
if(xavi) {