]> 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:49:45 +0000 (22:49 +0000)
committerAshley Sanders <asanders@digium.com>
Tue, 31 Mar 2015 22:49:45 +0000 (22:49 +0000)
commit06578ef4075147ab367cee6b7657b012253627a7
tree2d169b1837664690d4400e851c0a5840af4c6eb2
parent2d28fa678ecb2b53949210542db8130a7cd47705
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/
........

Merged revisions 433839 from http://svn.asterisk.org/svn/asterisk/branches/13

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