Pjsip asterisk 18.4 tcp invite internal error

Hello I have a situation

When asterisk receive INVITE with TCP, he response 500 ERROR

<— Received SIP request (939 bytes) from TCP:177.53.246.169:51760 —>
REGISTER sip:myip.com.br;transport=tcp SIP/2.0
Allow: INVITE,BYE,REGISTER,ACK,OPTIONS,CANCEL,INFO,PRACK,SUBSCRIBE,NOTIFY,REFER,UPDATE
Authorization: Digest username=“21060007”,realm=“asterisk”,nonce=“1621455796/8a9a7368d92ab821f7c019645c11c16a”,uri=“sip:myip.com.br”,response=“7c010d84a3d1f50a6790a76a824bb603”,algorithm=MD5,cnonce=“A940D992”,opaque=“2f9df0e60434b394”,qop=auth,nc=00000001
Call-ID: WUYc04mO4GvKl:bQ@myip.com.br
Contact: sip:21060007@192.168.15.2:7048;transport=tcp;rinstance=f495a2f6e6cb7ab6
CSeq: 2123 REGISTER
Expires: 60
From: sip:21060007@myip.com.br:7048;transport=tcp;tag=0-AC1DE575
Max-Forwards: 70
Session-ID: 3e3983b1b6475086dc65a3b9db27b38e
Supported: replaces,100rel,timer,histinfo
To: sip:21060007@myip.com.br:7048;transport=tcp
Via: SIP/2.0/TCP 192.168.15.2:7048;rport;branch=z9hG4bK8A2BB82B
Content-Length: 0

<— Transmitting SIP response (506 bytes) to TCP:177.53.246.169:51760 —>
SIP/2.0 200 OK
Via: SIP/2.0/TCP 192.168.15.2:7048;rport=51760;received=177.53.246.169;branch=z9hG4bK8A2BB82B
Call-ID: WUYc04mO4GvKl:bQ@myip.com.br
From: sip:21060007@myip.com.br;tag=0-AC1DE575
To: sip:21060007@myip.com.br;tag=z9hG4bK8A2BB82B
CSeq: 2123 REGISTER
Date: Wed, 19 May 2021 20:23:16 GMT
Contact: sip:21060007@192.168.15.2:7048;transport=TCP;rinstance=f495a2f6e6cb7ab6;expires=59
Expires: 60
Server: handphone
Content-Length: 0

<— Received SIP request (1136 bytes) from TCP:177.53.246.169:51760 —>
INVITE sip:KHOMP21060007@myip.com.br:7048;transport=tcp SIP/2.0
Allow: INVITE,BYE,REGISTER,ACK,OPTIONS,CANCEL,INFO,PRACK,SUBSCRIBE,NOTIFY,REFER,UPDATE
Call-ID: 9CGsLv3UwWFPBR7t@myip.com.br
Contact: sip:21060007@192.168.15.2:7048;transport=tcp
Content-Type: application/sdp
CSeq: 2047 INVITE
From: sip:21060007@myip.com.br:7048;transport=tcp;tag=1-35AFD055
Max-Forwards: 70
P-Asserted-Identity: sip:30033003@myip.com.br:7048;transport=tcp
Session-Expires: 1800;refresher=uas
Session-ID: 987bca31a08e9b87810fc3de7e070b84
Supported: 100rel,timer,replaces,histinfo
To: sip:KHOMP21060007@myip.com.br:7048;transport=tcp
Via: SIP/2.0/TCP 192.168.15.2:7048;rport;branch=z9hG4bK3375A0D3
Content-Length: 333

v=0
o=- 43 0 IN IP4 192.168.15.2
s=-
c=IN IP4 192.168.15.2
t=0 0
m=audio 12084 RTP/AVP 8 0 18 4 2 100
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:4 G723/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:100 telephone-event/8000
a=fmtp:100 0-15
a=ptime:20
a=sendrecv
a=rtcp:12085

<— Transmitting SIP response (517 bytes) to TCP:177.53.246.169:51760 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/TCP 192.168.15.2:7048;rport=51760;received=177.53.246.169;branch=z9hG4bK3375A0D3
Call-ID: 9CGsLv3UwWFPBR7t@myip.com.br
From: sip:21060007@myip.com.br;tag=1-35AFD055
To: sip:KHOMP21060007@myip.com.br;tag=z9hG4bK3375A0D3
CSeq: 2047 INVITE
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1621455821/b3a32b0450fcc63761574d6c1503525e”,opaque=“13b73bae788d84ae”,algorithm=md5,qop=“auth”
Server: handphone
Content-Length: 0

