[asterisk-dev] Call unhold/topology change indication order

Fridrich Maximilian M.Fridrich at commend.com
Thu May 12 10:06:02 CDT 2022


Hi,

I think I have found out why the indication order on hold/unhold matters:

AST_CONTROL_HOLD/UNHOLD only cares about the audio stream and does not touch
the topology of any other streams. So when Asterisk receives an SDP with audio
and video and both are sendonly, chan_pjsip indicates AST_CONTROL_HOLD for
the audio stream and AST_CONTROL_STREAM_TOPOLOGY_REQUEST_CHANGE for the video
stream.

If AST_CONTROL_HOLD is indicated after
AST_CONTROL_STREAM_TOPOLOGY_REQUEST_CHANGE, it still has "outdated" topology
information as it only cares about the default audio stream. So after the
stream topology is changed, it is "overwritten" by the outdated topology from
the hold/unhold indication.

To resolve the issue, the topology request change needs to check if this is
also a hold/unhold. If it is, there are two option:

1. Ensure that it executes after the hold/unhold indication
2. Ensure that the hold/unhold indication receives the updated topology

I'm stuck on implementing either of those solutions. I think the place we need
to work on is in bridge_channel.c:bridge_handle_trip() before the call to
stream_topology_changed(). In bridge_handle_trip() we might still have a chance
to interact with the other channel(s) in the bridge.

Does anyone have any idea on how to proceed?

Thank you,
Max



More information about the asterisk-dev mailing list