Errors in logfile when parse r-uri sip:\@...

2009-10-16
2013-05-09
  • Hi. When i try to generate invalid r-uri:

    INVITE sip:\@DOMAIN.ru SIP/2.0.
    Via: SIP/2.0/UDP 10.2.58.80:41992;branch=z9hG4bK-d8754z-651cbc571863db1c-1--d8754z-.
    Max-Forwards: 70.
    Contact: <sip:thedeath@10.2.58.80:41992>.
    To: "\\"<sip:\@DOMAIN.ru>.
    From: "thedeath@DOMAIN.ru"<sip:thedeath@DOMAIN.ru>;tag=776bbb5e.
    Call-ID: YjNmN2Q4NzI1M2EwNTc1YzZhZjk3YWFmN2U2ZWZhN2M..
    CSeq: 1 INVITE.
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO.
    Content-Type: application/sdp.
    User-Agent: eyeBeam release 1102u stamp 52345.
    Content-Length: 365.
    .
    v=0.
    o=- 3 2 IN IP4 10.2.58.80.
    s=CounterPath eyeBeam 1.5.
    c=IN IP4 10.2.58.80.
    t=0 0.
    m=audio 10332 RTP/AVP 100 9 0 97 98 8 18 3 101.
    a=alt:1 1 : 0aQDumb9 AgKxBH97 10.2.58.80 10332.
    a=fmtp:18 annexb=yes.
    a=fmtp:101 0-15.
    a=rtpmap:100 SPEEX/16000.
    a=rtpmap:97 SPEEX/8000.
    a=rtpmap:98 iLBC/8000.
    a=rtpmap:18 G729/8000.
    a=rtpmap:101 telephone-event/8000.
    a=sendrecv.

    i get this errors in my log file:

    #Oct 16 15:14:26 sip-dev-an /usr/sbin/opensips: ERROR:core:parse_to: unexpected char  in status 6: <<"\\"<sip:>> .
    Oct 16 15:14:26 sip-dev-an /usr/sbin/opensips: ERROR:core:get_hdr_field: bad to header
    Oct 16 15:14:26 sip-dev-an /usr/sbin/opensips: INFO:core:parse_headers: bad header field
    Oct 16 15:14:26 sip-dev-an /usr/sbin/opensips: ERROR:core:parse_from_header: bad msg or missing FROM header
    Oct 16 15:14:26 sip-dev-an /usr/sbin/opensips: ERROR:core:pv_get_from_attr: cannot parse From header
    Oct 16 15:14:26 sip-dev-an /usr/sbin/opensips: ERROR:core:parse_to: unexpected char  in status 6: <<"\\"<sip:>> .
    Oct 16 15:14:26 sip-dev-an /usr/sbin/opensips: ERROR:core:get_hdr_field: bad to header
    Oct 16 15:14:26 sip-dev-an /usr/sbin/opensips: INFO:core:parse_headers: bad header field
    Oct 16 15:14:26 sip-dev-an /usr/sbin/opensips: ERROR:core:pv_get_to_attr: cannot parse To header
    Oct 16 15:14:26 sip-dev-an /usr/sbin/opensips: ERROR:core:parse_to: unexpected char  in status 6: <<"\\"<sip:>> .
    Oct 16 15:14:26 sip-dev-an /usr/sbin/opensips: ERROR:core:get_hdr_field: bad to header
    Oct 16 15:14:26 sip-dev-an /usr/sbin/opensips: INFO:core:parse_headers: bad header field
    Oct 16 15:14:26 sip-dev-an /usr/sbin/opensips: ERROR:core:pv_get_callid: cannot parse Call-Id header
    Oct 16 15:14:26 sip-dev-an /usr/sbin/opensips: INFO <- Request M=INVITE RURI=sip:\@DOMAIN.ru F=<null> T=<null> IP=10.2.58.80 ID=<null>
    Oct 16 15:14:26 sip-dev-an /usr/sbin/opensips: -- error route class=1 level=3 info=error parsing To header rcode=400 rreason=bad To header --
      ++++ recv01 telephone-event/80002.58.80 10332R, NOTIFY, MESSAGE, SUBSCRIBE, INFO4z-2] +++++ INVITE sip:\@DOMAIN.ru SIP/2.0
    Oct 16 15:14:26 sip-dev-an /usr/sbin/opensips: ERROR:core:parse_to: unexpected char  in status 6: <<"\\"<sip:>> .
    Oct 16 15:14:26 sip-dev-an /usr/sbin/opensips: ERROR:core:get_hdr_field: bad to header
    Oct 16 15:14:26 sip-dev-an /usr/sbin/opensips: INFO:core:parse_headers: bad header field
    Oct 16 15:14:26 sip-dev-an /usr/sbin/opensips: ERROR:core:parse_to: unexpected char  in status 6: <<"\\"<sip:>> .
    Oct 16 15:14:26 sip-dev-an /usr/sbin/opensips: ERROR:core:get_hdr_field: bad to header
    Oct 16 15:14:26 sip-dev-an /usr/sbin/opensips: INFO:core:parse_headers: bad header field
    Oct 16 15:14:26 sip-dev-an /usr/sbin/opensips: ERROR:core:build_res_buf_from_sip_req: parse_headers failed
    Oct 16 15:14:26 sip-dev-an /usr/sbin/opensips: ERROR:sl:sl_send_reply_helper: response building failed

    And opensips do not reply 400 to client, just silent - no reply.

    1. Is there any way to make the logger silent at this case (not at all, i want to see other error messages) in considerations of "anti-DoS" and performance?
    2. I think server SHOULD reply 400 for this message.

    opensips version 1.5.3

    Bogdan, hope for your attention.

     
  • Yes, i have tried to use error_route, but errors below still appears in logfile in addition of my xlog'ed lines.