Hi!
I've handcrafted a REGISTER that contains a negative Content-Length:
from ngrep: # U x.x.x.x:5060 -> y.y.y.y:5060 REGISTER sip:123@mydomain.net SIP/2.0. Via: SIP/2.0/UDP x.x.x.x:5060. From: 123 sip:123@mydomain.net:5060;tag=33. To: 123 sip:123@mydomain.net:5060. Call-ID: 33-11277@x.x.x.x. CSeq: 1 REGISTER. Contact: sip:123@x.x.x.x:5060. Content-Length: -1000. Expires: 300.
syslog content:
Aug 31 11:04:48 xxx ser[3866]: ERROR:parse_content_length: parse error near char [45][-] Aug 31 11:04:48 xxx ser[3866]: ERROR:get_hdr_field: bad content_length header Aug 31 11:04:48 xxx ser[3866]: ERROR: build_res_buf_from_sip_req: alas, parse_headers failed Aug 31 11:04:48 xxx ser[3866]: pre_auth(): Error while sending 400 reply
So the parser works fine but I cannot send an error message to prevent retransmissions from the UAC. The same is true for alphanumeric characters within the Content-Length: value.
To test the Content-Length stuff even more I've set the Content-Length within the REGISTER to 1000 which yields a 'ERROR: t_newtran: EoH not parsed' warning but SER still sends the 407 that I was hoping for.
Now the question is if there is any way to add something like a failure_route block to allow logging and sending a generic or customized 4xx/5xx error message to prevent retransmissions.
Btw: My config is far from a stock one but it all comes down to a standard REGISTER with radius_www_authorize() in the REGISTER block.
Any help appreciated, Hendrik