Unable to get video call (using chan_pjsip) to work with direct_media

Hi!

I am in the process of migrating from chan_sip to chan_pjsip, in the context of upgrading to Asterisk version 22.
Testing a very basic scenario (call between two peers in the same LAN) I noticed that direct media is used only when making a pure audio call. When making a video call between the same endpoints, RTP always goes via asterisk.

When enabling debug, I observed that “simple_bridge” is selected, as “native_rtp” bridge was “forbidden”:

[May 4 17:47:45] DEBUG[69281][C-00000003] bridge_native_rtp.c: Bridge ‘8a1cf3b8-f434-4949-98dd-8733d3243412’. Checking compatability for channels ‘PJSIP/1973-00000005’ and ‘PJSIP/1976-00000004’
[May 4 17:47:45] DEBUG[69136] cdr.c: Finalized CDR for PJSIP/1973-00000005 - start 1746370063.575195 answer 1746370065.574916 end 1746370065.580569 dur 2.005 bill 0.005 dispo ANSWERED
[May 4 17:47:45] DEBUG[69281][C-00000003] bridge_native_rtp.c: Bridge ‘8a1cf3b8-f434-4949-98dd-8733d3243412’ can not use native RTP bridge as it was forbidden while getting details
[May 4 17:47:45] DEBUG[69281][C-00000003] bridge.c: Bridge technology native_rtp is not compatible with properties of existing bridge.
[May 4 17:47:45] DEBUG[69281][C-00000003] bridge.c: Bridge technology holding_bridge does not have any capabilities we want.
[May 4 17:47:45] DEBUG[69281][C-00000003] bridge.c: Bridge technology softmix does not have any capabilities we want.
[May 4 17:47:45] DEBUG[69281][C-00000003] bridge.c: Chose bridge technology simple_bridge

… while for an audio-only call, the native_rtp bridge is selected, and it works well (i.e. direct media is set up):

[May 4 17:19:05] DEBUG[68877][C-00000006] bridge_native_rtp.c: Bridge ‘82cfffd1-aec6-4765-8cec-4a7fe7d49e3e’. Checking compatability for channels ‘PJSIP/1973-0000000b’ and ‘PJSIP/1976-0000000a’
[May 4 17:19:05] DEBUG[68877][C-00000006] chan_pjsip.c: PJSIP/1973-0000000b Native formats (ulaw)
[May 4 17:19:05] DEBUG[68877][C-00000006] chan_pjsip.c:
[May 4 17:19:05] DEBUG[68877][C-00000006] chan_pjsip.c: PJSIP/1976-0000000a Native formats (ulaw)
[May 4 17:19:05] DEBUG[68877][C-00000006] chan_pjsip.c:
[May 4 17:19:05] DEBUG[68877][C-00000006] bridge_native_rtp.c: Symmetric ptimes on the two call legs (0). May be able to native bridge in RTP
[May 4 17:19:05] DEBUG[68877][C-00000006] bridge_native_rtp.c: Bridge ‘82cfffd1-aec6-4765-8cec-4a7fe7d49e3e’: Packetization comparison success between RTP streams (read_ptime0:20 == write_ptime1:20 and read_ptime1:20 == write_ptime0:20).
[May 4 17:19:05] DEBUG[68877][C-00000006] bridge.c: Bridge technology simple_bridge has less preference than native_rtp (50 <= 90). Skipping.
[May 4 17:19:05] DEBUG[68877][C-00000006] bridge.c: Bridge technology holding_bridge does not have any capabilities we want.
[May 4 17:19:05] DEBUG[68877][C-00000006] bridge.c: Bridge technology softmix does not have any capabilities we want.
[May 4 17:19:05] DEBUG[68877][C-00000006] bridge.c: Chose bridge technology native_rtp

Can you please help me understand what is wrong?
Is video not supported over direct media, as I read in some older thread?

Thanks,
Aris

P.S. this was working perfectly well on the ancient version of Asterisk using chan_sip…

The chan_pjsip module doesn’t support direct media for video.

That’s a pity - it is actually a step backwards, as this was possible with chan_sip, and it was offering much better quality of video calls between soft clients (e.g. linphone on Android) connected via WiFi.

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