PJSIP in Asterisk 20 and Grandstream phone issue

Hey good morning

I already confured a user in PJSIP, there is

[transport-udp]
type=transport
protocol=udp ;udp,tcp,tls,ws,wss,flow
bind=0.0.0.0

[1001]
type=endpoint
transport=transport-udp
context=sip-phones
disallow=all
allow=ulaw
allow=alaw
allow=g722
auth=1001
aors=1001

[1001]
type=auth
auth_type=userpass
password=1001
username=1001

[1001]
type=aor
remove_existing=yes
max_contacts=2
contact=sip:1001@192.168.100.59:5060

The account is registered well and the phone receives the audio from the asterisk without problems, but when I talk to the phone it does not reach the asterisk, there is no firewall and the phone and the asterisk are on the same local network

There is my logger

Connected to Asterisk 20.8.1+asl3-3.0.2-1.deb12 currently running on node596481 (pid = 55958)
– Executing [596481@sip-phones:1] Ringing(“PJSIP/1001-00000001”, “”) in new stack
– Executing [596481@sip-phones:2] Answer(“PJSIP/1001-00000001”, “3000”) in new stack
[2024-07-14 08:15:02.277] WARNING[80246][C-00000013]: channel.c:1086 __ast_queue_frame: Exceptionally long voice queue length (97 voice / 97 total) queuing to PJSIP/1001-00000001
– Executing [596481@sip-phones:3] Set(“PJSIP/1001-00000001”, “NODENUM=1001”) in new stack
– Executing [596481@sip-phones:4] Rpt(“PJSIP/1001-00000001”, “596481|P”) in new stack
– Hungup ‘DAHDI/pseudo-2069275000’
node596481*CLI> pjsip set logger on
PJSIP Logging enabled
<— Received SIP request (1430 bytes) from UDP:192.168.100.59:31097 —>
INVITE sip:596481@192.168.100.28 SIP/2.0
Via: SIP/2.0/UDP 192.168.100.59:31097;branch=z9hG4bK2146822253;rport
From: sip:1001@192.168.100.28;tag=1715495761
To: sip:596481@192.168.100.28
Call-ID: 270528547-31097-24@BJC.BGI.BAA.FJ
CSeq: 230 INVITE
Contact: sip:1001@192.168.100.59:31097
X-Grandstream-PBX: true
Max-Forwards: 70
User-Agent: Grandstream GRP2602G 1.0.5.38
Privacy: none
P-Preferred-Identity: sip:1001@192.168.100.28
P-Access-Network-Info: IEEE-EUI-48;eui-48-addr=90-3F-EA-CC-BF-FE
P-Emergency-Info: IEEE-EUI-48;eui-48-addr=C0-74-AD-D1-7F-F7
Supported: replaces, path
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Type: application/sdp
Accept: application/sdp, application/dtmf-relay
Content-Length: 633

v=0
o=1001 8000 8000 IN IP4 192.168.100.59
s=SIP Call
c=IN IP4 192.168.100.59
t=0 0
m=audio 40390 RTP/AVP 18 0 8 4 9 97 2 123 101 121 124
a=sendrecv
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=ptime:20
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:4 G723/8000
a=fmtp:4 annexa=no; bitrate=5.3
a=rtpmap:9 G722/8000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=30
a=rtpmap:2 G726-32/8000
a=rtpmap:123 opus/48000/2
a=fmtp:123 useinbandfec=1; sprop-maxcapturerate=16000; stereo=0; sprop-stereo=0
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=rtpmap:121 GS-FEC/19200
a=fmtp:121 version=2
a=rtpmap:124 RED/19200

<— Transmitting SIP response (507 bytes) to UDP:192.168.100.59:31097 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.100.59:31097;rport=31097;received=192.168.100.59;branch=z9hG4bK2146822253
Call-ID: 270528547-31097-24@BJC.BGI.BAA.FJ
From: sip:1001@192.168.100.28;tag=1715495761
To: sip:596481@192.168.100.28;tag=z9hG4bK2146822253
CSeq: 230 INVITE
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1720959376/638a6f4b9660fb7e204f3b38a9c5021e”,opaque=“548273be68690acd”,algorithm=MD5,qop=“auth”
Server: Asterisk PBX 20.8.1+asl3-3.0.2-1.deb12
Content-Length: 0

<— Received SIP request (292 bytes) from UDP:192.168.100.59:31097 —>
ACK sip:596481@192.168.100.28 SIP/2.0
Via: SIP/2.0/UDP 192.168.100.59:31097;branch=z9hG4bK2146822253;rport
From: sip:1001@192.168.100.28;tag=1715495761
To: sip:596481@192.168.100.28;tag=z9hG4bK2146822253
Call-ID: 270528547-31097-24@BJC.BGI.BAA.FJ
CSeq: 230 ACK
Content-Length: 0

