-
- Downloads
res/ari: Register Stasis application on WebSocket attempt
Prior to this patch, when a WebSocket connection is made, ARI would not be informed of the connection until after the WebSocket layer had accepted the connection. This created a brief race condition where the ARI client would be notified that it was connected, a channel would be sent into the Stasis dialplan application, but ARI would not yet have registered the Stasis application presented in the HTTP request that established the WebSocket. This patch resolves this issue by doing the following: * When a WebSocket attempt is made, a callback is made into the ARI application layer, which verifies and registers the apps presented in the HTTP request. Because we do not yet have a WebSocket, we cannot have an event session for the corresponding applications. Some defensive checks were thus added to make the application objects tolerant to a NULL event session. * When a WebSocket connection is made, the registered application is updated with the newly created event session that wraps the WebSocket connection. ASTERISK-24988 #close Reported by: Joshua Colp Change-Id: Ia5dc60dc2b6bee76cd5aff0f69dd53b36e83f636
Showing
- res/ari/resource_events.c 38 additions, 1 deletionres/ari/resource_events.c
- res/ari/resource_events.h 14 additions, 1 deletionres/ari/resource_events.h
- res/res_ari_events.c 99 additions, 9 deletionsres/res_ari_events.c
- res/stasis/app.c 2 additions, 3 deletionsres/stasis/app.c
- rest-api-templates/ari_resource.h.mustache 18 additions, 1 deletionrest-api-templates/ari_resource.h.mustache
- rest-api-templates/res_ari_resource.c.mustache 60 additions, 10 deletionsrest-api-templates/res_ari_resource.c.mustache
Loading
Please register or sign in to comment