2013-04-22 14:58:53 +00:00
{
"_copyright" : "Copyright (C) 2012 - 2013, Digium, Inc." ,
"_author" : "David M. Lee, II <dlee@digium.com>" ,
"_svn_revision" : "$Revision$" ,
"apiVersion" : "0.0.1" ,
2013-07-03 16:32:41 +00:00
"swaggerVersion" : "1.3" ,
2013-04-22 14:58:53 +00:00
"basePath" : "http://localhost:8088/stasis" ,
"resourcePath" : "/api-docs/events.{format}" ,
"apis" : [
{
"path" : "/events" ,
"description" : "Events from Asterisk to applications" ,
"operations" : [
{
"httpMethod" : "GET" ,
2013-07-03 16:32:00 +00:00
"upgrade" : "websocket" ,
"websocketProtocol" : "ari" ,
2013-04-22 14:58:53 +00:00
"summary" : "WebSocket connection for events." ,
"nickname" : "eventWebsocket" ,
2013-07-05 19:15:27 +00:00
"responseClass" : "Message" ,
2013-04-22 14:58:53 +00:00
"parameters" : [
{
"name" : "app" ,
"description" : "Comma seperated list of applications to subscribe to." ,
"paramType" : "query" ,
"required" : true ,
"allowMultiple" : true ,
"dataType" : "string"
}
]
}
]
}
],
"models" : {
2013-07-05 19:15:27 +00:00
"Message" : {
"id" : "Message" ,
"description" : "Base type for errors and events" ,
2013-07-03 16:32:41 +00:00
"discriminator" : "type" ,
2013-04-22 14:58:53 +00:00
"properties" : {
2013-07-03 16:32:41 +00:00
"type" : {
"type" : "string" ,
"required" : true ,
2013-07-05 19:15:27 +00:00
"description" : "Indicates the type of this message."
}
}
},
"MissingParams" : {
"id" : "MissingParams" ,
"extends" : "Message" ,
"description" : "Error event sent when required params are missing." ,
"properties" : {
"params" : {
"required" : true ,
"type" : "List[string]" ,
"description" : "A list of the missing parameters"
}
}
},
"Event" : {
"id" : "Event" ,
"extends" : "Message" ,
"description" : "Base type for asynchronous events from Asterisk." ,
"properties" : {
2013-04-22 14:58:53 +00:00
"application" : {
"type" : "string" ,
"description" : "Name of the application receiving the event." ,
"required" : true
},
2013-07-03 16:32:41 +00:00
"timestamp" : {
"type" : "Date" ,
"description" : "Time at which this event was created." ,
"required" : false
}
2013-05-23 20:11:35 +00:00
}
},
"PlaybackStarted" : {
"id" : "PlaybackStarted" ,
2013-07-03 16:32:41 +00:00
"extends" : "Event" ,
2013-05-23 20:11:35 +00:00
"description" : "Event showing the start of a media playback operation." ,
"properties" : {
"playback" : {
"type" : "Playback" ,
"description" : "Playback control object" ,
"required" : true
}
}
},
"PlaybackFinished" : {
"id" : "PlaybackFinished" ,
2013-07-03 16:32:41 +00:00
"extends" : "Event" ,
2013-05-23 20:11:35 +00:00
"description" : "Event showing the completion of a media playback operation." ,
"properties" : {
"playback" : {
"type" : "Playback" ,
"description" : "Playback control object" ,
"required" : true
}
2013-04-22 14:58:53 +00:00
}
},
"ApplicationReplaced" : {
"id" : "ApplicationReplaced" ,
2013-07-03 16:32:41 +00:00
"extends" : "Event" ,
"description" : "Notification that another WebSocket has taken over for an application.\n\nAn application may only be subscribed to by a single WebSocket at a time. If multiple WebSockets attempt to subscribe to the same application, the newer WebSocket wins, and the older one receives this event." ,
"properties" : {}
2013-04-22 14:58:53 +00:00
},
2013-05-21 18:00:22 +00:00
"BridgeCreated" : {
"id" : "BridgeCreated" ,
2013-07-03 16:32:41 +00:00
"extends" : "Event" ,
2013-05-21 18:00:22 +00:00
"description" : "Notification that a bridge has been created." ,
"properties" : {
"bridge" : {
"required" : true ,
"type" : "Bridge"
}
}
},
"BridgeDestroyed" : {
"id" : "BridgeDestroyed" ,
2013-07-03 16:32:41 +00:00
"extends" : "Event" ,
2013-05-21 18:00:22 +00:00
"description" : "Notification that a bridge has been destroyed." ,
"properties" : {
"bridge" : {
"required" : true ,
"type" : "Bridge"
}
}
},
2013-06-10 13:07:11 +00:00
"BridgeMerged" : {
"id" : "BridgeMerged" ,
2013-07-03 16:32:41 +00:00
"extends" : "Event" ,
2013-06-10 13:07:11 +00:00
"description" : "Notification that one bridge has merged into another." ,
"properties" : {
"bridge" : {
"required" : true ,
"type" : "Bridge"
},
"bridge_from" : {
"required" : true ,
"type" : "Bridge"
}
}
},
2013-05-10 13:13:06 +00:00
"ChannelCreated" : {
"id" : "ChannelCreated" ,
2013-07-03 16:32:41 +00:00
"extends" : "Event" ,
2013-05-10 13:13:06 +00:00
"description" : "Notification that a channel has been created." ,
2013-04-22 14:58:53 +00:00
"properties" : {
2013-05-10 13:13:06 +00:00
"channel" : {
"required" : true ,
"type" : "Channel"
2013-04-22 14:58:53 +00:00
}
}
},
2013-05-10 13:13:06 +00:00
"ChannelDestroyed" : {
"id" : "ChannelDestroyed" ,
2013-07-03 16:32:41 +00:00
"extends" : "Event" ,
2013-05-10 13:13:06 +00:00
"description" : "Notification that a channel has been destroyed." ,
2013-04-22 14:58:53 +00:00
"properties" : {
2013-05-10 13:13:06 +00:00
"cause" : {
"required" : true ,
"description" : "Integer representation of the cause of the hangup" ,
2013-07-03 16:32:41 +00:00
"type" : "int"
2013-05-10 13:13:06 +00:00
},
"cause_txt" : {
"required" : true ,
"description" : "Text representation of the cause of the hangup" ,
"type" : "string"
2013-04-22 14:58:53 +00:00
},
"channel" : {
2013-05-10 13:13:06 +00:00
"required" : true ,
2013-04-22 14:58:53 +00:00
"type" : "Channel"
}
}
},
2013-05-21 18:00:22 +00:00
"ChannelEnteredBridge" : {
"id" : "ChannelEnteredBridge" ,
2013-07-03 16:32:41 +00:00
"extends" : "Event" ,
2013-05-21 18:00:22 +00:00
"description" : "Notification that a channel has entered a bridge." ,
"properties" : {
"bridge" : {
"required" : true ,
"type" : "Bridge"
},
"channel" : {
"type" : "Channel"
}
}
},
"ChannelLeftBridge" : {
"id" : "ChannelLeftBridge" ,
2013-07-03 16:32:41 +00:00
"extends" : "Event" ,
2013-05-21 18:00:22 +00:00
"description" : "Notification that a channel has left a bridge." ,
"properties" : {
"bridge" : {
"required" : true ,
"type" : "Bridge"
},
"channel" : {
"required" : true ,
"type" : "Channel"
}
}
},
2013-04-22 14:58:53 +00:00
"ChannelStateChange" : {
"id" : "ChannelStateChange" ,
2013-07-03 16:32:41 +00:00
"extends" : "Event" ,
2013-04-22 14:58:53 +00:00
"description" : "Notification of a channel's state change." ,
"properties" : {
2013-05-10 13:13:06 +00:00
"channel" : {
"required" : true ,
2013-04-22 14:58:53 +00:00
"type" : "Channel"
}
}
},
2013-05-10 13:13:06 +00:00
"ChannelDtmfReceived" : {
"id" : "ChannelDtmfReceived" ,
2013-07-03 16:32:41 +00:00
"extends" : "Event" ,
"description" : "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF" ,
2013-04-22 14:58:53 +00:00
"properties" : {
"digit" : {
2013-05-10 13:13:06 +00:00
"required" : true ,
2013-04-22 14:58:53 +00:00
"type" : "string" ,
"description" : "DTMF digit received (0-9, A-E, # or *)"
},
2013-07-03 16:32:41 +00:00
"duration_ms" : {
"required" : true ,
"type" : "int" ,
"description" : "Number of milliseconds DTMF was received"
},
2013-04-22 14:58:53 +00:00
"channel" : {
2013-05-10 13:13:06 +00:00
"required" : true ,
2013-04-22 14:58:53 +00:00
"type" : "Channel" ,
"description" : "The channel on which DTMF was received"
}
}
},
2013-05-10 13:13:06 +00:00
"ChannelDialplan" : {
"id" : "ChannelDialplan" ,
2013-07-03 16:32:41 +00:00
"extends" : "Event" ,
2013-05-10 13:13:06 +00:00
"description" : "Channel changed location in the dialplan." ,
"properties" : {
2013-07-03 16:32:41 +00:00
"channel" : {
2013-05-10 13:13:06 +00:00
"required" : true ,
2013-07-03 16:32:41 +00:00
"type" : "Channel" ,
"description" : "The channel that changed dialplan location."
2013-05-10 13:13:06 +00:00
},
2013-07-03 16:32:41 +00:00
"dialplan_app" : {
2013-05-10 13:13:06 +00:00
"required" : true ,
"type" : "string" ,
2013-07-03 16:32:41 +00:00
"description" : "The application about to be executed."
2013-05-10 13:13:06 +00:00
},
2013-07-03 16:32:41 +00:00
"dialplan_app_data" : {
2013-05-10 13:13:06 +00:00
"required" : true ,
2013-07-03 16:32:41 +00:00
"type" : "string" ,
"description" : "The data to be passed to the application."
2013-05-10 13:13:06 +00:00
}
}
},
"ChannelCallerId" : {
"id" : "ChannelCallerId" ,
2013-07-03 16:32:41 +00:00
"extends" : "Event" ,
2013-05-10 13:13:06 +00:00
"description" : "Channel changed Caller ID." ,
"properties" : {
"caller_presentation" : {
"required" : true ,
2013-07-03 16:32:41 +00:00
"type" : "int" ,
2013-05-10 13:13:06 +00:00
"description" : "The integer representation of the Caller Presentation value."
},
"caller_presentation_txt" : {
"required" : true ,
"type" : "string" ,
"description" : "The text representation of the Caller Presentation value."
},
"channel" : {
"required" : true ,
"type" : "Channel" ,
"description" : "The channel that changed Caller ID."
}
}
},
"ChannelUserevent" : {
"id" : "ChannelUserevent" ,
2013-07-03 16:32:41 +00:00
"extends" : "Event" ,
2013-05-10 13:13:06 +00:00
"description" : "User-generated event with additional user-defined fields in the object." ,
"properties" : {
"eventname" : {
"required" : true ,
"type" : "string" ,
"description" : "The name of the user event."
},
"channel" : {
"required" : true ,
"type" : "Channel" ,
"description" : "The channel that signaled the user event."
}
}
},
"ChannelHangupRequest" : {
"id" : "ChannelHangupRequest" ,
2013-07-03 16:32:41 +00:00
"extends" : "Event" ,
2013-05-10 13:13:06 +00:00
"description" : "A hangup was requested on the channel." ,
"properties" : {
"cause" : {
2013-07-03 16:32:41 +00:00
"type" : "int" ,
2013-05-10 13:13:06 +00:00
"description" : "Integer representation of the cause of the hangup."
},
"soft" : {
"type" : "boolean" ,
"description" : "Whether the hangup request was a soft hangup request."
},
"channel" : {
"required" : true ,
"type" : "Channel" ,
"description" : "The channel on which the hangup was requested."
}
}
},
"ChannelVarset" : {
"id" : "ChannelVarset" ,
2013-07-03 16:32:41 +00:00
"extends" : "Event" ,
2013-05-10 13:13:06 +00:00
"description" : "Channel variable changed." ,
"properties" : {
"variable" : {
"required" : true ,
"type" : "string" ,
"description" : "The variable that changed."
},
"value" : {
"required" : true ,
"type" : "string" ,
"description" : "The new value of the variable."
},
"channel" : {
2013-07-03 16:32:41 +00:00
"required" : false ,
2013-05-10 13:13:06 +00:00
"type" : "Channel" ,
2013-07-03 16:32:41 +00:00
"description" : "The channel on which the variable was set.\n\nIf missing, the variable is a global variable."
2013-05-10 13:13:06 +00:00
}
}
},
2013-04-22 14:58:53 +00:00
"StasisEnd" : {
"id" : "StasisEnd" ,
2013-07-03 16:32:41 +00:00
"extends" : "Event" ,
2013-04-22 14:58:53 +00:00
"description" : "Notification that a channel has left a Stasis appliction." ,
"properties" : {
2013-05-10 13:13:06 +00:00
"channel" : {
"required" : true ,
2013-04-22 14:58:53 +00:00
"type" : "Channel"
}
}
},
"StasisStart" : {
"id" : "StasisStart" ,
2013-07-03 16:32:41 +00:00
"extends" : "Event" ,
2013-04-22 14:58:53 +00:00
"description" : "Notification that a channel has entered a Stasis appliction." ,
"properties" : {
"args" : {
2013-05-10 13:13:06 +00:00
"required" : true ,
2013-04-22 14:58:53 +00:00
"type" : "List[string]" ,
"description" : "Arguments to the application"
},
2013-05-10 13:13:06 +00:00
"channel" : {
"required" : true ,
2013-04-22 14:58:53 +00:00
"type" : "Channel"
}
}
}
}
}