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

Fridrich Maximilian M.Fridrich at commend.com
Wed May 18 07:31:18 CDT 2022


> 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 am still working on fixing ASTERISK-30051. Regarding my two proposed
solutions, I have not found a way to ensure the stream_topology_change executes
after hold/unhold. So I am trying to find a way for hold/unhold to receive the
updated topology.

The critical place I am working on is
bridge_channel.c:bridge_channel_handle_control(). The problem I am facing is
that the frame data only contains a string with the music class and I can't
find a way to access the updated topology. Unfortunately,
ast_channel_get_stream_topology(chan) does not contain the updated topology.

The ast_frame originates from bridge_channel->wr_queue in
bridge_channel_handle_write() but I can't find the place in the code, where the
ast_frame is stored there. If I can find this place, I could add
the stream topology to it (either through a new struct in data.ptr or using
ast_frame.subclass.topology).

Does anyone know, where the ast_frame is created in the code? Or does anyone
have a better idea on how to proceed? Ultimately all I need is the new stream
topology when ast_channel_tech(chan)->indicate() is called.

Thank you,
Max





More information about the asterisk-dev mailing list