[Kamailio-Devel] parse_via()

Francisco Seratti fseratti at gmail.com
Tue Sep 16 17:05:21 CEST 2008


Hello,
  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's the
problem.
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 "saving" the removed Via from the request, to be inserted
later in the response (using parse_via() into  struct via_body *via2 of the
sip_msg).
The point is parse_via() waits 3 args: start of the header, some "end"
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.
Ive tried many, many ways but i cant finally get via parsing OK. Im getting
"ERROR:core:parse_via:  invalid via - end of header in state 14" or
different states (16). (i guarantee via header is well formed).

Could someone orientate me, to know where im failiing??
Askme for any extra data if you need, thanks a lot!

Francisco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kamailio.org/pipermail/devel/attachments/20080916/fca6e63a/attachment.html 


More information about the Devel mailing list