<div dir="ltr">Hello,<br>&nbsp; Im trying to hide my network topology by adding/removing Via headers. I can remove the correct header, but when adding it, in replies, im having trouble with the parse_via() function and i cant figure out where&#39;s the problem.<br>
To the moment, request are coming out from the proxy with only one Via (the proxy addr), but when replies come in, they are discarded because no 2nd via is found. So, im &quot;saving&quot; the removed Via from the request, to be inserted later in the response (using parse_via() into&nbsp; struct via_body *via2 of the sip_msg).<br>
The point is parse_via() waits 3 args: start of the header, some &quot;end&quot; pointer, and the via_body struct for saving parsed data. I think my problem is in that end pointer, as i could see in msg_parse.c:116 it is the end of the entire msg, but not sure.<br>
Ive tried many, many ways but i cant finally get via parsing OK. Im getting &quot;ERROR:core:parse_via:&nbsp; invalid via - end of header in state 14&quot; or different states (16). (i guarantee via header is well formed).<br>
<br>Could someone orientate me, to know where im failiing??<br>Askme for any extra data if you need, thanks a lot!<br><br>Francisco<br></div>