Error to authenticate in PJSIP after change router and Internet provider

After I changed my internet provider and the router equipament I cant connect into my Asterisk PJSIP server. I already tried with GrandStream IP telephone, GS WAVE Android APP and X-Lite… all the same error like bellow:

Using another network it works. Anyone know this kind of error?

[Aug  9 15:00:39] ERROR[23267]: pjproject:0 <?>:                  sip_parser.c Error parsing '15227227': String value was greater than the maximum allowed value.
[Aug  9 15:00:39] ERROR[23267]: pjproject:0 <?>:               sip_transport.c Error processing 604 bytes packet from UDP 187.255.143.127:15227 : PJSIP invalid value error exception when parsing 'Via' header on line 2 col 42:
REGISTER sip:sip.solaristelecom.com SIP/2.0
Via: SIP/2.0/UDP 187.255.143.127:15227227;branch=z9hG4bK545324659;rport
From: <sip:47001006@sip.XXXX.com>;tag=452799041
To: <sip:47001006@sip.XXXX.com>
Call-ID: 1155581197-15227-1@BJC.BGI.A.BB
CSeq: 2000 REGISTER
Contact: <sip:47001006@187.255.143.127:15227>;reg-id=1;+sip.instance="<urn:uuid:00000000-0000-1000-8000-000B82073075>"
Max-Forwards: 70
User-Agent: Grandstream Wave 1.0.3.10
Supported: path
Expires: 3600
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0


-- end of packet.
[Aug  9 15:00:43] ERROR[23267]: pjproject:0 <?>:                  sip_parser.c Error parsing '15227227': String value was greater than the maximum allowed value.
[Aug  9 15:00:43] ERROR[23267]: pjproject:0 <?>:               sip_transport.c Error processing 604 bytes packet from UDP 187.255.143.127:15227 : PJSIP invalid value error exception when parsing 'Via' header on line 2 col 42:
REGISTER sip:sip.solaristelecom.com SIP/2.0
Via: SIP/2.0/UDP 187.255.143.127:15227227;branch=z9hG4bK545324659;rport
From: <sip:47001006@sip.XXXX.com>;tag=452799041
To: <sip:47001006@sip.XXXX.com>
Call-ID: 1155581197-15227-1@BJC.BGI.A.BB
CSeq: 2000 REGISTER
Contact: <sip:47001006@187.255.143.127:15227>;reg-id=1;+sip.instance="<urn:uuid:00000000-0000-1000-8000-000B82073075>"
Max-Forwards: 70
User-Agent: Grandstream Wave 1.0.3.10
Supported: path
Expires: 3600
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0

The invalid port number is fairly obvious. The maximum possible value is 65535.

@david551
very strange because I didn’t defined this port 15227227

looks like the packet is changed inside the transmission… is it possible?

some routers have an ALG feature, that is supposed to fix the SIP, but quite often has been known to break it. If such function exists on your router, you may want to disable it.

Thanks for the answer. I put the ALG setting to off and not it’s working for the Android APP and for the X-Lite.

But my IP telephone it’s causing a really problem in my network, when I connect in the router the signal of the wi-fi is interrupted and all equipaments connected is dropped.

[Aug  9 19:43:19] ERROR[23267]: pjproject:0 <?>:               sip_transport.c Error processing 947 bytes packet from UDP 187.255.143.127:5060 : PJSIP syntax error exception when parsing 'Via' header on line 2 col 25:
REGISTER sip:sip.solaristelecom.com SIP/2.0
Via: SIP/2.0/UDP 2804:14c:cc92:87a4:20b:82ff:feb5:aa83:5060;branch=z9hG4bK95555696;rport
From: <sip:47001006@sip.XXX.com>;tag=474554849
To: <sip:47001006@sip.XXX.com>
Call-ID: 181390253-5060-1@CIAE:BEc:ccJC:IHaE:CAb:ICff:febF:aaID
CSeq: 2067 REGISTER
Contact: <sip:47001006@[2804:14c:cc92:87a4:20b:82ff:feb5:aa83]:5060>;reg-id=1;+sip.instance="<urn:uuid:00000000-0000-1000-8000-000B82B5AA83>"
Authorization: Digest username="47001006", realm="asterisk", nonce="1533854597/bdbabe0abeeba5fbc253fe4fedd9229b", uri="sip:sip.XXX.com", response="ab6c7831697fb5e1dc47606107f69a30", algorithm=md5, cnonce="11092618", opaque="43e33cea771b82a0", qop=auth, nc=00000001
Max-Forwards: 70
User-Agent: Grandstream GXP1625 1.0.4.55
Supported: path
Expires: 3600
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0

-- end of packet.

The modem is the brand HUMAX model HGB10R-02. setting is:

Looks like different error.

I was checking and now looks like a IPV6 problem, the IP telephone it’s trying to connect with the server using IPVC6, but I really don’t know if my server is preparated to work with it? how can I confirm if ok?
Can I disable the IPV6 to force to use IPV4?

It appears as though the traffic is coming in over IPv4, but there is IPv6 in the SIP message which PJSIP doesn’t like or expect it seems.

Yes jcolp, my internet provider deliver and arrive in my house IPV4 but in my new router become IPV6… all equipaments in my house its connecting in the router with IPV4(internal network behind NAT) and is working well, only the IP telephone is trying to connect in the router using IPV6 and is not working and drop completely the router.

In addition: when I put the telephone behind another router, using 2 router, the IP connect and works well.