Error to connect a PBX central "Intelbras Impacta" in Asterisk PJSIP

My Asterisk PBX with PJSIP is returning the error bellow when I tried to connect using a PBX central “Intelbras Impacta” - looks like the packages are changed,

[Jan 17 13:11:43] ERROR[9973]: pjproject:0 <?>: sip_parser.c Error parsing ‘506060’: String value was greater than the maximum allowed value.
[Jan 17 13:11:43] ERROR[9973]: pjproject:0 <?>: sip_transport.c Error processing 455 bytes packet from UDP : PJSIP invalid value error exception when parsing ‘Via’ header on line 6 col 39:
Call-ID: Yi*
Via: SIP/2.0/UDP;branch=z9hG4bKrE0f2-MVUoh0pxW
Contact: 19009001sip:19009001@
Max-Forwards: 70
User-Agent: INTELBRAS IMPACTA - Jun 20 2013
Expires: 3600
Content-Length: 0

Someone know it?

The SIP request is malformed. It has the port as “506060” which is outside of what it can be.

Yes, but what can do that, the port add in the connection was 5060.

Is it possible be caused by the router ?

If it has some sort of ALG yes. You’d need to isolate and track down the source. The message you see in the Asterisk log is what was received, untouched.

ALG was disabled, but the packet is changed yet. But why using another pbx voip provider was being used normally?

It’s weird when I add my Asterisk PJSIP server the problem started.

Neither Asterisk nor PJSIP is sending this malformed request, so the problem doesn’t start with or belong to them.

If something else parses this REGISTER, it’s only because that something else is ignoring the invalid port in the Via. That’s not a good thing to do though. This port declaration is clearly out of bounds.

Yes, I understand but why was working with another pbx solution ?

Anyone think that I triy to setup the connection in IAX2 could solve this issue?

IAX2 is not SIP, and does not place such IP addresses/ports in the signaling to such a degree, so it likely would not suffer the same thing. “Intelbras Impacta” would need to support it though…

Indeed the PBX “Intelbras Impacta” didn’t support IAX2.


And if I enable TLS, may it could solve because the register is different? what do you think?

If it is not the result of the source, then yes, TLS would also likely resolve it.

Is it possible set TLS only for one endpoint and for others no?

I use PJSIP with ARA.

Yes. The SIP URI determines the transport in use[1]. Adding “;transport=tls” would cause it to use TLS for SIP requests that use the SIP URI.


To use it I need to create a certificate and connect in another port, right?

Yes. There is a guide on the wiki[1]. It also requires support again on the remote side.


I am using the guide… thank you so much for the help.

Well, using tls I should to install the certificate in the endpoint too or no ?

You can if you want… or don’t use client certificates and verification.

well, then I can connect without certificate, this is not obligate in TLS?

or the server side certificate is always required

Server side is required. Client side certificate is not required, depends on the deployment and purpose.