<— Received SIP request (513 bytes) from TCP:177.53.246.169:51760 —>
ACK sip:KHOMP21060007@myip.com.br:7048;transport=tcp SIP/2.0
Call-ID: 9CGsLv3UwWFPBR7t@myip.com.br
Contact: sip:21060007@192.168.15.2:7048;transport=tcp
CSeq: 2047 ACK
From: sip:21060007@myip.com.br:7048;transport=tcp;tag=1-35AFD055
Max-Forwards: 70
Session-ID: 987bca31a08e9b87810fc3de7e070b84
To: sip:KHOMP21060007@myip.com.br;tag=z9hG4bK3375A0D3
Via: SIP/2.0/TCP 192.168.15.2:7048;rport;branch=z9hG4bK3375A0D3
Content-Length: 0

<— Received SIP request (1419 bytes) from TCP:177.53.246.169:51760 —>
INVITE sip:KHOMP21060007@myip.com.br:7048;transport=tcp SIP/2.0
Allow: INVITE,BYE,REGISTER,ACK,OPTIONS,CANCEL,INFO,PRACK,SUBSCRIBE,NOTIFY,REFER,UPDATE
Authorization: Digest username=“21060007”,realm=“asterisk”,nonce=“1621455821/b3a32b0450fcc63761574d6c1503525e”,uri=“sip:KHOMP21060007@myip.com.br”,response=“28dd9c8d675bd2ae1ab597ae33f50a33”,algorithm=MD5,cnonce=“62DAD3D”,opaque=“13b73bae788d84ae”,qop=auth,nc=00000001
Call-ID: 9CGsLv3UwWFPBR7t@myip.com.br
Contact: sip:21060007@192.168.15.2:7048;transport=tcp
Content-Type: application/sdp
CSeq: 2048 INVITE
From: sip:21060007@myip.com.br:7048;transport=tcp;tag=1-35AFD055
Max-Forwards: 70
P-Asserted-Identity: sip:30033003@myip.com.br:7048;transport=tcp
Session-Expires: 1800;refresher=uas
Session-ID: 987bca31a08e9b87810fc3de7e070b84
Supported: 100rel,timer,replaces,histinfo
To: sip:KHOMP21060007@myip.com.br:7048;transport=tcp
Via: SIP/2.0/TCP 192.168.15.2:7048;rport;branch=z9hG4bK3B79D071
Content-Length: 333

v=0
o=- 43 0 IN IP4 192.168.15.2
s=-
c=IN IP4 192.168.15.2
t=0 0
m=audio 12084 RTP/AVP 8 0 18 4 2 100
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:4 G723/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:100 telephone-event/8000
a=fmtp:100 0-15
a=ptime:20
a=sendrecv
a=rtcp:12085

<— Transmitting SIP response (383 bytes) to TCP:177.53.246.169:51760 —>
SIP/2.0 500 Internal Server Error
Via: SIP/2.0/TCP 192.168.15.2:7048;rport=51760;received=177.53.246.169;branch=z9hG4bK3B79D071
Call-ID: 9CGsLv3UwWFPBR7t@myip.com.br
From: sip:21060007@myip.com.br;tag=1-35AFD055
To: sip:KHOMP21060007@myip.com.br;tag=z9hG4bK3B79D071
CSeq: 2048 INVITE
Server: handphone
Content-Length: 0

In Debug Asterisk we have:

[May 19 17:39:34] DEBUG[31249]: res_pjsip_session.c:4225 session_on_rx_request: (null session) Request: INVITE
[May 19 17:39:34] DEBUG[31249]: res_pjsip_session.c:4059 handle_new_invite_request: Request:
[May 19 17:39:34] DEBUG[31249]: res_pjsip_session.c:4066 handle_new_invite_request: Failure in pre session setup
[May 19 17:39:34] DEBUG[31249]: res_pjsip_session.c:4245 session_on_rx_request: (null session) Handled request INVITE ? yes

I discovery if I put allow_reload=yes in transport work fine.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.