[asterisk-commits] dlee: branch dlee/playback r387739 - in /team/dlee/playback: res/stasis_http/...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon May 6 12:07:05 CDT 2013


Author: dlee
Date: Mon May  6 12:07:03 2013
New Revision: 387739

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=387739
Log:
Documented some playback events

Modified:
    team/dlee/playback/res/stasis_http/resource_channels.h
    team/dlee/playback/res/stasis_http/resource_events.h
    team/dlee/playback/rest-api/api-docs/channels.json
    team/dlee/playback/rest-api/api-docs/events.json

Modified: team/dlee/playback/res/stasis_http/resource_channels.h
URL: http://svnview.digium.com/svn/asterisk/team/dlee/playback/res/stasis_http/resource_channels.h?view=diff&rev=387739&r1=387738&r2=387739
==============================================================================
--- team/dlee/playback/res/stasis_http/resource_channels.h (original)
+++ team/dlee/playback/res/stasis_http/resource_channels.h Mon May  6 12:07:03 2013
@@ -246,7 +246,17 @@
 /*
  * JSON models
  *
+ * CallerID
+ * - name: string (required)
+ * - number: string (required)
+ * Dialed
  * Originated
+ * Playback
+ * - status: string (required)
+ * - language: string 
+ * - media_uri: string (required)
+ * - id: string (required)
+ * - target_uri: string (required)
  * DialplanCEP
  * - priority: long (required)
  * - exten: string (required)
@@ -267,10 +277,6 @@
  * - hangupsource: string (required)
  * - dialplan: DialplanCEP (required)
  * - data: string (required)
- * CallerID
- * - name: string (required)
- * - number: string (required)
- * Dialed
  */
 
 #endif /* _ASTERISK_RESOURCE_CHANNELS_H */

Modified: team/dlee/playback/res/stasis_http/resource_events.h
URL: http://svnview.digium.com/svn/asterisk/team/dlee/playback/res/stasis_http/resource_events.h?view=diff&rev=387739&r1=387738&r2=387739
==============================================================================
--- team/dlee/playback/res/stasis_http/resource_events.h (original)
+++ team/dlee/playback/res/stasis_http/resource_events.h Mon May  6 12:07:03 2013
@@ -63,6 +63,13 @@
  * - channel: Channel 
  * BridgeCreated
  * - bridge: Bridge 
+ * PlaybackFinished
+ * - media_uri: string 
+ * - playback: Playback 
+ * - channel: Channel 
+ * PlaybackStarted
+ * - playback: Playback (required)
+ * - channel: Channel (required)
  * BridgeDestroyed
  * - bridge: Bridge 
  * ApplicationReplaced
@@ -84,6 +91,7 @@
  * - stasis_start: StasisStart 
  * - channel_entered_bridge: ChannelEnteredBridge 
  * - channel_left_bridge: ChannelLeftBridge 
+ * - playback_started: PlaybackStarted 
  * - application_replaced: ApplicationReplaced 
  * - channel_state_change: ChannelStateChange 
  * - bridge_created: BridgeCreated 
@@ -91,6 +99,7 @@
  * - stasis_end: StasisEnd 
  * - dtmf_received: DtmfReceived 
  * - bridge_destroyed: BridgeDestroyed 
+ * - playback_finished: PlaybackFinished 
  */
 
 #endif /* _ASTERISK_RESOURCE_EVENTS_H */

Modified: team/dlee/playback/rest-api/api-docs/channels.json
URL: http://svnview.digium.com/svn/asterisk/team/dlee/playback/rest-api/api-docs/channels.json?view=diff&rev=387739&r1=387738&r2=387739
==============================================================================
--- team/dlee/playback/rest-api/api-docs/channels.json (original)
+++ team/dlee/playback/rest-api/api-docs/channels.json Mon May  6 12:07:03 2013
@@ -648,6 +648,44 @@
 					"description": "Timestamp when channel was created"
 				}
 			}
+		},
+		"Playback": {
+			"id": "Playback",
+			"description": "Object representing the playback of media to a channel",
+			"properties": {
+				"id": {
+					"type": "string",
+					"description": "ID for this playback operation",
+					"required": true
+				},
+				"media_uri": {
+					"type": "string",
+					"description": "URI for the media to play back.",
+					"required": true
+				},
+				"target_uri": {
+					"type": "string",
+					"description": "URI for the channel or bridge to play the media on",
+					"required": true
+				},
+				"language": {
+					"type": "string",
+					"description": "For media types that support multiple languages, the language requested for playback."
+				},
+				"status": {
+					"type": "string",
+					"description": "Current status of the playback operation.",
+					"required": true,
+					"allowableValues": {
+						"valueType": "LIST",
+						"values": [
+							"queued",
+							"playing",
+							"complete"
+						]
+					}
+				}
+			}
 		}
 	}
 }

Modified: team/dlee/playback/rest-api/api-docs/events.json
URL: http://svnview.digium.com/svn/asterisk/team/dlee/playback/rest-api/api-docs/events.json?view=diff&rev=387739&r1=387738&r2=387739
==============================================================================
--- team/dlee/playback/rest-api/api-docs/events.json (original)
+++ team/dlee/playback/rest-api/api-docs/events.json Mon May  6 12:07:03 2013
@@ -61,7 +61,39 @@
 				"channel_state_change": { "type": "ChannelStateChange" },
 				"dtmf_received": { "type": "DtmfReceived" },
 				"stasis_end": { "type": "StasisEnd" },
-				"stasis_start": { "type": "StasisStart" }
+				"stasis_start": { "type": "StasisStart" },
+				"playback_started": { "type": "PlaybackStarted" },
+				"playback_finished": { "type": "PlaybackFinished" }
+			}
+		},
+		"PlaybackStarted": {
+			"id": "PlaybackStarted",
+			"description": "Event showing the start of a media playback operation.",
+			"properties": {
+				"playback": {
+					"type": "Playback",
+					"description": "Playback control object",
+					"required": true
+				},
+				"channel": {
+					"type": "Channel",
+					"required": true
+				}
+			}
+		},
+		"PlaybackFinished": {
+			"id": "PlaybackFinished",
+			"description": "Event showing the completion of a media playback operation.",
+			"properties": {
+				"playback": {
+					"type": "Playback"
+				},
+				"channel": {
+					"type": "Channel"
+				},
+				"media_uri": {
+					"type": "string"
+				}
 			}
 		},
 		"ApplicationReplaced": {




More information about the asterisk-commits mailing list