asterisk/res/stasis
Matt Jordan 9cffcca5f9 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
2015-05-22 11:13:34 -05:00
..
app.c res/ari: Register Stasis application on WebSocket attempt 2015-05-22 11:13:34 -05:00
app.h Stasis: Fix StasisStart/End order and missing events 2014-12-08 15:45:46 +00:00
command.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
command.h ARI: Fix a crash caused by hanging during playback to a channel in a bridge 2014-08-22 16:52:51 +00:00
control.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
control.h Stasis: Convey transfer information to applications 2014-08-07 15:30:19 +00:00
messaging.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
messaging.h Clean up files that do not end with newlines 2014-08-21 14:52:28 +00:00
stasis_bridge.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
stasis_bridge.h ARI: Make mixing bridges propagate linkedids and accountcodes. 2014-07-09 16:34:51 +00:00