res_stasis: Add ability to switch applications.
Added the ability to move between Stasis applications within Stasis. This can be done by calling 'move' in an application, providing (at minimum) the channel's id and the application to switch to. If the application is not registered or active, nothing will happen and the channel will remain in the current application, and an event will be triggered to let the application know that the move failed. The event name is "ApplicationMoveFailed", and provides the "destination" that the channel was attempting to move to, as well as the usual channel information. Optionally, a list of arguments can be passed to the function call for the receiving application. A full example of a 'move' call would look like this: client.channels.move(channelId, app, appArgs) The control object used to control the channel in Stasis can now switch which application it belongs to, rather than belonging to one Stasis application for its lifetime. This allows us to use the same control object instead of having to tear down the current one and create another. ASTERISK-28267 #close Change-Id: I43d12b10045a98a8d42541889b85695be26f288a
Showing
- CHANGES 14 additions, 0 deletionsCHANGES
- include/asterisk/stasis_app.h 14 additions, 0 deletionsinclude/asterisk/stasis_app.h
- res/ari/ari_model_validators.c 127 additions, 0 deletionsres/ari/ari_model_validators.c
- res/ari/ari_model_validators.h 26 additions, 0 deletionsres/ari/ari_model_validators.h
- res/ari/resource_channels.c 20 additions, 0 deletionsres/ari/resource_channels.c
- res/ari/resource_channels.h 28 additions, 0 deletionsres/ari/resource_channels.h
- res/res_ari_channels.c 100 additions, 2 deletionsres/res_ari_channels.c
- res/res_stasis.c 142 additions, 11 deletionsres/res_stasis.c
- res/stasis/control.c 112 additions, 1 deletionres/stasis/control.c
- res/stasis/control.h 52 additions, 0 deletionsres/stasis/control.h
- rest-api/api-docs/channels.json 48 additions, 0 deletionsrest-api/api-docs/channels.json
- rest-api/api-docs/events.json 20 additions, 0 deletionsrest-api/api-docs/events.json
Loading
Please register or sign in to comment