[asterisk-dev] ASTERISK-29655 Fixing one-way video stream state (pjsip)

Fridrich Maximilian M.Fridrich at commend.com
Wed Mar 23 04:33:55 CDT 2022


Hi,

I am working on fixing ASTERISK-29655 [1] and have identified a possible cause
in res_pjsip_session.c.

When a caller sends an Invite with a video stream set to sendonly, the video
topology of the ast_sip_session of both the caller and the callee is initially
set to recvonly. After reverting ASTERISK-28783 (which seems to cause this
behavior), the video topology of both caller and callee is sendrecv and we have
one-way video as expected.

I have tried flipping the topology of the outgoing call leg to sendonly (in
ast_sip_session_create_outgoing()) but both streams are nonetheless set
inactive in res_pjsip_session:handle_negotiated_sdp_session_media() after
SDP negotiation. Specifically, the first call leg is set inactive with the
following backtrace:

res_pjsip_session.so!handle_negotiated_sdp_session_media() (res/res_pjsip_session.c:989)
res_pjsip_session.so!handle_negotiated_sdp() (res/res_pjsip_session.c:1139)
res_pjsip_session.so!session_inv_on_media_update() (res/res_pjsip_session.c:5363)
libasteriskpj.so.2!inv_negotiate_sdp() (third-party/pjproject/source/pjsip/src/pjsip-ua/sip_inv.c:1969)
libasteriskpj.so.2!process_answer() (third-party/pjproject/source/pjsip/src/pjsip-ua/sip_inv.c:2281)
libasteriskpj.so.2!pjsip_inv_answer() (third-party/pjproject/source/pjsip/src/pjsip-ua/sip_inv.c:2450)
chan_pjsip.so!answer() (channels/chan_pjsip.c:700)

The streams are set inactive because in inv->neg->active_local_sdp the media
stream is inactive.

My question is, how is the active_local_sdp stream state set?

I have a feeling that some stream states are mixed up which causes the streams
to be set on hold (inactive) during SDP negotiation.

Generally any information on this issue is appreciated as I am not fully
familiar with all of the details of how the SDP negotiation happens in
Asterisk.

Thank you,

Max

[1]
https://issues.asterisk.org/jira/browse/ASTERISK-29655
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20220323/abb0848a/attachment.html>


More information about the asterisk-dev mailing list