Hi I see that when kamailio adds rport to the Via header field of a request that has two Via values on the same line (comma-separated, of course), it adds the rport (and received) to the wrong value.
I have this test kamailio.cfg for demonstration.
children=1 loadmodule "sl" loadmodule "textops" loadmodule "nathelper" request_route { force_rport(); sl_send_reply(200, "OK"); }
I send this OPTIONS (truncated) and get this response (truncated). The rport should be on the first Via value, not the second.
OPTIONS sip:server SIP/2.0 Via: SIP/2.0/UDP 3.9.4.2:5060;branch=z9hG4bK503983089,SIP/2.0/UDP 1.3.4.1:5060;branch=z9hG4bK53805983059 From: sip:client;tag=LeonhardEuler To: sip:server
SIP/2.0 200 OK Via: SIP/2.0/UDP 3.9.4.2:5060;branch=z9hG4bK503983089,SIP/2.0/UDP 1.3.4.1:5060;branch=z9hG4bK53805983059;rport=53805;received=127.0.0.1 From: sip:client;tag=LeonhardEuler To: sip:server;tag=9dd61ff61e802d8e2bef5f14621ef3c2.49678e65 Server: kamailio (6.0.0-pre0 (x86_64/linux))
I've tested this with the latest commit (c994fb8) from kamailio. I can't think how this can be anything other than a bug. Should I log a bug report for this?
James