<— Received SIP request (1701 bytes) from UDP:192.168.100.59:31097 —>
INVITE sip:596481@192.168.100.28 SIP/2.0
Via: SIP/2.0/UDP 192.168.100.59:31097;branch=z9hG4bK918292478;rport
From: sip:1001@192.168.100.28;tag=1715495761
To: sip:596481@192.168.100.28
Call-ID: 270528547-31097-24@BJC.BGI.BAA.FJ
CSeq: 231 INVITE
Contact: sip:1001@192.168.100.59:31097
Authorization: Digest username=“1001”, realm=“asterisk”, nonce=“1720959376/638a6f4b9660fb7e204f3b38a9c5021e”, uri="sip:596481@192.168.100.28", response=“7be75df59cd0859424b45d0c5584781d”, algorithm=MD5, cnonce=“09463107”, opaque=“548273be68690acd”, qop=auth, nc=00000001
X-Grandstream-PBX: true
Max-Forwards: 70
User-Agent: Grandstream GRP2602G 1.0.5.38
Privacy: none
P-Preferred-Identity: sip:1001@192.168.100.28
P-Access-Network-Info: IEEE-EUI-48;eui-48-addr=90-3F-EA-CC-BF-FE
P-Emergency-Info: IEEE-EUI-48;eui-48-addr=C0-74-AD-D1-7F-F7
Supported: replaces, path
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Type: application/sdp
Accept: application/sdp, application/dtmf-relay
Content-Length: 633

v=0
o=1001 8000 8000 IN IP4 192.168.100.59
s=SIP Call
c=IN IP4 192.168.100.59
t=0 0
m=audio 40390 RTP/AVP 18 0 8 4 9 97 2 123 101 121 124
a=sendrecv
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=ptime:20
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:4 G723/8000
a=fmtp:4 annexa=no; bitrate=5.3
a=rtpmap:9 G722/8000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=30
a=rtpmap:2 G726-32/8000
a=rtpmap:123 opus/48000/2
a=fmtp:123 useinbandfec=1; sprop-maxcapturerate=16000; stereo=0; sprop-stereo=0
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=rtpmap:121 GS-FEC/19200
a=fmtp:121 version=2
a=rtpmap:124 RED/19200

<— Transmitting SIP response (332 bytes) to UDP:192.168.100.59:31097 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.100.59:31097;rport=31097;received=192.168.100.59;branch=z9hG4bK918292478
Call-ID: 270528547-31097-24@BJC.BGI.BAA.FJ
From: sip:1001@192.168.100.28;tag=1715495761
To: sip:596481@192.168.100.28
CSeq: 231 INVITE
Server: Asterisk PBX 20.8.1+asl3-3.0.2-1.deb12
Content-Length: 0

-- Executing [596481@sip-phones:1] Ringing("PJSIP/1001-00000002", "") in new stack
-- Executing [596481@sip-phones:2] Answer("PJSIP/1001-00000002", "3000") in new stack

<— Transmitting SIP response (527 bytes) to UDP:192.168.100.59:31097 —>
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.100.59:31097;rport=31097;received=192.168.100.59;branch=z9hG4bK918292478
Call-ID: 270528547-31097-24@BJC.BGI.BAA.FJ
From: sip:1001@192.168.100.28;tag=1715495761
To: sip:596481@192.168.100.28;tag=8de38c40-dbd6-405e-8285-f719f89f6b49
CSeq: 231 INVITE
Server: Asterisk PBX 20.8.1+asl3-3.0.2-1.deb12
Contact: sip:192.168.100.28:5060
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER
Content-Length: 0

<— Transmitting SIP response (881 bytes) to UDP:192.168.100.59:31097 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.100.59:31097;rport=31097;received=192.168.100.59;branch=z9hG4bK918292478
Call-ID: 270528547-31097-24@BJC.BGI.BAA.FJ
From: sip:1001@192.168.100.28;tag=1715495761
To: sip:596481@192.168.100.28;tag=8de38c40-dbd6-405e-8285-f719f89f6b49
CSeq: 231 INVITE
Server: Asterisk PBX 20.8.1+asl3-3.0.2-1.deb12
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER
Contact: sip:192.168.100.28:5060
Supported: 100rel, timer, replaces, norefersub
Content-Type: application/sdp
Content-Length: 277

v=0
o=- 8000 8002 IN IP4 192.168.100.28
s=Asterisk
c=IN IP4 192.168.100.28
t=0 0
m=audio 11306 RTP/AVP 0 8 9 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:140
a=sendrecv

<— Received SIP request (555 bytes) from UDP:192.168.100.59:31097 —>
ACK sip:192.168.100.28:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.100.59:31097;branch=z9hG4bK1773631379;rport
From: sip:1001@192.168.100.28;tag=1715495761
To: sip:596481@192.168.100.28;tag=8de38c40-dbd6-405e-8285-f719f89f6b49
Call-ID: 270528547-31097-24@BJC.BGI.BAA.FJ
CSeq: 231 ACK
Contact: sip:1001@192.168.100.59:31097
X-Grandstream-PBX: true
Max-Forwards: 70
Supported: replaces, path
User-Agent: Grandstream GRP2602G 1.0.5.38
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0

[2024-07-14 08:16:19.441] WARNING[80283][C-00000014]: channel.c:1086 __ast_queue_frame: Exceptionally long voice queue length (97 voice / 97 total) queuing to PJSIP/1001-00000002
– Executing [596481@sip-phones:3] Set(“PJSIP/1001-00000002”, “NODENUM=1001”) in new stack
– Executing [596481@sip-phones:4] Rpt(“PJSIP/1001-00000002”, “596481|P”) in new stack
[2024-07-14 08:17:26.441] NOTICE[55982]: dnsmgr.c:225 dnsmgr_refresh: dnssrv: host ‘register.allstarlink.org’ changed from 34.105.111.212:443 to 162.248.92.131:443

What can I do, what I missed in Astersik or my phone Grandstream GRP2602 ?

Thanks in advanced, nice weekend

Something is sending media without anything having been started on the channel.

You are running third party code (app_rpt.c), although it looks like the queue overrun has already happened.

app_rpt has not returned control to the dialplan.

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