]> git.ipfire.org Git - thirdparty/asterisk.git/commit
stasis: set a channel variable on websocket disconnect error
authorAshley Sanders <asanders@digium.com>
Tue, 31 Mar 2015 22:00:17 +0000 (22:00 +0000)
committerAshley Sanders <asanders@digium.com>
Tue, 31 Mar 2015 22:00:17 +0000 (22:00 +0000)
commit7293ecd90b6ac88fda2908ddb48289070e15fd8f
tree2ef69fd919601380d1348e3dd0d0f50356313b25
parent94949e7f2f8cdd23b44b108348c5f3642964a367
stasis: set a channel variable on websocket disconnect error

When an error occurs while writing to a web socket, the web socket is
disconnected and the event is logged. A side-effect of this, however, is that
any application on the other side waiting for a response from Stasis is left
hanging indefinitely (as there is no mechanism presently available for
notifying interested parties about web socket error states in Stasis).

To remedy this scenario, this patch introduces a new channel variable:
STASISSTATUS.

The possible values for STASISSTATUS are:
SUCCESS         - The channel has exited Stasis without any failures
FAILED          - Something caused Stasis to croak. Some (not all) possible
                  reasons for this:
                    - The app registry is not instantiated;
                    - The app requested is not registered;
                    - The app requested is not active;
                    - Stasis couldn't send a start message

ASTERISK-24802
Reported By: Kevin Harwell
Review: https://reviewboard.asterisk.org/r/4519/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433839 65c4cc65-6c06-0410-ace0-fbb531ad65f3
apps/app_stasis.c