123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797 |
- <!DOCTYPE html>
- <html>
- <head>
- <title>Asterisk Project : Asterisk 13 Channels REST API</title>
- <link rel="stylesheet" href="styles/site.css" type="text/css" />
- <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
- </head>
- <body class="theme-default aui-theme-default">
- <div id="page">
- <div id="main" class="aui-page-panel">
- <div id="main-header">
- <div id="breadcrumb-section">
- <ol id="breadcrumbs">
- <li class="first">
- <span><a href="index.html">Asterisk Project</a></span>
- </li>
- <li>
- <span><a href="Asterisk-13-Command-Reference_29394274.html">Asterisk 13 Command Reference</a></span>
- </li>
- <li>
- <span><a href="Asterisk-13-ARI_29394283.html">Asterisk 13 ARI</a></span>
- </li>
- </ol>
- </div>
- <h1 id="title-heading" class="pagetitle">
- <span id="title-text">
- Asterisk Project : Asterisk 13 Channels REST API
- </span>
- </h1>
- </div>
- <div id="content" class="view">
- <div class="page-metadata">
-
-
-
-
-
-
-
- Created and last modified by <span class='author'> wikibot</span> on Aug 11, 2014
- </div>
- <div id="main-content" class="wiki-content group">
- <h1 id="Asterisk13ChannelsRESTAPI-Channels">Channels</h1>
- <div class="table-wrap"><table class="confluenceTable"><tbody>
- <tr>
- <th class="confluenceTh"><p> Method </p></th>
- <th class="confluenceTh"><p> Path </p></th>
- <th class="confluenceTh"><p> Return Model </p></th>
- <th class="confluenceTh"><p> Summary </p></th>
- </tr>
- <tr>
- <td class="confluenceTd"><p> GET </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Channels-REST-API_29394321.html">/channels</a> </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-REST-Data-Models_29394316.html#Asterisk13RESTDataModels-Channel">List[Channel]</a> </p></td>
- <td class="confluenceTd"><p> List all active channels in Asterisk. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> POST </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Channels-REST-API_29394321.html">/channels</a> </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-REST-Data-Models_29394316.html#Asterisk13RESTDataModels-Channel">Channel</a> </p></td>
- <td class="confluenceTd"><p> Create a new channel (originate). </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> GET </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Channels-REST-API_29394321.html">/channels/{channelId}</a> </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-REST-Data-Models_29394316.html#Asterisk13RESTDataModels-Channel">Channel</a> </p></td>
- <td class="confluenceTd"><p> Channel details. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> POST </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Channels-REST-API_29394321.html">/channels/{channelId}</a> </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-REST-Data-Models_29394316.html#Asterisk13RESTDataModels-Channel">Channel</a> </p></td>
- <td class="confluenceTd"><p> Create a new channel (originate with id). </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> DELETE </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Channels-REST-API_29394321.html">/channels/{channelId}</a> </p></td>
- <td class="confluenceTd"><p> void </p></td>
- <td class="confluenceTd"><p> Delete (i.e. hangup) a channel. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> POST </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Channels-REST-API_29394321.html">/channels/{channelId}/continue</a> </p></td>
- <td class="confluenceTd"><p> void </p></td>
- <td class="confluenceTd"><p> Exit application; continue execution in the dialplan. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> POST </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Channels-REST-API_29394321.html">/channels/{channelId}/answer</a> </p></td>
- <td class="confluenceTd"><p> void </p></td>
- <td class="confluenceTd"><p> Answer a channel. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> POST </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Channels-REST-API_29394321.html">/channels/{channelId}/ring</a> </p></td>
- <td class="confluenceTd"><p> void </p></td>
- <td class="confluenceTd"><p> Indicate ringing to a channel. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> DELETE </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Channels-REST-API_29394321.html">/channels/{channelId}/ring</a> </p></td>
- <td class="confluenceTd"><p> void </p></td>
- <td class="confluenceTd"><p> Stop ringing indication on a channel if locally generated. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> POST </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Channels-REST-API_29394321.html">/channels/{channelId}/dtmf</a> </p></td>
- <td class="confluenceTd"><p> void </p></td>
- <td class="confluenceTd"><p> Send provided DTMF to a given channel. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> POST </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Channels-REST-API_29394321.html">/channels/{channelId}/mute</a> </p></td>
- <td class="confluenceTd"><p> void </p></td>
- <td class="confluenceTd"><p> Mute a channel. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> DELETE </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Channels-REST-API_29394321.html">/channels/{channelId}/mute</a> </p></td>
- <td class="confluenceTd"><p> void </p></td>
- <td class="confluenceTd"><p> Unmute a channel. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> POST </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Channels-REST-API_29394321.html">/channels/{channelId}/hold</a> </p></td>
- <td class="confluenceTd"><p> void </p></td>
- <td class="confluenceTd"><p> Hold a channel. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> DELETE </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Channels-REST-API_29394321.html">/channels/{channelId}/hold</a> </p></td>
- <td class="confluenceTd"><p> void </p></td>
- <td class="confluenceTd"><p> Remove a channel from hold. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> POST </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Channels-REST-API_29394321.html">/channels/{channelId}/moh</a> </p></td>
- <td class="confluenceTd"><p> void </p></td>
- <td class="confluenceTd"><p> Play music on hold to a channel. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> DELETE </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Channels-REST-API_29394321.html">/channels/{channelId}/moh</a> </p></td>
- <td class="confluenceTd"><p> void </p></td>
- <td class="confluenceTd"><p> Stop playing music on hold to a channel. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> POST </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Channels-REST-API_29394321.html">/channels/{channelId}/silence</a> </p></td>
- <td class="confluenceTd"><p> void </p></td>
- <td class="confluenceTd"><p> Play silence to a channel. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> DELETE </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Channels-REST-API_29394321.html">/channels/{channelId}/silence</a> </p></td>
- <td class="confluenceTd"><p> void </p></td>
- <td class="confluenceTd"><p> Stop playing silence to a channel. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> POST </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Channels-REST-API_29394321.html">/channels/{channelId}/play</a> </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-REST-Data-Models_29394316.html#Asterisk13RESTDataModels-Playback">Playback</a> </p></td>
- <td class="confluenceTd"><p> Start playback of media. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> POST </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Channels-REST-API_29394321.html">/channels/{channelId}/play/{playbackId}</a> </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-REST-Data-Models_29394316.html#Asterisk13RESTDataModels-Playback">Playback</a> </p></td>
- <td class="confluenceTd"><p> Start playback of media and specify the playbackId. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> POST </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Channels-REST-API_29394321.html">/channels/{channelId}/record</a> </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-REST-Data-Models_29394316.html#Asterisk13RESTDataModels-LiveRecording">LiveRecording</a> </p></td>
- <td class="confluenceTd"><p> Start a recording. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> GET </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Channels-REST-API_29394321.html">/channels/{channelId}/variable</a> </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-REST-Data-Models_29394316.html#Asterisk13RESTDataModels-Variable">Variable</a> </p></td>
- <td class="confluenceTd"><p> Get the value of a channel variable or function. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> POST </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Channels-REST-API_29394321.html">/channels/{channelId}/variable</a> </p></td>
- <td class="confluenceTd"><p> void </p></td>
- <td class="confluenceTd"><p> Set the value of a channel variable or function. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> POST </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Channels-REST-API_29394321.html">/channels/{channelId}/snoop</a> </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-REST-Data-Models_29394316.html#Asterisk13RESTDataModels-Channel">Channel</a> </p></td>
- <td class="confluenceTd"><p> Start snooping. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> POST </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Channels-REST-API_29394321.html">/channels/{channelId}/snoop/{snoopId}</a> </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-REST-Data-Models_29394316.html#Asterisk13RESTDataModels-Channel">Channel</a> </p></td>
- <td class="confluenceTd"><p> Start snooping. </p></td>
- </tr>
- </tbody></table></div>
- <p><span class="confluence-anchor-link" id="Asterisk13ChannelsRESTAPI-list"></span></p>
- <h2 id="Asterisk13ChannelsRESTAPI-GET/channels">GET /channels</h2>
- <p>List all active channels in Asterisk.</p>
- <p><span class="confluence-anchor-link" id="Asterisk13ChannelsRESTAPI-originate"></span></p>
- <h2 id="Asterisk13ChannelsRESTAPI-POST/channels">POST /channels</h2>
- <p>Create a new channel (originate). The new channel is created immediately and a snapshot of it returned. If a Stasis application is provided it will be automatically subscribed to the originated channel for further events and updates.</p>
- <h3 id="Asterisk13ChannelsRESTAPI-Queryparameters">Query parameters</h3>
- <ul>
- <li>endpoint: string - <strong>(required)</strong> Endpoint to call.</li>
- <li>extension: string - The extension to dial after the endpoint answers</li>
- <li>context: string - The context to dial after the endpoint answers. If omitted, uses 'default'</li>
- <li>priority: long - The priority to dial after the endpoint answers. If omitted, uses 1</li>
- <li>app: string - The application that is subscribed to the originated channel, and passed to the Stasis application.</li>
- <li>appArgs: string - The application arguments to pass to the Stasis application.</li>
- <li>callerId: string - CallerID to use when dialing the endpoint or extension.</li>
- <li>timeout: int = 30 - Timeout (in seconds) before giving up dialing, or -1 for no timeout.</li>
- <li>channelId: string - The unique id to assign the channel on creation.</li>
- <li>otherChannelId: string - The unique id to assign the second channel when using local channels.</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-Bodyparameter">Body parameter</h3>
- <ul>
- <li>variables: containers - The "variables" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { "endpoint": "SIP/Alice", "variables": { "CALLERID(name)": "Alice" } }</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-ErrorResponses">Error Responses</h3>
- <ul>
- <li>400 - Invalid parameters for originating a channel.</li>
- </ul>
- <p><span class="confluence-anchor-link" id="Asterisk13ChannelsRESTAPI-get"></span></p>
- <h2 id="Asterisk13ChannelsRESTAPI-GET/channels/{channelId}">GET /channels/{channelId}</h2>
- <p>Channel details.</p>
- <h3 id="Asterisk13ChannelsRESTAPI-Pathparameters">Path parameters</h3>
- <ul>
- <li>channelId: string - Channel's id</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-ErrorResponses.1">Error Responses</h3>
- <ul>
- <li>404 - Channel not found</li>
- </ul>
- <p><span class="confluence-anchor-link" id="Asterisk13ChannelsRESTAPI-originateWithId"></span></p>
- <h2 id="Asterisk13ChannelsRESTAPI-POST/channels/{channelId}">POST /channels/{channelId}</h2>
- <p>Create a new channel (originate with id). The new channel is created immediately and a snapshot of it returned. If a Stasis application is provided it will be automatically subscribed to the originated channel for further events and updates.</p>
- <h3 id="Asterisk13ChannelsRESTAPI-Pathparameters.1">Path parameters</h3>
- <ul>
- <li>channelId: string - The unique id to assign the channel on creation.</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-Queryparameters.1">Query parameters</h3>
- <ul>
- <li>endpoint: string - <strong>(required)</strong> Endpoint to call.</li>
- <li>extension: string - The extension to dial after the endpoint answers</li>
- <li>context: string - The context to dial after the endpoint answers. If omitted, uses 'default'</li>
- <li>priority: long - The priority to dial after the endpoint answers. If omitted, uses 1</li>
- <li>app: string - The application that is subscribed to the originated channel, and passed to the Stasis application.</li>
- <li>appArgs: string - The application arguments to pass to the Stasis application.</li>
- <li>callerId: string - CallerID to use when dialing the endpoint or extension.</li>
- <li>timeout: int = 30 - Timeout (in seconds) before giving up dialing, or -1 for no timeout.</li>
- <li>otherChannelId: string - The unique id to assign the second channel when using local channels.</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-Bodyparameter.1">Body parameter</h3>
- <ul>
- <li>variables: containers - The "variables" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { "endpoint": "SIP/Alice", "variables": { "CALLERID(name)": "Alice" } }</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-ErrorResponses.2">Error Responses</h3>
- <ul>
- <li>400 - Invalid parameters for originating a channel.</li>
- </ul>
- <p><span class="confluence-anchor-link" id="Asterisk13ChannelsRESTAPI-hangup"></span></p>
- <h2 id="Asterisk13ChannelsRESTAPI-DELETE/channels/{channelId}">DELETE /channels/{channelId}</h2>
- <p>Delete (i.e. hangup) a channel.</p>
- <h3 id="Asterisk13ChannelsRESTAPI-Pathparameters.2">Path parameters</h3>
- <ul>
- <li>channelId: string - Channel's id</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-Queryparameters.2">Query parameters</h3>
- <ul>
- <li>reason: string - Reason for hanging up the channel</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-ErrorResponses.3">Error Responses</h3>
- <ul>
- <li>400 - Invalid reason for hangup provided</li>
- <li>404 - Channel not found</li>
- </ul>
- <p><span class="confluence-anchor-link" id="Asterisk13ChannelsRESTAPI-continueInDialplan"></span></p>
- <h2 id="Asterisk13ChannelsRESTAPI-POST/channels/{channelId}/continue">POST /channels/{channelId}/continue</h2>
- <p>Exit application; continue execution in the dialplan.</p>
- <h3 id="Asterisk13ChannelsRESTAPI-Pathparameters.3">Path parameters</h3>
- <ul>
- <li>channelId: string - Channel's id</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-Queryparameters.3">Query parameters</h3>
- <ul>
- <li>context: string - The context to continue to.</li>
- <li>extension: string - The extension to continue to.</li>
- <li>priority: int - The priority to continue to.</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-ErrorResponses.4">Error Responses</h3>
- <ul>
- <li>404 - Channel not found</li>
- <li>409 - Channel not in a Stasis application</li>
- </ul>
- <p><span class="confluence-anchor-link" id="Asterisk13ChannelsRESTAPI-answer"></span></p>
- <h2 id="Asterisk13ChannelsRESTAPI-POST/channels/{channelId}/answer">POST /channels/{channelId}/answer</h2>
- <p>Answer a channel.</p>
- <h3 id="Asterisk13ChannelsRESTAPI-Pathparameters.4">Path parameters</h3>
- <ul>
- <li>channelId: string - Channel's id</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-ErrorResponses.5">Error Responses</h3>
- <ul>
- <li>404 - Channel not found</li>
- <li>409 - Channel not in a Stasis application</li>
- </ul>
- <p><span class="confluence-anchor-link" id="Asterisk13ChannelsRESTAPI-ring"></span></p>
- <h2 id="Asterisk13ChannelsRESTAPI-POST/channels/{channelId}/ring">POST /channels/{channelId}/ring</h2>
- <p>Indicate ringing to a channel.</p>
- <h3 id="Asterisk13ChannelsRESTAPI-Pathparameters.5">Path parameters</h3>
- <ul>
- <li>channelId: string - Channel's id</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-ErrorResponses.6">Error Responses</h3>
- <ul>
- <li>404 - Channel not found</li>
- <li>409 - Channel not in a Stasis application</li>
- </ul>
- <p><span class="confluence-anchor-link" id="Asterisk13ChannelsRESTAPI-ringStop"></span></p>
- <h2 id="Asterisk13ChannelsRESTAPI-DELETE/channels/{channelId}/ring">DELETE /channels/{channelId}/ring</h2>
- <p>Stop ringing indication on a channel if locally generated.</p>
- <h3 id="Asterisk13ChannelsRESTAPI-Pathparameters.6">Path parameters</h3>
- <ul>
- <li>channelId: string - Channel's id</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-ErrorResponses.7">Error Responses</h3>
- <ul>
- <li>404 - Channel not found</li>
- <li>409 - Channel not in a Stasis application</li>
- </ul>
- <p><span class="confluence-anchor-link" id="Asterisk13ChannelsRESTAPI-sendDTMF"></span></p>
- <h2 id="Asterisk13ChannelsRESTAPI-POST/channels/{channelId}/dtmf">POST /channels/{channelId}/dtmf</h2>
- <p>Send provided DTMF to a given channel.</p>
- <h3 id="Asterisk13ChannelsRESTAPI-Pathparameters.7">Path parameters</h3>
- <ul>
- <li>channelId: string - Channel's id</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-Queryparameters.4">Query parameters</h3>
- <ul>
- <li>dtmf: string - DTMF To send.</li>
- <li>before: int - Amount of time to wait before DTMF digits (specified in milliseconds) start.</li>
- <li>between: int = 100 - Amount of time in between DTMF digits (specified in milliseconds).</li>
- <li>duration: int = 100 - Length of each DTMF digit (specified in milliseconds).</li>
- <li>after: int - Amount of time to wait after DTMF digits (specified in milliseconds) end.</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-ErrorResponses.8">Error Responses</h3>
- <ul>
- <li>400 - DTMF is required</li>
- <li>404 - Channel not found</li>
- <li>409 - Channel not in a Stasis application</li>
- </ul>
- <p><span class="confluence-anchor-link" id="Asterisk13ChannelsRESTAPI-mute"></span></p>
- <h2 id="Asterisk13ChannelsRESTAPI-POST/channels/{channelId}/mute">POST /channels/{channelId}/mute</h2>
- <p>Mute a channel.</p>
- <h3 id="Asterisk13ChannelsRESTAPI-Pathparameters.8">Path parameters</h3>
- <ul>
- <li>channelId: string - Channel's id</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-Queryparameters.5">Query parameters</h3>
- <ul>
- <li>direction: string = both - Direction in which to mute audio</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-ErrorResponses.9">Error Responses</h3>
- <ul>
- <li>404 - Channel not found</li>
- <li>409 - Channel not in a Stasis application</li>
- </ul>
- <p><span class="confluence-anchor-link" id="Asterisk13ChannelsRESTAPI-unmute"></span></p>
- <h2 id="Asterisk13ChannelsRESTAPI-DELETE/channels/{channelId}/mute">DELETE /channels/{channelId}/mute</h2>
- <p>Unmute a channel.</p>
- <h3 id="Asterisk13ChannelsRESTAPI-Pathparameters.9">Path parameters</h3>
- <ul>
- <li>channelId: string - Channel's id</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-Queryparameters.6">Query parameters</h3>
- <ul>
- <li>direction: string = both - Direction in which to unmute audio</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-ErrorResponses.10">Error Responses</h3>
- <ul>
- <li>404 - Channel not found</li>
- <li>409 - Channel not in a Stasis application</li>
- </ul>
- <p><span class="confluence-anchor-link" id="Asterisk13ChannelsRESTAPI-hold"></span></p>
- <h2 id="Asterisk13ChannelsRESTAPI-POST/channels/{channelId}/hold">POST /channels/{channelId}/hold</h2>
- <p>Hold a channel.</p>
- <h3 id="Asterisk13ChannelsRESTAPI-Pathparameters.10">Path parameters</h3>
- <ul>
- <li>channelId: string - Channel's id</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-ErrorResponses.11">Error Responses</h3>
- <ul>
- <li>404 - Channel not found</li>
- <li>409 - Channel not in a Stasis application</li>
- </ul>
- <p><span class="confluence-anchor-link" id="Asterisk13ChannelsRESTAPI-unhold"></span></p>
- <h2 id="Asterisk13ChannelsRESTAPI-DELETE/channels/{channelId}/hold">DELETE /channels/{channelId}/hold</h2>
- <p>Remove a channel from hold.</p>
- <h3 id="Asterisk13ChannelsRESTAPI-Pathparameters.11">Path parameters</h3>
- <ul>
- <li>channelId: string - Channel's id</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-ErrorResponses.12">Error Responses</h3>
- <ul>
- <li>404 - Channel not found</li>
- <li>409 - Channel not in a Stasis application</li>
- </ul>
- <p><span class="confluence-anchor-link" id="Asterisk13ChannelsRESTAPI-startMoh"></span></p>
- <h2 id="Asterisk13ChannelsRESTAPI-POST/channels/{channelId}/moh">POST /channels/{channelId}/moh</h2>
- <p>Play music on hold to a channel. Using media operations such as /play 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.</p>
- <h3 id="Asterisk13ChannelsRESTAPI-Pathparameters.12">Path parameters</h3>
- <ul>
- <li>channelId: string - Channel's id</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-Queryparameters.7">Query parameters</h3>
- <ul>
- <li>mohClass: string - Music on hold class to use</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-ErrorResponses.13">Error Responses</h3>
- <ul>
- <li>404 - Channel not found</li>
- <li>409 - Channel not in a Stasis application</li>
- </ul>
- <p><span class="confluence-anchor-link" id="Asterisk13ChannelsRESTAPI-stopMoh"></span></p>
- <h2 id="Asterisk13ChannelsRESTAPI-DELETE/channels/{channelId}/moh">DELETE /channels/{channelId}/moh</h2>
- <p>Stop playing music on hold to a channel.</p>
- <h3 id="Asterisk13ChannelsRESTAPI-Pathparameters.13">Path parameters</h3>
- <ul>
- <li>channelId: string - Channel's id</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-ErrorResponses.14">Error Responses</h3>
- <ul>
- <li>404 - Channel not found</li>
- <li>409 - Channel not in a Stasis application</li>
- </ul>
- <p><span class="confluence-anchor-link" id="Asterisk13ChannelsRESTAPI-startSilence"></span></p>
- <h2 id="Asterisk13ChannelsRESTAPI-POST/channels/{channelId}/silence">POST /channels/{channelId}/silence</h2>
- <p>Play silence to a channel. Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.</p>
- <h3 id="Asterisk13ChannelsRESTAPI-Pathparameters.14">Path parameters</h3>
- <ul>
- <li>channelId: string - Channel's id</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-ErrorResponses.15">Error Responses</h3>
- <ul>
- <li>404 - Channel not found</li>
- <li>409 - Channel not in a Stasis application</li>
- </ul>
- <p><span class="confluence-anchor-link" id="Asterisk13ChannelsRESTAPI-stopSilence"></span></p>
- <h2 id="Asterisk13ChannelsRESTAPI-DELETE/channels/{channelId}/silence">DELETE /channels/{channelId}/silence</h2>
- <p>Stop playing silence to a channel.</p>
- <h3 id="Asterisk13ChannelsRESTAPI-Pathparameters.15">Path parameters</h3>
- <ul>
- <li>channelId: string - Channel's id</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-ErrorResponses.16">Error Responses</h3>
- <ul>
- <li>404 - Channel not found</li>
- <li>409 - Channel not in a Stasis application</li>
- </ul>
- <p><span class="confluence-anchor-link" id="Asterisk13ChannelsRESTAPI-play"></span></p>
- <h2 id="Asterisk13ChannelsRESTAPI-POST/channels/{channelId}/play">POST /channels/{channelId}/play</h2>
- <p>Start playback of media. The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: 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.)</p>
- <h3 id="Asterisk13ChannelsRESTAPI-Pathparameters.16">Path parameters</h3>
- <ul>
- <li>channelId: string - Channel's id</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-Queryparameters.8">Query parameters</h3>
- <ul>
- <li>media: string - <strong>(required)</strong> Media's URI to play.</li>
- <li>lang: string - For sounds, selects language for sound.</li>
- <li>offsetms: int - Number of media to skip before playing.</li>
- <li>skipms: int = 3000 - Number of milliseconds to skip for forward/reverse operations.</li>
- <li>playbackId: string - Playback ID.</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-ErrorResponses.17">Error Responses</h3>
- <ul>
- <li>404 - Channel not found</li>
- <li>409 - Channel not in a Stasis application</li>
- </ul>
- <p><span class="confluence-anchor-link" id="Asterisk13ChannelsRESTAPI-playWithId"></span></p>
- <h2 id="Asterisk13ChannelsRESTAPI-POST/channels/{channelId}/play/{playbackId}">POST /channels/{channelId}/play/{playbackId}</h2>
- <p>Start playback of media and specify the playbackId. 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.)</p>
- <h3 id="Asterisk13ChannelsRESTAPI-Pathparameters.17">Path parameters</h3>
- <ul>
- <li>channelId: string - Channel's id</li>
- <li>playbackId: string - Playback ID.</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-Queryparameters.9">Query parameters</h3>
- <ul>
- <li>media: string - <strong>(required)</strong> Media's URI to play.</li>
- <li>lang: string - For sounds, selects language for sound.</li>
- <li>offsetms: int - Number of media to skip before playing.</li>
- <li>skipms: int = 3000 - Number of milliseconds to skip for forward/reverse operations.</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-ErrorResponses.18">Error Responses</h3>
- <ul>
- <li>404 - Channel not found</li>
- <li>409 - Channel not in a Stasis application</li>
- </ul>
- <p><span class="confluence-anchor-link" id="Asterisk13ChannelsRESTAPI-record"></span></p>
- <h2 id="Asterisk13ChannelsRESTAPI-POST/channels/{channelId}/record">POST /channels/{channelId}/record</h2>
- <p>Start a recording. 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.</p>
- <h3 id="Asterisk13ChannelsRESTAPI-Pathparameters.18">Path parameters</h3>
- <ul>
- <li>channelId: string - Channel's id</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-Queryparameters.10">Query parameters</h3>
- <ul>
- <li>name: string - <strong>(required)</strong> Recording's filename</li>
- <li>format: string - <strong>(required)</strong> Format to encode audio in</li>
- <li>maxDurationSeconds: int - Maximum duration of the recording, in seconds. 0 for no limit</li>
- <li>maxSilenceSeconds: int - Maximum duration of silence, in seconds. 0 for no limit</li>
- <li>ifExists: string = fail - Action to take if a recording with the same name already exists.</li>
- <li>beep: boolean - Play beep when recording begins</li>
- <li>terminateOn: string = none - DTMF input to terminate recording</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-ErrorResponses.19">Error Responses</h3>
- <ul>
- <li>400 - Invalid parameters</li>
- <li>404 - Channel not found</li>
- <li>409 - Channel is not in a Stasis application; the channel is currently bridged with other hcannels; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail</li>
- <li>422 - The format specified is unknown on this system</li>
- </ul>
- <p><span class="confluence-anchor-link" id="Asterisk13ChannelsRESTAPI-getChannelVar"></span></p>
- <h2 id="Asterisk13ChannelsRESTAPI-GET/channels/{channelId}/variable">GET /channels/{channelId}/variable</h2>
- <p>Get the value of a channel variable or function.</p>
- <h3 id="Asterisk13ChannelsRESTAPI-Pathparameters.19">Path parameters</h3>
- <ul>
- <li>channelId: string - Channel's id</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-Queryparameters.11">Query parameters</h3>
- <ul>
- <li>variable: string - <strong>(required)</strong> The channel variable or function to get</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-ErrorResponses.20">Error Responses</h3>
- <ul>
- <li>400 - Missing variable parameter.</li>
- <li>404 - Channel not found</li>
- <li>409 - Channel not in a Stasis application</li>
- </ul>
- <p><span class="confluence-anchor-link" id="Asterisk13ChannelsRESTAPI-setChannelVar"></span></p>
- <h2 id="Asterisk13ChannelsRESTAPI-POST/channels/{channelId}/variable">POST /channels/{channelId}/variable</h2>
- <p>Set the value of a channel variable or function.</p>
- <h3 id="Asterisk13ChannelsRESTAPI-Pathparameters.20">Path parameters</h3>
- <ul>
- <li>channelId: string - Channel's id</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-Queryparameters.12">Query parameters</h3>
- <ul>
- <li>variable: string - <strong>(required)</strong> The channel variable or function to set</li>
- <li>value: string - The value to set the variable to</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-ErrorResponses.21">Error Responses</h3>
- <ul>
- <li>400 - Missing variable parameter.</li>
- <li>404 - Channel not found</li>
- <li>409 - Channel not in a Stasis application</li>
- </ul>
- <p><span class="confluence-anchor-link" id="Asterisk13ChannelsRESTAPI-snoopChannel"></span></p>
- <h2 id="Asterisk13ChannelsRESTAPI-POST/channels/{channelId}/snoop">POST /channels/{channelId}/snoop</h2>
- <p>Start snooping. Snoop (spy/whisper) on a specific channel.</p>
- <h3 id="Asterisk13ChannelsRESTAPI-Pathparameters.21">Path parameters</h3>
- <ul>
- <li>channelId: string - Channel's id</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-Queryparameters.13">Query parameters</h3>
- <ul>
- <li>spy: string = none - Direction of audio to spy on</li>
- <li>whisper: string = none - Direction of audio to whisper into</li>
- <li>app: string - <strong>(required)</strong> Application the snooping channel is placed into</li>
- <li>appArgs: string - The application arguments to pass to the Stasis application</li>
- <li>snoopId: string - Unique ID to assign to snooping channel</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-ErrorResponses.22">Error Responses</h3>
- <ul>
- <li>400 - Invalid parameters</li>
- <li>404 - Channel not found</li>
- </ul>
- <p><span class="confluence-anchor-link" id="Asterisk13ChannelsRESTAPI-snoopChannelWithId"></span></p>
- <h2 id="Asterisk13ChannelsRESTAPI-POST/channels/{channelId}/snoop/{snoopId}">POST /channels/{channelId}/snoop/{snoopId}</h2>
- <p>Start snooping. Snoop (spy/whisper) on a specific channel.</p>
- <h3 id="Asterisk13ChannelsRESTAPI-Pathparameters.22">Path parameters</h3>
- <ul>
- <li>channelId: string - Channel's id</li>
- <li>snoopId: string - Unique ID to assign to snooping channel</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-Queryparameters.14">Query parameters</h3>
- <ul>
- <li>spy: string = none - Direction of audio to spy on</li>
- <li>whisper: string = none - Direction of audio to whisper into</li>
- <li>app: string - <strong>(required)</strong> Application the snooping channel is placed into</li>
- <li>appArgs: string - The application arguments to pass to the Stasis application</li>
- </ul>
- <h3 id="Asterisk13ChannelsRESTAPI-ErrorResponses.23">Error Responses</h3>
- <ul>
- <li>400 - Invalid parameters</li>
- <li>404 - Channel not found</li>
- </ul>
- </div>
-
-
- </div> </div>
- <div id="footer">
- <section class="footer-body">
- <p>Document generated by Confluence on Aug 11, 2014 13:40</p>
- </section>
- </div>
- </div> </body>
- </html>
|