123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399 |
- <!DOCTYPE html>
- <html>
- <head>
- <title>Asterisk Project : Asterisk 13 Bridges 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 Bridges REST API
- </span>
- </h1>
- </div>
- <div id="content" class="view">
- <div class="page-metadata">
-
-
-
-
-
-
-
- Created by <span class='author'> wikibot</span> on Aug 08, 2014
- </div>
- <div id="main-content" class="wiki-content group">
- <h1 id="Asterisk13BridgesRESTAPI-Bridges">Bridges</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-Bridges-REST-API_29394327.html">/bridges</a> </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-REST-Data-Models_29394316.html#Asterisk13RESTDataModels-Bridge">List[Bridge]</a> </p></td>
- <td class="confluenceTd"><p> List all active bridges in Asterisk. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> POST </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Bridges-REST-API_29394327.html">/bridges</a> </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-REST-Data-Models_29394316.html#Asterisk13RESTDataModels-Bridge">Bridge</a> </p></td>
- <td class="confluenceTd"><p> Create a new bridge. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> POST </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Bridges-REST-API_29394327.html">/bridges/{bridgeId}</a> </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-REST-Data-Models_29394316.html#Asterisk13RESTDataModels-Bridge">Bridge</a> </p></td>
- <td class="confluenceTd"><p> Create a new bridge or updates an existing one. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> GET </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Bridges-REST-API_29394327.html">/bridges/{bridgeId}</a> </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-REST-Data-Models_29394316.html#Asterisk13RESTDataModels-Bridge">Bridge</a> </p></td>
- <td class="confluenceTd"><p> Get bridge details. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> DELETE </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Bridges-REST-API_29394327.html">/bridges/{bridgeId}</a> </p></td>
- <td class="confluenceTd"><p> void </p></td>
- <td class="confluenceTd"><p> Shut down a bridge. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> POST </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Bridges-REST-API_29394327.html">/bridges/{bridgeId}/addChannel</a> </p></td>
- <td class="confluenceTd"><p> void </p></td>
- <td class="confluenceTd"><p> Add a channel to a bridge. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> POST </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Bridges-REST-API_29394327.html">/bridges/{bridgeId}/removeChannel</a> </p></td>
- <td class="confluenceTd"><p> void </p></td>
- <td class="confluenceTd"><p> Remove a channel from a bridge. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> POST </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Bridges-REST-API_29394327.html">/bridges/{bridgeId}/moh</a> </p></td>
- <td class="confluenceTd"><p> void </p></td>
- <td class="confluenceTd"><p> Play music on hold to a bridge or change the MOH class that is playing. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> DELETE </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Bridges-REST-API_29394327.html">/bridges/{bridgeId}/moh</a> </p></td>
- <td class="confluenceTd"><p> void </p></td>
- <td class="confluenceTd"><p> Stop playing music on hold to a bridge. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> POST </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Bridges-REST-API_29394327.html">/bridges/{bridgeId}/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 on a bridge. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> POST </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Bridges-REST-API_29394327.html">/bridges/{bridgeId}/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 on a bridge. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> POST </p></td>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Bridges-REST-API_29394327.html">/bridges/{bridgeId}/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>
- </tbody></table></div>
- <p><span class="confluence-anchor-link" id="Asterisk13BridgesRESTAPI-list"></span></p>
- <h2 id="Asterisk13BridgesRESTAPI-GET/bridges">GET /bridges</h2>
- <p>List all active bridges in Asterisk.</p>
- <p><span class="confluence-anchor-link" id="Asterisk13BridgesRESTAPI-create"></span></p>
- <h2 id="Asterisk13BridgesRESTAPI-POST/bridges">POST /bridges</h2>
- <p>Create a new bridge. This bridge persists until it has been shut down, or Asterisk has been shut down.</p>
- <h3 id="Asterisk13BridgesRESTAPI-Queryparameters">Query parameters</h3>
- <ul>
- <li>type: string - Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media).</li>
- <li>bridgeId: string - Unique ID to give to the bridge being created.</li>
- <li>name: string - Name to give to the bridge being created.</li>
- </ul>
- <p><span class="confluence-anchor-link" id="Asterisk13BridgesRESTAPI-create_or_update_with_id"></span></p>
- <h2 id="Asterisk13BridgesRESTAPI-POST/bridges/{bridgeId}">POST /bridges/{bridgeId}</h2>
- <p>Create a new bridge or updates an existing one. This bridge persists until it has been shut down, or Asterisk has been shut down.</p>
- <h3 id="Asterisk13BridgesRESTAPI-Pathparameters">Path parameters</h3>
- <ul>
- <li>bridgeId: string - Unique ID to give to the bridge being created.</li>
- </ul>
- <h3 id="Asterisk13BridgesRESTAPI-Queryparameters.1">Query parameters</h3>
- <ul>
- <li>type: string - Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media) to set.</li>
- <li>name: string - Set the name of the bridge.</li>
- </ul>
- <p><span class="confluence-anchor-link" id="Asterisk13BridgesRESTAPI-get"></span></p>
- <h2 id="Asterisk13BridgesRESTAPI-GET/bridges/{bridgeId}">GET /bridges/{bridgeId}</h2>
- <p>Get bridge details.</p>
- <h3 id="Asterisk13BridgesRESTAPI-Pathparameters.1">Path parameters</h3>
- <ul>
- <li>bridgeId: string - Bridge's id</li>
- </ul>
- <h3 id="Asterisk13BridgesRESTAPI-ErrorResponses">Error Responses</h3>
- <ul>
- <li>404 - Bridge not found</li>
- </ul>
- <p><span class="confluence-anchor-link" id="Asterisk13BridgesRESTAPI-destroy"></span></p>
- <h2 id="Asterisk13BridgesRESTAPI-DELETE/bridges/{bridgeId}">DELETE /bridges/{bridgeId}</h2>
- <p>Shut down a bridge. If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.</p>
- <h3 id="Asterisk13BridgesRESTAPI-Pathparameters.2">Path parameters</h3>
- <ul>
- <li>bridgeId: string - Bridge's id</li>
- </ul>
- <h3 id="Asterisk13BridgesRESTAPI-ErrorResponses.1">Error Responses</h3>
- <ul>
- <li>404 - Bridge not found</li>
- </ul>
- <p><span class="confluence-anchor-link" id="Asterisk13BridgesRESTAPI-addChannel"></span></p>
- <h2 id="Asterisk13BridgesRESTAPI-POST/bridges/{bridgeId}/addChannel">POST /bridges/{bridgeId}/addChannel</h2>
- <p>Add a channel to a bridge.</p>
- <h3 id="Asterisk13BridgesRESTAPI-Pathparameters.3">Path parameters</h3>
- <ul>
- <li>bridgeId: string - Bridge's id</li>
- </ul>
- <h3 id="Asterisk13BridgesRESTAPI-Queryparameters.2">Query parameters</h3>
- <ul>
- <li>channel: string - <strong>(required)</strong> Ids of channels to add to bridge
- <ul>
- <li>Allows comma separated values.</li>
- </ul>
- </li>
- <li>role: string - Channel's role in the bridge</li>
- </ul>
- <h3 id="Asterisk13BridgesRESTAPI-ErrorResponses.2">Error Responses</h3>
- <ul>
- <li>400 - Channel not found</li>
- <li>404 - Bridge not found</li>
- <li>409 - Bridge not in Stasis application; Channel currently recording</li>
- <li>422 - Channel not in Stasis application</li>
- </ul>
- <p><span class="confluence-anchor-link" id="Asterisk13BridgesRESTAPI-removeChannel"></span></p>
- <h2 id="Asterisk13BridgesRESTAPI-POST/bridges/{bridgeId}/removeChannel">POST /bridges/{bridgeId}/removeChannel</h2>
- <p>Remove a channel from a bridge.</p>
- <h3 id="Asterisk13BridgesRESTAPI-Pathparameters.4">Path parameters</h3>
- <ul>
- <li>bridgeId: string - Bridge's id</li>
- </ul>
- <h3 id="Asterisk13BridgesRESTAPI-Queryparameters.3">Query parameters</h3>
- <ul>
- <li>channel: string - <strong>(required)</strong> Ids of channels to remove from bridge
- <ul>
- <li>Allows comma separated values.</li>
- </ul>
- </li>
- </ul>
- <h3 id="Asterisk13BridgesRESTAPI-ErrorResponses.3">Error Responses</h3>
- <ul>
- <li>400 - Channel not found</li>
- <li>404 - Bridge not found</li>
- <li>409 - Bridge not in Stasis application</li>
- <li>422 - Channel not in this bridge</li>
- </ul>
- <p><span class="confluence-anchor-link" id="Asterisk13BridgesRESTAPI-startMoh"></span></p>
- <h2 id="Asterisk13BridgesRESTAPI-POST/bridges/{bridgeId}/moh">POST /bridges/{bridgeId}/moh</h2>
- <p>Play music on hold to a bridge or change the MOH class that is playing.</p>
- <h3 id="Asterisk13BridgesRESTAPI-Pathparameters.5">Path parameters</h3>
- <ul>
- <li>bridgeId: string - Bridge's id</li>
- </ul>
- <h3 id="Asterisk13BridgesRESTAPI-Queryparameters.4">Query parameters</h3>
- <ul>
- <li>mohClass: string - Channel's id</li>
- </ul>
- <h3 id="Asterisk13BridgesRESTAPI-ErrorResponses.4">Error Responses</h3>
- <ul>
- <li>404 - Bridge not found</li>
- <li>409 - Bridge not in Stasis application</li>
- </ul>
- <p><span class="confluence-anchor-link" id="Asterisk13BridgesRESTAPI-stopMoh"></span></p>
- <h2 id="Asterisk13BridgesRESTAPI-DELETE/bridges/{bridgeId}/moh">DELETE /bridges/{bridgeId}/moh</h2>
- <p>Stop playing music on hold to a bridge. This will only stop music on hold being played via POST bridges/{bridgeId}/moh.</p>
- <h3 id="Asterisk13BridgesRESTAPI-Pathparameters.6">Path parameters</h3>
- <ul>
- <li>bridgeId: string - Bridge's id</li>
- </ul>
- <h3 id="Asterisk13BridgesRESTAPI-ErrorResponses.5">Error Responses</h3>
- <ul>
- <li>404 - Bridge not found</li>
- <li>409 - Bridge not in Stasis application</li>
- </ul>
- <p><span class="confluence-anchor-link" id="Asterisk13BridgesRESTAPI-play"></span></p>
- <h2 id="Asterisk13BridgesRESTAPI-POST/bridges/{bridgeId}/play">POST /bridges/{bridgeId}/play</h2>
- <p>Start playback of media on a bridge. 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="Asterisk13BridgesRESTAPI-Pathparameters.7">Path parameters</h3>
- <ul>
- <li>bridgeId: string - Bridge's id</li>
- </ul>
- <h3 id="Asterisk13BridgesRESTAPI-Queryparameters.5">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="Asterisk13BridgesRESTAPI-ErrorResponses.6">Error Responses</h3>
- <ul>
- <li>404 - Bridge not found</li>
- <li>409 - Bridge not in a Stasis application</li>
- </ul>
- <p><span class="confluence-anchor-link" id="Asterisk13BridgesRESTAPI-playWithId"></span></p>
- <h2 id="Asterisk13BridgesRESTAPI-POST/bridges/{bridgeId}/play/{playbackId}">POST /bridges/{bridgeId}/play/{playbackId}</h2>
- <p>Start playback of media on a bridge. 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="Asterisk13BridgesRESTAPI-Pathparameters.8">Path parameters</h3>
- <ul>
- <li>bridgeId: string - Bridge's id</li>
- <li>playbackId: string - Playback ID.</li>
- </ul>
- <h3 id="Asterisk13BridgesRESTAPI-Queryparameters.6">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="Asterisk13BridgesRESTAPI-ErrorResponses.7">Error Responses</h3>
- <ul>
- <li>404 - Bridge not found</li>
- <li>409 - Bridge not in a Stasis application</li>
- </ul>
- <p><span class="confluence-anchor-link" id="Asterisk13BridgesRESTAPI-record"></span></p>
- <h2 id="Asterisk13BridgesRESTAPI-POST/bridges/{bridgeId}/record">POST /bridges/{bridgeId}/record</h2>
- <p>Start a recording. This records the mixed audio from all channels participating in this bridge.</p>
- <h3 id="Asterisk13BridgesRESTAPI-Pathparameters.9">Path parameters</h3>
- <ul>
- <li>bridgeId: string - Bridge's id</li>
- </ul>
- <h3 id="Asterisk13BridgesRESTAPI-Queryparameters.7">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="Asterisk13BridgesRESTAPI-ErrorResponses.8">Error Responses</h3>
- <ul>
- <li>400 - Invalid parameters</li>
- <li>404 - Bridge not found</li>
- <li>409 - Bridge is not in a Stasis application; 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>
- </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>
|