Direct media setup didn't sending the Re-INVITE

[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0:5060
local_net=10.10.1.xxx/24


[4072]
type=aor
max_contacts=1
remove_existing=yes
default_expiration=172800
maximum_expiration=172800
[4072]
type=auth
auth_type=userpass
username=4072
password=xxxxxx
[4072]
type=endpoint
aors=4072
auth=4072
context=pushkit
disallow=all
allow=opus,alaw
allow=vp8,h264
direct_media=yes
direct_media_glare_mitigation=outgoing
direct_media_method=reinvite


[4071]
type=auth
auth_type=userpass
username=4071
password=xxxxx
[4071]
type=endpoint
aors=4071
auth=4071
context=pushkit
disallow=all
allow=opus,alaw
allow=vp8,h264
direct_media=yes
direct_media_glare_mitigation=outgoing
direct_media_method=reinvite

This is my direct media configuration when the call is established, and it didn’t send the re-invite to the SIP endpoints, and direct_media didn’t occur.

exten => _X.,1,NoOp(PJSIP/${EXTEN} has state ${DEVICE_STATE(PJSIP/${EXTEN})})
same => n,SET(callerNameFromHeader=${PJSIP_HEADER(read,From)})
same => n,SET(callerName=${CUT(callerNameFromHeader,\",2)})
same => n,NoOp(Caller Name of CALLERID: ${CALLERID(num)} is: ${callerName})
same => n,SET(CALLERID(name)=${callerName})
same => n,SET(caller=${CALLERID(num)})
same => n,SET(callee=${EXTEN})
same => n,SET(ringtime=28)
same => n,GotoIf($[${DEVICE_STATE(PJSIP/${EXTEN})}=NOT_INUSE]?callsuccess:callbusy)
same => n(callsuccess),Goto(State,1)
same => n(callbusy),Goto(State,3)

exten =>State,3,Busy(10)
exten =>State,n,Hangup()

exten => State,1,Dial(PJSIP/${callee},${ringtime})
exten => State,n,Goto(h,1)

exten => h,1,NoOp(Dial Status is ${DIALSTATUS})
exten => h,2,NoOp(Hangup cause is ${HANGUPCAUSE})
exten => h,3,Hangup()

Also this is my dialplan we are using but I didn’t know why could be able to see the Re-Invite and connecting the direct media from peer to peer and checked the all of documentation but i didn’t enable the dtmf also i could see the “bridge_native_rtp.so” also loaded in the asterisk

If you enable debug logging[1] then the bridge_native_rtp module will tell you usually why it didn’t.

[1] Collecting Debug Information - Asterisk Documentation

 bridge_native_rtp.c: Bridge '79fbe2ec-11ab-41d6-84cf-a17639892d81' can not use native RTP bridge as two channels are required

this is what I observed here

That’s a single line, which will occur when the first channel enters the bridge because it does require two channels. Further down there would be more.

[2025-11-17 16:36:39] DEBUG[829401][C-00000004] stasis.c: Topic 'bridge:all/bridge:79fbe2ec-11ab-41d6-84cf-a17639892d81': 0x7fc83c014c00 created
[2025-11-17 16:36:39] DEBUG[829401][C-00000004] bridge.c: Bridge 79fbe2ec-11ab-41d6-84cf-a17639892d81(<unknown>)(0x7fc83c010a30): base_init
[2025-11-17 16:36:39] DEBUG[829401][C-00000004] bridge_native_rtp.c: Bridge '79fbe2ec-11ab-41d6-84cf-a17639892d81' can not use native RTP bridge as two channels are required
[2025-11-17 16:36:39] DEBUG[829401][C-00000004] bridge.c: Bridge technology native_rtp is not compatible with properties of existing bridge.
[2025-11-17 16:36:39] DEBUG[829401][C-00000004] bridge.c: Bridge technology holding_bridge does not have any capabilities we want.
[2025-11-17 16:36:39] DEBUG[829401][C-00000004] bridge.c: Bridge technology softmix has less preference than simple_bridge (10 <= 50). Skipping.
[2025-11-17 16:36:39] DEBUG[829401][C-00000004] bridge.c: Chose bridge technology simple_bridge
[2025-11-17 16:36:39] DEBUG[829401][C-00000004] bridge.c: Bridge 79fbe2ec-11ab-41d6-84cf-a17639892d81: calling simple_bridge technology constructor
[2025-11-17 16:36:39] DEBUG[829401][C-00000004] bridge.c: Bridge 79fbe2ec-11ab-41d6-84cf-a17639892d81: calling simple_bridge technology start
[2025-11-17 16:36:39] DEBUG[829401][C-00000004] bridge.c: Bridge 79fbe2ec-11ab-41d6-84cf-a17639892d81(<unknown>)(0x7fc83c010a30): base_init complete
[2025-11-17 16:36:39] DEBUG[829401][C-00000004] bridge.c: Bridge 79fbe2ec-11ab-41d6-84cf-a17639892d81(<unknown>)(0x7fc83c010a30): registering
[2025-11-17 16:36:39] DEBUG[829401][C-00000004] stasis_bridges.c: Update: 0x7fc83c00fb78  Old: <none>  New: 79fbe2ec-11ab-41d6-84cf-a17639892d81
[2025-11-17 16:36:39] DEBUG[829401][C-00000004] stasis_bridges.c: Update: 0x7fc83c00fb78  Old: <none>  New: 79fbe2ec-11ab-41d6-84cf-a17639892d81
[2025-11-17 16:36:39] DEBUG[829560][C-00000004] bridge_channel.c: Bridge 79fbe2ec-11ab-41d6-84cf-a17639892d81: 0x7fc83c017ed0(PJSIP/4001-00000007) is joining
[2025-11-17 16:36:39] DEBUG[829560][C-00000004] bridge_channel.c: Bridge 79fbe2ec-11ab-41d6-84cf-a17639892d81: pushing 0x7fc83c017ed0(PJSIP/4001-00000007)
[2025-11-17 16:36:39] DEBUG[829560][C-00000004] stasis_bridges.c: Update: 0x7fc844022cf8  Old: 79fbe2ec-11ab-41d6-84cf-a17639892d81  New: 79fbe2ec-11ab-41d6-84cf-a17639892d81
[2025-11-17 16:36:39] DEBUG[829560][C-00000004] stasis_bridges.c: Update: 0x7fc844022cf8  Old: 79fbe2ec-11ab-41d6-84cf-a17639892d81  New: 79fbe2ec-11ab-41d6-84cf-a17639892d81
[2025-11-17 16:36:39] DEBUG[829560][C-00000004] bridge_native_rtp.c: Bridge '79fbe2ec-11ab-41d6-84cf-a17639892d81' can not use native RTP bridge as two channels are required
[2025-11-17 16:36:39] DEBUG[829560][C-00000004] bridge.c: Bridge technology native_rtp is not compatible with properties of existing bridge.
[2025-11-17 16:36:39] DEBUG[829560][C-00000004] bridge.c: Bridge technology holding_bridge does not have any capabilities we want.
[2025-11-17 16:36:39] DEBUG[829560][C-00000004] bridge.c: Bridge technology softmix does not have any capabilities we want.
[2025-11-17 16:36:39] DEBUG[829560][C-00000004] bridge.c: Chose bridge technology simple_bridge
[2025-11-17 16:36:39] DEBUG[829560][C-00000004] bridge.c: Bridge 79fbe2ec-11ab-41d6-84cf-a17639892d81 is already using the new technology.
[2025-11-17 16:36:39] DEBUG[829560][C-00000004] bridge.c: Bridge 79fbe2ec-11ab-41d6-84cf-a17639892d81: 0x7fc83c017ed0(PJSIP/4001-00000007) is joining simple_bridge technology
[2025-11-17 16:36:39] DEBUG[829560][C-00000004] stasis_bridges.c: Update: 0x7fc844001678  Old: 79fbe2ec-11ab-41d6-84cf-a17639892d81  New: 79fbe2ec-11ab-41d6-84cf-a17639892d81
[2025-11-17 16:36:39] DEBUG[829560][C-00000004] stasis_bridges.c: Update: 0x7fc844001678  Old: 79fbe2ec-11ab-41d6-84cf-a17639892d81  New: 79fbe2ec-11ab-41d6-84cf-a17639892d81
[2025-11-17 16:36:39] DEBUG[829560][C-00000004] chan_pjsip.c:  PJSIP/4001-00000007: Indicated Media SSRC change
[2025-11-17 16:36:39] DEBUG[829560][C-00000004] chan_pjsip.c:  PJSIP/4001-00000007
[2025-11-17 16:36:39] DEBUG[829401][C-00000004] bridge_channel.c: Bridge 79fbe2ec-11ab-41d6-84cf-a17639892d81: 0x7fc83c00ef60(PJSIP/4002-00000006) is joining
[2025-11-17 16:36:39] DEBUG[829401][C-00000004] bridge_channel.c: Bridge 79fbe2ec-11ab-41d6-84cf-a17639892d81: pushing 0x7fc83c00ef60(PJSIP/4002-00000006)
[2025-11-17 16:36:39] DEBUG[765289] cdr.c: Finalized CDR for PJSIP/4001-00000007 - start 1763377597.314503 answer 1763377599.358355 end 1763377599.362122 dur 2.047 bill 0.003 dispo ANSWERED
[2025-11-17 16:36:39] DEBUG[829401][C-00000004] stasis_bridges.c: Update: 0x7fc83c016608  Old: 79fbe2ec-11ab-41d6-84cf-a17639892d81  New: 79fbe2ec-11ab-41d6-84cf-a17639892d81
[2025-11-17 16:36:39] DEBUG[829401][C-00000004] stasis_bridges.c: Update: 0x7fc83c016608  Old: 79fbe2ec-11ab-41d6-84cf-a17639892d81  New: 79fbe2ec-11ab-41d6-84cf-a17639892d81
[2025-11-17 16:36:39] DEBUG[829401][C-00000004] bridge_native_rtp.c: Bridge '79fbe2ec-11ab-41d6-84cf-a17639892d81'.  Checking compatability for channels 'PJSIP/4001-00000007' and 'PJSIP/4002-00000006'
[2025-11-17 16:36:39] DEBUG[829401][C-00000004] bridge_native_rtp.c: Bridge '79fbe2ec-11ab-41d6-84cf-a17639892d81' can not use native RTP bridge as it was forbidden while getting details
[2025-11-17 16:36:39] DEBUG[829401][C-00000004] bridge.c: Bridge technology native_rtp is not compatible with properties of existing bridge.
[2025-11-17 16:36:39] DEBUG[829401][C-00000004] bridge.c: Bridge technology holding_bridge does not have any capabilities we want.
[2025-11-17 16:36:39] DEBUG[829401][C-00000004] bridge.c: Bridge technology softmix does not have any capabilities we want.
[2025-11-17 16:36:39] DEBUG[829401][C-00000004] bridge.c: Chose bridge technology simple_bridge
[2025-11-17 16:36:39] DEBUG[829401][C-00000004] bridge.c: Bridge 79fbe2ec-11ab-41d6-84cf-a17639892d81 is already using the new technology.
[2025-11-17 16:36:39] DEBUG[829401][C-00000004] bridge.c: Bridge 79fbe2ec-11ab-41d6-84cf-a17639892d81: 0x7fc83c00ef60(PJSIP/4002-00000006) is joining simple_bridge technology
[2025-11-17 16:36:39] DEBUG[829401][C-00000004] channel.c: Channel PJSIP/4002-00000006 setting read format path: opus -> opus
[2025-11-17 16:36:39] DEBUG[829401][C-00000004] channel.c: Channel PJSIP/4001-00000007 setting write format path: opus -> opus
[2025-11-17 16:36:39] DEBUG[829401][C-00000004] channel.c: Channel PJSIP/4001-00000007 setting read format path: opus -> opus
[2025-11-17 16:36:39] DEBUG[829401][C-00000004] channel.c: Channel PJSIP/4002-00000006 setting write format path: opus -> opus

Okay, I added the bridge logs and debug logs here

You’ve provided endpoint configuration for two endpoints which aren’t the ones in the bridge.

Additionally, if video has been negotiated then direct media is not supported.

The video has been disabled now. the direct media is working now, but I couldn’t get the audio. Is there any module to look at the Asterisk debug logs to look upon to check why the audio is not heard ?

The only place to look is at the SDP involved and confirm the IP addresses+ports+codecs, otherwise there is nothing. Once direct media re-INVITEs happen then Asterisk is out of the loop on media and it can’t see/know anything further.