Hi Stephen,
I have a 0.9.6 SER proxy running and one particular UA that is creating some problems with a RECORD-ROUTE header I am not handling correctly. Here is how I have my record_route configured (XXXs are replaced by my actual proxy IP):
if (!(uri=~^"sip:XXX.XXX.XXX.XXX")) { record_route_preset("XXX.XXX.XXX.XXX:5060;nat=yes"); };
When inbound traffic arrives for this particular UA, the INVITE is passed along. when the 200 OK comes back, there is a Record-Route header that looks like this (YYYs are replaced with the UA's public IP):
RECORD-ROUTE: sip:YYY.YYY.YYY.YYY:5060;lr;transport=udp
This client is really broken. Kick the a** of the vendor.
Instead of adding a new Record-Route header with my IP before this one, the message is simply proxied back to the call origination. The ACK is then sent DIRECTLY to the UA, bipassing my proxy...as well as the BYE/200 OK that terminates the call....thus rendering my stateful proxy as stateless.
Can I remove the RECORD-ROUTE that my terminating UA is attaching? If not, why am I not adding my own Record-Route header like normal?
What am I missing?
Record-Route headers are inserted into the request, the INVITE in this case, and the UAS is suppose to copy the Record-Route header from the INVITE into the reply. Which it obviously fails to do. In general a proxy like SER is not suppose to change/touch the reply ;-)
If you really have to support such a broken client, and you can get the client get fixed, I would recommend you to try to modify the Record-Route header in the on_reply route. Most likely you will have to rely on the textops module here. I'm not entirely sure if it will work, but theoretically you should be able to remove the broken Record-Route header and insert a correct one.
Greetings Nils Ohlmeier