Can I Turn Off Logging Of Invalid Packets Received By PJSIP?

Home » Asterisk Users » Can I Turn Off Logging Of Invalid Packets Received By PJSIP?
Asterisk Users 1 Comment

We get some noise in our Asterisk error file generated by scanners sending invalid invites.  Example below (details removed)

[2020-12-0702:53:30]ERROR[23370]pjproject:sip_transport.c Error processing 559 bytes packet from UDP ***********
:PJSIPsyntaxerrorexceptionwhenparsing’Request Line’header on line 1 col
12:INVITEsip:@*******SIP/2.0Via:SIP/2.0/UDP0.0.0.0:49990;branch=*****Max-Forwards:70From:;tag=*****To:Call-ID:*******CSeq:1INVITEContact:Content-Type:application/sdpContent-Length:204v=0o=@******:50601626418299INIP40.0.0.0s=pplsipc=INIP40.0.0.0tm=audio25282RTP/AVP1006083185101a=rtpmap:0pcmu/8000a=rtpmap:101telephone-event/8000a=fmtp:1010-11

This seems to be a feature added in pjsip.  While it’s often very useful to log error packers, in our case it just winds up being noise 99.9% of the time.

Is their some way to configure Asterisk or PJSIP to not log these packets as errors?  Or maybe some way to just filter them out entirely before pjsip even gets it (other than using an IP, which of course changes).

One thought on - Can I Turn Off Logging Of Invalid Packets Received By PJSIP?

  • These are deep down in the transport layer, and there’s no explicit configuration option in Asterisk or the PJSIP library itself to disable them. PJSIP appears to raise them as a normal log message at level 1.