[Asterisk-code-review] chan_psip, res_pjsip_sdp_rtp: ignore rtptimeout if direct-media is ac... (asterisk[16])

Michael Neuhauser asteriskteam at digium.com
Sun Mar 8 07:13:54 CDT 2020


Michael Neuhauser has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/13860 )

Change subject: chan_psip, res_pjsip_sdp_rtp: ignore rtptimeout if direct-media is active
......................................................................


Patch Set 1:

> Patch Set 1:
> 
> Question (because I haven't looked that closely at the code) - what about not calling this function at all if direct media is in use?

Thank you for taking an interest. That would simplify things, but I do not see this working:

rtp_check_timeout() in res_pjsip_sdp_rtp is a variably scheduled job (initially the configured rtp_timeout value, then the remaining time based on ast_rtp_instance_get_last_rx() and the current time). So one would have to add/delete the job when direct_media_addr==NULL changes - but *additionally* to the job-add/delete that is now in place in res_pjsip_sdp_rtp (triggered by the on_media_update PJSIP invite callback "on_media_update" and when the stream is stopped/destroyed).
The direct_media_addr value is set by chan_pjsip, via the update_peer rtp-engine callback, i.e., asynchronously to the job-add/delete that is happening in res_pjsp_sdp_rtp. So there would by 2 different places that try to add/delete the same job, which I think would be much too complicated to coordinate.
In summary, I think checking the direct_media_addr value in rtp_check_timeout() is the correct approach. (The RTP keepalive handling in res_pjsip_sdp_rtp also does it that way.)


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

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I8b62012be7685849e8fb2b1c5dd39d35313ca2d1
Gerrit-Change-Number: 13860
Gerrit-PatchSet: 1
Gerrit-Owner: Michael Neuhauser <mike at firmix.at>
Gerrit-Reviewer: Friendly Automation
Gerrit-CC: Sean Bright <sean.bright at gmail.com>
Gerrit-Comment-Date: Sun, 08 Mar 2020 12:13:54 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200308/1506557c/attachment.html>


More information about the asterisk-code-review mailing list