mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-19 11:42:27 +00:00
ari: User better nicknames for ARI operations
While working on building client libraries from the Swagger API, I noticed a problem with the nicknames. channel.deleteChannel() channel.answerChannel() channel.muteChannel() Etc. We put the object name in the nickname (since we were generating C code), but it makes OO generators redundant. This patch makes the nicknames more OO friendly. This resulted in a lot of name changing within the res_ari_*.so modules, but not much else. There were a couple of other fixed I made in the process. * When reversible operations (POST /hold, POST /unhold) were made more RESTful (POST /hold, DELETE /unhold), the path for the second operation was left in the API declaration. This worked, but really the two operations should have been on the same API. * The POST /unmute operation had still not been REST-ified. Review: https://reviewboard.asterisk.org/r/2940/ ........ Merged revisions 402528 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
{
|
||||
"httpMethod": "GET",
|
||||
"summary": "List all applications.",
|
||||
"nickname": "getApplications",
|
||||
"nickname": "list",
|
||||
"responseClass": "List[Application]"
|
||||
}
|
||||
]
|
||||
@@ -26,7 +26,7 @@
|
||||
{
|
||||
"httpMethod": "GET",
|
||||
"summary": "Get details of an application.",
|
||||
"nickname": "getApplication",
|
||||
"nickname": "get",
|
||||
"responseClass": "Application",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -55,7 +55,7 @@
|
||||
"httpMethod": "POST",
|
||||
"summary": "Subscribe an application to a event source.",
|
||||
"notes": "Returns the state of the application after the subscriptions have changed",
|
||||
"nickname": "applicationSubscribe",
|
||||
"nickname": "subscribe",
|
||||
"responseClass": "Application",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -94,7 +94,7 @@
|
||||
"httpMethod": "DELETE",
|
||||
"summary": "Unsubscribe an application from an event source.",
|
||||
"notes": "Returns the state of the application after the subscriptions have changed",
|
||||
"nickname": "applicationUnsubscribe",
|
||||
"nickname": "unsubscribe",
|
||||
"responseClass": "Application",
|
||||
"parameters": [
|
||||
{
|
||||
|
@@ -14,7 +14,7 @@
|
||||
{
|
||||
"httpMethod": "GET",
|
||||
"summary": "Gets Asterisk system information.",
|
||||
"nickname": "getAsteriskInfo",
|
||||
"nickname": "getInfo",
|
||||
"responseClass": "AsteriskInfo",
|
||||
"parameters": [
|
||||
{
|
||||
|
@@ -14,14 +14,14 @@
|
||||
{
|
||||
"httpMethod": "GET",
|
||||
"summary": "List all active bridges in Asterisk.",
|
||||
"nickname": "getBridges",
|
||||
"nickname": "list",
|
||||
"responseClass": "List[Bridge]"
|
||||
},
|
||||
{
|
||||
"httpMethod": "POST",
|
||||
"summary": "Create a new bridge.",
|
||||
"notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.",
|
||||
"nickname": "newBridge",
|
||||
"nickname": "create",
|
||||
"responseClass": "Bridge",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -50,7 +50,7 @@
|
||||
{
|
||||
"httpMethod": "GET",
|
||||
"summary": "Get bridge details.",
|
||||
"nickname": "getBridge",
|
||||
"nickname": "get",
|
||||
"responseClass": "Bridge",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -73,7 +73,7 @@
|
||||
"httpMethod": "DELETE",
|
||||
"summary": "Shut down a bridge.",
|
||||
"notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.",
|
||||
"nickname": "deleteBridge",
|
||||
"nickname": "destroy",
|
||||
"responseClass": "void",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -101,7 +101,7 @@
|
||||
{
|
||||
"httpMethod": "POST",
|
||||
"summary": "Add a channel to a bridge.",
|
||||
"nickname": "addChannelToBridge",
|
||||
"nickname": "addChannel",
|
||||
"responseClass": "void",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -157,7 +157,7 @@
|
||||
{
|
||||
"httpMethod": "POST",
|
||||
"summary": "Remove a channel from a bridge.",
|
||||
"nickname": "removeChannelFromBridge",
|
||||
"nickname": "removeChannel",
|
||||
"responseClass": "void",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -205,7 +205,7 @@
|
||||
{
|
||||
"httpMethod": "POST",
|
||||
"summary": "Play music on hold to a bridge or change the MOH class that is playing.",
|
||||
"nickname": "mohStartBridge",
|
||||
"nickname": "startMoh",
|
||||
"responseClass": "void",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -235,18 +235,12 @@
|
||||
"reason": "Bridge not in Stasis application"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/bridges/{bridgeId}/moh",
|
||||
"description": "Stop music on hold for a bridge",
|
||||
"operations": [
|
||||
},
|
||||
{
|
||||
"httpMethod": "DELETE",
|
||||
"summary": "Stop playing music on hold to a bridge.",
|
||||
"notes": "This will only stop music on hold being played via bridges/{bridgeId}/mohStart.",
|
||||
"nickname": "mohStopBridge",
|
||||
"notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.",
|
||||
"nickname": "stopMoh",
|
||||
"responseClass": "void",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -279,7 +273,7 @@
|
||||
"httpMethod": "POST",
|
||||
"summary": "Start playback of media on a bridge.",
|
||||
"notes": "The media URI may be any of a number of URI's. Currently sound: and recording: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)",
|
||||
"nickname": "playOnBridge",
|
||||
"nickname": "play",
|
||||
"responseClass": "Playback",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -356,7 +350,7 @@
|
||||
"httpMethod": "POST",
|
||||
"summary": "Start a recording.",
|
||||
"notes": "This records the mixed audio from all channels participating in this bridge.",
|
||||
"nickname": "recordBridge",
|
||||
"nickname": "record",
|
||||
"responseClass": "LiveRecording",
|
||||
"parameters": [
|
||||
{
|
||||
|
@@ -14,7 +14,7 @@
|
||||
{
|
||||
"httpMethod": "GET",
|
||||
"summary": "List all active channels in Asterisk.",
|
||||
"nickname": "getChannels",
|
||||
"nickname": "list",
|
||||
"responseClass": "List[Channel]"
|
||||
},
|
||||
{
|
||||
@@ -106,7 +106,7 @@
|
||||
{
|
||||
"httpMethod": "GET",
|
||||
"summary": "Channel details.",
|
||||
"nickname": "getChannel",
|
||||
"nickname": "get",
|
||||
"responseClass": "Channel",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -128,7 +128,7 @@
|
||||
{
|
||||
"httpMethod": "DELETE",
|
||||
"summary": "Delete (i.e. hangup) a channel.",
|
||||
"nickname": "deleteChannel",
|
||||
"nickname": "hangup",
|
||||
"responseClass": "void",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -233,7 +233,7 @@
|
||||
{
|
||||
"httpMethod": "POST",
|
||||
"summary": "Answer a channel.",
|
||||
"nickname": "answerChannel",
|
||||
"nickname": "answer",
|
||||
"responseClass": "void",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -265,7 +265,7 @@
|
||||
{
|
||||
"httpMethod": "POST",
|
||||
"summary": "Indicate ringing to a channel.",
|
||||
"nickname": "ringChannel",
|
||||
"nickname": "ring",
|
||||
"responseClass": "void",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -297,7 +297,7 @@
|
||||
{
|
||||
"httpMethod": "POST",
|
||||
"summary": "Send provided DTMF to a given channel.",
|
||||
"nickname": "sendDTMFChannel",
|
||||
"nickname": "sendDTMF",
|
||||
"responseClass": "void",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -377,7 +377,7 @@
|
||||
{
|
||||
"httpMethod": "POST",
|
||||
"summary": "Mute a channel.",
|
||||
"nickname": "muteChannel",
|
||||
"nickname": "mute",
|
||||
"responseClass": "void",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -416,17 +416,11 @@
|
||||
"reason": "Channel not in a Stasis application"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/channels/{channelId}/unmute",
|
||||
"description": "Unmute a channel",
|
||||
"operations": [
|
||||
},
|
||||
{
|
||||
"httpMethod": "POST",
|
||||
"httpMethod": "DELETE",
|
||||
"summary": "Unmute a channel.",
|
||||
"nickname": "unmuteChannel",
|
||||
"nickname": "unmute",
|
||||
"responseClass": "void",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -475,7 +469,7 @@
|
||||
{
|
||||
"httpMethod": "POST",
|
||||
"summary": "Hold a channel.",
|
||||
"nickname": "holdChannel",
|
||||
"nickname": "hold",
|
||||
"responseClass": "void",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -497,17 +491,11 @@
|
||||
"reason": "Channel not in a Stasis application"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/channels/{channelId}/hold",
|
||||
"description": "Remove a channel from hold",
|
||||
"operations": [
|
||||
},
|
||||
{
|
||||
"httpMethod": "DELETE",
|
||||
"summary": "Remove a channel from hold.",
|
||||
"nickname": "unholdChannel",
|
||||
"nickname": "unhold",
|
||||
"responseClass": "void",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -540,7 +528,7 @@
|
||||
"httpMethod": "POST",
|
||||
"summary": "Play music on hold to a channel.",
|
||||
"notes": "Using media operations such as playOnChannel on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.",
|
||||
"nickname": "mohStartChannel",
|
||||
"nickname": "startMoh",
|
||||
"responseClass": "void",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -570,17 +558,11 @@
|
||||
"reason": "Channel not in a Stasis application"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/channels/{channelId}/moh",
|
||||
"description": "Stop playing music on hold to a channel",
|
||||
"operations": [
|
||||
},
|
||||
{
|
||||
"httpMethod": "DELETE",
|
||||
"summary": "Stop playing music on hold to a channel.",
|
||||
"nickname": "mohStopChannel",
|
||||
"nickname": "stopMoh",
|
||||
"responseClass": "void",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -613,7 +595,7 @@
|
||||
"httpMethod": "POST",
|
||||
"summary": "Start playback of media.",
|
||||
"notes": "The media URI may be any of a number of URI's. Currently sound: and recording: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)",
|
||||
"nickname": "playOnChannel",
|
||||
"nickname": "play",
|
||||
"responseClass": "Playback",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -679,7 +661,7 @@
|
||||
"httpMethod": "POST",
|
||||
"summary": "Start a recording.",
|
||||
"notes": "Record audio from a channel. Note that this will not capture audio sent to the channel. The bridge itself has a record feature if that's what you want.",
|
||||
"nickname": "recordChannel",
|
||||
"nickname": "record",
|
||||
"responseClass": "LiveRecording",
|
||||
"parameters": [
|
||||
{
|
||||
|
@@ -14,7 +14,7 @@
|
||||
{
|
||||
"httpMethod": "GET",
|
||||
"summary": "List all endpoints.",
|
||||
"nickname": "getEndpoints",
|
||||
"nickname": "list",
|
||||
"responseClass": "List[Endpoint]"
|
||||
}
|
||||
]
|
||||
@@ -26,7 +26,7 @@
|
||||
{
|
||||
"httpMethod": "GET",
|
||||
"summary": "List available endoints for a given endpoint technology.",
|
||||
"nickname": "getEndpointsByTech",
|
||||
"nickname": "listByTech",
|
||||
"responseClass": "List[Endpoint]",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -46,7 +46,7 @@
|
||||
{
|
||||
"httpMethod": "GET",
|
||||
"summary": "Details for an endpoint.",
|
||||
"nickname": "getEndpoint",
|
||||
"nickname": "get",
|
||||
"responseClass": "Endpoint",
|
||||
"parameters": [
|
||||
{
|
||||
|
@@ -14,7 +14,7 @@
|
||||
{
|
||||
"httpMethod": "GET",
|
||||
"summary": "Get a playback's details.",
|
||||
"nickname": "getPlayback",
|
||||
"nickname": "get",
|
||||
"responseClass": "Playback",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -36,7 +36,7 @@
|
||||
{
|
||||
"httpMethod": "DELETE",
|
||||
"summary": "Stop a playback.",
|
||||
"nickname": "stopPlayback",
|
||||
"nickname": "stop",
|
||||
"responseClass": "void",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -64,7 +64,7 @@
|
||||
{
|
||||
"httpMethod": "POST",
|
||||
"summary": "Control a playback.",
|
||||
"nickname": "controlPlayback",
|
||||
"nickname": "control",
|
||||
"responseClass": "void",
|
||||
"parameters": [
|
||||
{
|
||||
|
@@ -14,7 +14,7 @@
|
||||
{
|
||||
"httpMethod": "GET",
|
||||
"summary": "List recordings that are complete.",
|
||||
"nickname": "getStoredRecordings",
|
||||
"nickname": "listStored",
|
||||
"responseClass": "List[StoredRecording]"
|
||||
}
|
||||
]
|
||||
@@ -26,7 +26,7 @@
|
||||
{
|
||||
"httpMethod": "GET",
|
||||
"summary": "Get a stored recording's details.",
|
||||
"nickname": "getStoredRecording",
|
||||
"nickname": "getStored",
|
||||
"responseClass": "StoredRecording",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -48,7 +48,7 @@
|
||||
{
|
||||
"httpMethod": "DELETE",
|
||||
"summary": "Delete a stored recording.",
|
||||
"nickname": "deleteStoredRecording",
|
||||
"nickname": "deleteStored",
|
||||
"responseClass": "void",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -76,7 +76,7 @@
|
||||
{
|
||||
"httpMethod": "GET",
|
||||
"summary": "List live recordings.",
|
||||
"nickname": "getLiveRecording",
|
||||
"nickname": "getLive",
|
||||
"responseClass": "LiveRecording",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -98,7 +98,7 @@
|
||||
{
|
||||
"httpMethod": "DELETE",
|
||||
"summary": "Stop a live recording and discard it.",
|
||||
"nickname": "cancelRecording",
|
||||
"nickname": "cancel",
|
||||
"responseClass": "void",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -125,7 +125,7 @@
|
||||
{
|
||||
"httpMethod": "POST",
|
||||
"summary": "Stop a live recording and store it.",
|
||||
"nickname": "stopRecording",
|
||||
"nickname": "stop",
|
||||
"responseClass": "void",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -153,7 +153,7 @@
|
||||
"httpMethod": "POST",
|
||||
"summary": "Pause a live recording.",
|
||||
"notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.",
|
||||
"nickname": "pauseRecording",
|
||||
"nickname": "pause",
|
||||
"responseClass": "void",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -175,16 +175,11 @@
|
||||
"reason": "Recording not in session"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/recordings/live/{recordingName}/unpause",
|
||||
"operations": [
|
||||
},
|
||||
{
|
||||
"httpMethod": "POST",
|
||||
"httpMethod": "DELETE",
|
||||
"summary": "Unpause a live recording.",
|
||||
"nickname": "unpauseRecording",
|
||||
"nickname": "unpause",
|
||||
"responseClass": "void",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -216,7 +211,7 @@
|
||||
"httpMethod": "POST",
|
||||
"summary": "Mute a live recording.",
|
||||
"notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.",
|
||||
"nickname": "muteRecording",
|
||||
"nickname": "mute",
|
||||
"responseClass": "void",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -238,16 +233,11 @@
|
||||
"reason": "Recording not in session"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/recordings/live/{recordingName}/unmute",
|
||||
"operations": [
|
||||
},
|
||||
{
|
||||
"httpMethod": "POST",
|
||||
"httpMethod": "DELETE",
|
||||
"summary": "Unmute a live recording.",
|
||||
"nickname": "unmuteRecording",
|
||||
"nickname": "unmute",
|
||||
"responseClass": "void",
|
||||
"parameters": [
|
||||
{
|
||||
|
@@ -14,7 +14,7 @@
|
||||
{
|
||||
"httpMethod": "GET",
|
||||
"summary": "List all sounds.",
|
||||
"nickname": "getSounds",
|
||||
"nickname": "list",
|
||||
"responseClass": "List[Sound]",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -43,7 +43,7 @@
|
||||
{
|
||||
"httpMethod": "GET",
|
||||
"summary": "Get a sound's details.",
|
||||
"nickname": "getStoredSound",
|
||||
"nickname": "get",
|
||||
"responseClass": "Sound",
|
||||
"parameters": [
|
||||
{
|
||||
|
Reference in New Issue
Block a user