[Asterisk-code-review] res_pjsip_session: Flip stream direction of outgoing stream. (asterisk[16])

Maximilian Fridrich asteriskteam at digium.com
Thu Apr 14 04:28:34 CDT 2022


Attention is currently required from: Joshua Colp.
Maximilian Fridrich has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/18371 )

Change subject: res_pjsip_session: Flip stream direction of outgoing stream.
......................................................................


Patch Set 1:

(1 comment)

File res/res_pjsip_session.c:

https://gerrit.asterisk.org/c/asterisk/+/18371/comment/71ebfdfc_b2d5ef18 
PS1, Line 3425: 			if (ast_stream_get_state(req_stream) == AST_STREAM_STATE_SENDONLY) {
> Gerrit doesn't work using tiny commits and separate reviews - you amend and update this review. […]
I see what you're saying and the bridge definitely seems like the right place for this reversal of stream direction to occur. However, the bridge code does not yet come into play when the outgoing stream of the second call leg is initially created. That is why the SDP negotiation results in an incorrect stream state when the call is being answered.

Here is an example of what seems to be happening:

1. Caller sends sendonly -> local_stream of call leg 1 is correctly set recvonly
2. Outgoing stream is created and clones local topology of call leg 1 -> local_stream of call leg 2 is recvonly as well (should be sendonly)
3. Callee answers with recvonly -> SDP negotiation of 2nd call leg receives recvonly for both local_sdp and remote_sdp -> no media is transmitted

So it sounds like the more sensible place for the stream reversal to occur would be further up the chain of execution in app_dial.c:dial_exec_full() after the topology of the first channel is cloned (which I have tried and it fixes ASTERISK-29655 as well).



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/18371
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I294dc834ac9a5f048b101b691669959e9df630e1
Gerrit-Change-Number: 18371
Gerrit-PatchSet: 1
Gerrit-Owner: Maximilian Fridrich <m.fridrich at commend.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-CC: Florian Floimair <f.floimair at commend.com>
Gerrit-Attention: Joshua Colp <jcolp at sangoma.com>
Gerrit-Comment-Date: Thu, 14 Apr 2022 09:28:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Joshua Colp <jcolp at sangoma.com>
Comment-In-Reply-To: Maximilian Fridrich <m.fridrich at commend.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220414/518f77fa/attachment.html>


More information about the asterisk-code-review mailing list