[SR-Users] via header not removed wit hremove_hf()
Richard Robson
richard at rikrobson.co.uk
Tue Sep 7 14:09:46 CEST 2021
during testing I need to remove a Via header
This is the code snippet
route[REPLACE_VIA] {
xlog ("L_INFO", "[REPLACE_VIA] Start of block\n");
xlog ("L_INFO", "[REPLACE_VIA] $hdrc(Via) Via headers\n");
if(remove_hf("Via")) {
xlog ("L_INFO", "[REPLACE_VIA] removed Via\n");
}
else {
xlog ("L_INFO", "[REPLACE_VIA] did not remove Via\n");
}
xlog ("L_INFO", "[REPLACE_VIA] $hdrc(Via) Via headers\n");
and this is the logs output
Sep 7 08:00:00 INFO: _LOG: 3a547f956d65fe985ba189916047fc320ae150ad:
[REPLACE_RURI] Start of block
Sep 7 08:00:00 INFO: _LOG: 3a547f956d65fe985ba189916047fc320ae150ad:
[REPLACE_VIA] Start of block
Sep 7 08:00:00 INFO: _LOG: 3a547f956d65fe985ba189916047fc320ae150ad:
[REPLACE_VIA] 1 Via headers
Sep 7 08:00:00 INFO: _LOG: 3a547f956d65fe985ba189916047fc320ae150ad:
[REPLACE_VIA] removed Via
Sep 7 08:00:00 INFO: _LOG: 3a547f956d65fe985ba189916047fc320ae150ad:
[REPLACE_VIA] 1 Via headers
From the logs it looks like the remove_hf returns true and we have the
header removed, but its still counting the Via header and the Via Header
is still present when the INVIE is releyed on
Regards,
Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20210907/139f8fd5/attachment.htm>
More information about the sr-users
mailing list