Hello. We have two Asterisk servers 20.4.0 and I made a separate TURN/STUN server (Debian 12.5 with Coturn software).
All calls have been working for a couple of years now, but sometimes I see the following error message under the CLI:
ERROR[235487]: pjproject: <?>: icess0x7f043ce6c458 …Error sending STUN request: Network is unreachable
I thought I’d make my own STUN server: Coturn
I made the following settings under Asterisk for the STUN function:
in pjsip_wizard.conf inserted the following:
endpoint/direct_media = no
endpoint/rewrite_contact = yes
endpoint/rtp_symmetric = yes
endpoint/force_rport = yes
in res_stun_monitor.conf.conf inserted the following:
stunaddr = sturn.xxx.yy
stunrefresh = 30
in rtp.conf.conf inserted the following:
stunaddr=sturn.xxx.yy:3478
turnaddr=sturn.xxx.yy:3478
turnusername=user
turnpassword=pass
If I look at it under CLI, the module is loaded and connected to the STUN server:
Module Description Use Count Status Support Level
res_stun_monitor.so STUN Network Monitor 0 Running core
Hostname Port Period Retries Status ExternAddr ExternPort
sturn.xxx.yy 3478 30 3 OK x.y.z.v 51304
When I start a call, I see the following logged:
[2024-06-04 11:55:10] STUN Packet, msg Binding Response (0101), length: 64
[2024-06-04 11:55:10] Found STUN Attribute Mapped Address (0001), length 8
[2024-06-04 11:55:10] Ignoring STUN attribute Mapped Address (0001), length 8
[2024-06-04 11:55:10] Found STUN Attribute Source Address (0004), length 8
[2024-06-04 11:55:10] Ignoring STUN attribute Source Address (0004), length 8
[2024-06-04 11:55:10] Found STUN Attribute Changed Address (0005), length 8
[2024-06-04 11:55:10] Ignoring STUN attribute Changed Address (0005), length 8
[2024-06-04 11:55:10] Found STUN Attribute Non-RFC3489 Attribute (8022), length 24
[2024-06-04 11:55:10] Ignoring STUN attribute Non-RFC3489 Attribute (8022), length 24
[2024-06-04 11:55:10] Dunno what to do with STUN message 0101 (Binding Response)
[2024-06-04 11:55:10] -- Executing [+xxxxxxxxxxx@from-internal:1] NoOp("PJSIP/502-00000004", "Kimeno mobil hivas: +36203392836") in new stack
[2024-06-04 11:55:10] -- Executing [+xxxxxxxxxxx@from-internal:2] NoOp("PJSIP/502-00000004", "CallerID: Mekk Elek") in new stack
[2024-06-04 11:55:10] -- Executing [+xxxxxxxxxxx@from-internal:3] Gosub("PJSIP/502-00000004", "subCallrecording,s,1(+xxxxxxxxxxx)") in new stack
[2024-06-04 11:55:10] -- Executing [s@subCallrecording:1] Set("PJSIP/502-00000004", "CALLFILENAME=2024-06-04 11-55-10_502_+xxxxxxxxxxx") in new stack
[2024-06-04 11:55:10] -- Executing [s@subCallrecording:2] MixMonitor("PJSIP/502-00000004", "2024-06-04 11-55-10_502_+xxxxxxxxxxx.wav,b") in new stack
[2024-06-04 11:55:10] -- Executing [s@subCallrecording:3] Return("PJSIP/502-00000004", "") in new stack
[2024-06-04 11:55:10] == Begin MixMonitor Recording PJSIP/502-00000004
[2024-06-04 11:55:10] -- Executing [+xxxxxxxxxxx@from-internal:4] Set("PJSIP/502-00000004", "CALLERID(num)=xxxxxxxx") in new stack
[2024-06-04 11:55:10] -- Executing [+xxxxxxxxxxx@from-internal:5] Dial("PJSIP/502-00000004", "PJSIP/00xxxxxxxxxxx@invitech1,30") in new stack
[2024-06-04 11:55:10] -- Called PJSIP/00xxxxxxxxxxx@invitech1
[2024-06-04 11:55:10] STUN Packet, msg Binding Response (0101), length: 64
[2024-06-04 11:55:10] Found STUN Attribute Mapped Address (0001), length 8
[2024-06-04 11:55:10] Ignoring STUN attribute Mapped Address (0001), length 8
[2024-06-04 11:55:10] Found STUN Attribute Source Address (0004), length 8
[2024-06-04 11:55:10] Ignoring STUN attribute Source Address (0004), length 8
[2024-06-04 11:55:10] Found STUN Attribute Changed Address (0005), length 8
[2024-06-04 11:55:10] Ignoring STUN attribute Changed Address (0005), length 8
[2024-06-04 11:55:10] Found STUN Attribute Non-RFC3489 Attribute (8022), length 24
[2024-06-04 11:55:10] Ignoring STUN attribute Non-RFC3489 Attribute (8022), length 24
[2024-06-04 11:55:10] Dunno what to do with STUN message 0101 (Binding Response)
[2024-06-04 11:55:11] > 0x7f46844afc20 -- Strict RTP learning after remote address set to: 91.83.81.243:18130
[2024-06-04 11:55:11] -- PJSIP/invitech1-00000005 is making progress passing it to PJSIP/502-00000004
[2024-06-04 11:55:11] > 0x7f4684068b40 -- Strict RTP learning after remote address set to: 192.168.88.125:8000
[2024-06-04 11:55:12] > 0x7f4684068b40 -- Strict RTP qualifying stream type: audio
[2024-06-04 11:55:12] > 0x7f4684068b40 -- Strict RTP switching source address to 213.16.87.54:8000
[2024-06-04 11:55:12] > 0x7f46844afc20 -- Strict RTP switching to RTP target address 91.83.81.243:18130 as source
[2024-06-04 11:55:12] -- PJSIP/invitech1-00000005 is making progress passing it to PJSIP/502-00000004
[2024-06-04 11:55:16] > 0x7f4684068b40 -- Strict RTP learning complete - Locking on source address 213.16.87.54:8000
[2024-06-04 11:55:16] > 0x7f46844afc20 -- Strict RTP learning complete - Locking on source address 91.83.81.243:18130
[2024-06-04 11:55:18] -- PJSIP/invitech1-00000005 requested media update control 26, passing it to PJSIP/502-00000004
[2024-06-04 11:55:18] -- PJSIP/invitech1-00000005 requested media update control 26, passing it to PJSIP/502-00000004
[2024-06-04 11:55:18] -- PJSIP/invitech1-00000005 requested media update control 26, passing it to PJSIP/502-00000004
[2024-06-04 11:55:18] -- PJSIP/invitech1-00000005 requested media update control 26, passing it to PJSIP/502-00000004
[2024-06-04 11:55:18] -- PJSIP/invitech1-00000005 requested media update control 26, passing it to PJSIP/502-00000004
[2024-06-04 11:55:18] -- PJSIP/invitech1-00000005 requested media update control 26, passing it to PJSIP/502-00000004
[2024-06-04 11:55:18] -- PJSIP/invitech1-00000005 requested media update control 26, passing it to PJSIP/502-00000004
[2024-06-04 11:55:18] -- PJSIP/invitech1-00000005 requested media update control 26, passing it to PJSIP/502-00000004
[2024-06-04 11:55:18] -- PJSIP/invitech1-00000005 answered PJSIP/502-00000004
[2024-06-04 11:55:18] -- Channel PJSIP/invitech1-00000005 joined 'simple_bridge' basic-bridge <9246bad3-45b8-4b88-839c-1dd2fb11f4b6>
[2024-06-04 11:55:18] -- Channel PJSIP/502-00000004 joined 'simple_bridge' basic-bridge <9246bad3-45b8-4b88-839c-1dd2fb11f4b6>
[2024-06-04 11:55:19] STUN Packet, msg Binding Response (0101), length: 64
[2024-06-04 11:55:19] Found STUN Attribute Mapped Address (0001), length 8
[2024-06-04 11:55:19] Ignoring STUN attribute Mapped Address (0001), length 8
[2024-06-04 11:55:19] Found STUN Attribute Source Address (0004), length 8
[2024-06-04 11:55:19] Ignoring STUN attribute Source Address (0004), length 8
[2024-06-04 11:55:19] Found STUN Attribute Changed Address (0005), length 8
[2024-06-04 11:55:19] Ignoring STUN attribute Changed Address (0005), length 8
[2024-06-04 11:55:19] Found STUN Attribute Non-RFC3489 Attribute (8022), length 24
[2024-06-04 11:55:19] Ignoring STUN attribute Non-RFC3489 Attribute (8022), length 24
[2024-06-04 11:55:19] Dunno what to do with STUN message 0101 (Binding Response)
[2024-06-04 11:55:23] -- Channel PJSIP/invitech1-00000005 left 'simple_bridge' basic-bridge <9246bad3-45b8-4b88-839c-1dd2fb11f4b6>
[2024-06-04 11:55:23] -- Channel PJSIP/502-00000004 left 'simple_bridge' basic-bridge <9246bad3-45b8-4b88-839c-1dd2fb11f4b6>
[2024-06-04 11:55:23] == Spawn extension (from-internal, +36203392836, 5) exited non-zero on 'PJSIP/502-00000004'
[2024-06-04 11:55:23] == MixMonitor close filestream (mixed)
[2024-06-04 11:55:23] == End MixMonitor Recording PJSIP/502-00000004
The connection is established, there is sound on both sides (although it takes 2 seconds before the sound is heard when connecting), but it appears that Ignoring STUN attribute. Is this problem or is this normal operation?