<html>
<head>
<base href="https://wiki.asterisk.org/wiki">
<link rel="stylesheet" href="/wiki/s/en/2176/25/9/_/styles/combined.css?spaceKey=AST&forWysiwyg=true" type="text/css">
</head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
<h2><a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+API+Improvements">Asterisk 12 API Improvements</a></h2>
<h4>Page <b>edited</b> by <a href="https://wiki.asterisk.org/wiki/display/~dlee">David M. Lee</a>
</h4>
<div id="versionComment">
<b>Comment:</b>
API, events, references<br />
</div>
<br/>
<h4>Changes (16)</h4>
<div id="page-diffs">
<table class="diff" cellpadding="0" cellspacing="0">
<tr><td class="diff-snipped" >...<br></td></tr>
<tr><td class="diff-unchanged" >h2. Configuration <br> <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">h3. stasis-http.conf <br></td></tr>
<tr><td class="diff-unchanged" > <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">h3. project.conf <br> <br></td></tr>
<tr><td class="diff-unchanged" >h4. \[general\] <br> <br>|| Parameter || Description || Type || Default Value || <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">| foo | Turns feature foo on or off | Boolean | True | <br>| bar | A comma delineated list of bar items (pun intended?) | String | | <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">| enabled | Turns Stasis HTTP binding on or off \\ <br>HTTP server must be enabled in http.conf for this to take effect | Boolean | True | <br>| use_manager_auth | Share authentication with AMI over HTTP. | Boolean | False | <br></td></tr>
<tr><td class="diff-unchanged" > <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">h4. \[username\] <br> <br>|| Parameter || Description || Type || Default Value || <br>| password | Password for username | String | n/a | <br>| password_crypt | Encrypted password for username \\ <br>Cannot use digest authentication | String | n/a | <br> <br></td></tr>
<tr><td class="diff-unchanged" >h3. RealTime schemas <br> <br>h2. APIs <br> <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">Add an entry for each Application, Function, AMI command, AMI event, AGI command, CLI command, or other external way of interacting with the features provided by the project. Different APIs require different sets of documentation; in general, sufficient documentation should be provided to create the standard XML documentation for that particular item. <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">h3. Applications <br></td></tr>
<tr><td class="diff-unchanged" > <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">*Stasis* \- direct a call to a Stasis application. <br> <br>*Arguments* <br>* *name* \- Name of the application to direct the call to. <br> <br>h3. RESTful HTTP API <br> <br>As [detailed below|#res_stasis_http], Stasis will expose a RESTful HTTP API for third party call control. This API should be documented using [Swagger|http://swagger.wordnik.com/], which allows for not only the generation of usable, interactive documentation, but also allows for the generation of server stubs, reducing a lot of the tediousness required in implementing a web application in C. <br> <br>Message formats will initially be in JSON, but care will be taken with message design so that adding support for XML will be straightforward. <br> <br>* {{/asterisk}} <br>** {{GET /asterisk/info}} \- Gets Asterisk system information <br>* {{/endpoints}} <br>** {{GET /endpoints}} \- List available endpoints <br>** {{GET /endpoints\{endpointId\} -}} Details for an endpoint <br>* {{/channels}} <br>** {{GET /channels}} \- List active channels <br>** {{POST /channels}} \- Create a new channel (i.e. originate) <br>** {{GET /channels/\{channelId\} -}} Channel details <br>** {{DELETE /channels/\{channelId\} -}} Delete (i.e. hangup) a channel. <br>** {{POST /channels/\{channelId}/reject}} \- Reject a channel <br>** {{POST /channels/\{channelId}/answer}} \- Answer a channel <br>** {{POST /channels/\{channelId}/hangup}} \- Hangup a channel <br>** {{POST /channels/\{channelId}/mute}} \- Mute a channel <br>** {{POST /channels/\{channelId}/unmute}} \- Unmute a channel <br>** {{POST /channels/\{channelId}/record}} \- Start a recording <br>** {{POST /channels/\{channelId}/dial}} \- Originate a new channel and bridge it to this one. <br>* {{/bridges}} <br>** {{GET /bridges}} \- List active bridges <br>** {{POST /bridges}} \- Create a new bridge <br>** {{GET /bridges/\{bridgeId\} -}} Get bridge details <br>** {{DELETE /bridges/\{bridgeId\} -}} Delete bridge <br>** {{POST /bridges/\{bridgeId\}/add-channel}} \- Add a channel to a bridge <br>** {{POST /bridges/\{bridgeId\}/remove-channel}} \- Remove a channel from a bridge <br>** {{POST /bridges/\{bridgeId\}/record}} \- Start a recording <br>* {{/recordings}} <br>** {{GET /recordings}} \- List recordings <br>** {{GET /recordings/\{recordingId\} -}} Get recording details <br>** {{DELETE /recordings/\{recordingId\} -}} Delete recording <br>** {{POST /recordings/\{recordingId\}/stop}} \- Stop recording <br>** {{POST /recordings/\{recordingId\}/pause}} \- Pause recording <br>** {{POST /recordings/\{recordingId\}/unpause}} \- Unpause recording <br>** {{POST /recordings/\{recordingId\}/mute}} \- Mute recording <br>** {{POST /recordings/\{recordingId\}/unmute}} \- Unmute recording <br> <br>h3. WebSocket Commands and Events <br> <br>In addition to responding to commands from the application, Stasis will also need to asynchronously send events to the application, notifying the application of new channels, state changes, etc. There are also a few commands allowing the WebSocket client to subscribe to certain events. <br> <br>As with the RESTful API, these messages will initially be in JSON, with XML coming along later. <br> <br>* Commands <br>** *SubscribeToEndpoints* - Subscribe to events for a particular set of endpoints. <br>** *UnsubscribeToEndpoints* <br>** *ActivateApplication* - Subscribes to channel events for a specific Stasis application. <br>** *DeactivateApplication* <br>* Endpoint Events <br>** *EndpointStateChange* \- Indicates when endpoints go offline/online, and when channels activate/hangup on the endpoint. <br>* Channel Events <br>** *TelephonyEvent* \- DTMF, Hookflash, etc. <br>** *ChannelStateChange* \- Ringing, Established, Cleared, Held, Unheld <br>** *ChannelIncoming* \- Channel being routed to an application <br>* Bridge Events - sent to the Stasis application that created the bridge <br>** *BridgeCreated* <br>** *BridgeDestroyed* <br>** *ChannelEnteredBridge* <br>** *ChannelLeftBridge* <br> <br></td></tr>
<tr><td class="diff-unchanged" >h1. Design <br> <br></td></tr>
<tr><td class="diff-snipped" >...<br></td></tr>
<tr><td class="diff-unchanged" >h1. Test Plan <br> <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">Project should include automated testing, using either the Asterisk Unit Test Framework or the Asterisk Test Suite. Automated testing not only helps collaborators and reviewers verify functionality, but also helps to future proof new functionality against breaking changes in the future. A test plan maps Use Cases, User Stories, or specific APIs to tests that exercise that functionality. Test plans should be broken up by specific pieces of functionality, and should enumerate the tests for each function. <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">Each controller in the RESTful API should have at least one integration test validating that function. Many will have multiple tests to validate failure conditions (originate failed, etc.). <br></td></tr>
<tr><td class="diff-unchanged" > <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">Each test description should provide, at a minimum, the name of the test, the test level (Unit, Integration, or System), and a description of what the test covers. For System level tests (which implies manual testing), a detailed description should be provided such that the test is reproducible by any third party. <br> <br>h2. Tests for Use Case: Bob calls Alice <br> <br></td></tr>
<tr><td class="diff-unchanged" >|| Test || Level || Description || <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">| sip_basic_call | Integration | Test a basic call scenario between two SIP UAs and Asterisk | <br>| sip_uri_parse_nominal | Unit | Nominal parsing of SIP URIs | <br>| sip_uri_parse_off_nominal | Unit | Tests that ensure that off nominal SIP URIs are handled properly | <br>| sip_invite_request_test_nominal | Unit | Test INVITE request handling | <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">| stasis_obj_to_json | Unit | Tests Stasis object to JSON codec | <br>| stasis_obj_to_xml | Unit | Tests Stasis object to XML codec | <br></td></tr>
<tr><td class="diff-unchanged" > <br>h1. Project Planning <br> <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">Provide links to the appropriate JIRA issues tracking work related to the project using the \{jiraissues\} macro (for more information on its usage, see [JIRA Issues Macro|https://confluence.atlassian.com/display/DOC/JIRA+Issues+Macro]). The sample below uses a public Triage filter - you will need to set up a JIRA issue filter for the macro to pull issues from that is shared with the *Public* group. <br> <br></td></tr>
<tr><td class="diff-unchanged" >h2. JIRA Issues <br> <br></td></tr>
<tr><td class="diff-snipped" >...<br></td></tr>
<tr><td class="diff-unchanged" >h1. Reference Information <br> <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">Include links to code reviews, asterisk-dev mailing list discussions, and any other related information. <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">* Stable identifier for channels: <br>** [~dlee:Stable Identifiers for Asterisk] <br>** http://lists.digium.com/pipermail/asterisk-dev/2009-May/038430.html <br>** http://lists.digium.com/pipermail/asterisk-dev/2010-June/044754.html <br>** https://reviewboard.asterisk.org/r/760/ <br>* Stasis API: <br>** http://lists.digium.com/pipermail/asterisk-dev/2012-November/057814.html <br>*** Thread continues here: http://lists.digium.com/pipermail/asterisk-dev/2012-December/057853.html <br>** http://lists.digium.com/pipermail/asterisk-dev/2012-December/057893.html <br></td></tr>
<tr><td class="diff-unchanged" > <br>h1. Footnotes <br></td></tr>
<tr><td class="diff-snipped" >...<br></td></tr>
</table>
</div> <h4>Full Content</h4>
<div class="notificationGreySide">
<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>This page is under development; expect missing and incomplete information. Still, feel free to discuss on <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" class="external-link" rel="nofollow">asterisk-dev</a>.</td></tr></table></div>
<div>
<ul>
<li><a href='#Asterisk12APIImprovements-ProjectOverview'>Project Overview</a></li>
<li><a href='#Asterisk12APIImprovements-RequirementsandSpecification'>Requirements and Specification</a></li>
<ul>
<li><a href='#Asterisk12APIImprovements-StasisRequirements'>Stasis Requirements</a></li>
<ul>
<li><a href='#Asterisk12APIImprovements-AuthorizationRequirements'>Authorization Requirements</a></li>
</ul>
<li><a href='#Asterisk12APIImprovements-InternalImprovements'>Internal Improvements</a></li>
<li><a href='#Asterisk12APIImprovements-UseCases'>Use Cases</a></li>
<ul>
<li><a href='#Asterisk12APIImprovements-SummaryLevel'>Summary Level</a></li>
<li><a href='#Asterisk12APIImprovements-UserLevel'>User Level</a></li>
<li><a href='#Asterisk12APIImprovements-SubfunctionLevel'>Sub-function Level</a></li>
</ul>
<li><a href='#Asterisk12APIImprovements-Guidelines'>Guidelines</a></li>
<ul>
<li><a href='#Asterisk12APIImprovements-PBXvs.Toolkit'>PBX vs. Toolkit</a></li>
<li><a href='#Asterisk12APIImprovements-ConventionoverConfiguration'>Convention over Configuration</a></li>
</ul>
<li><a href='#Asterisk12APIImprovements-Configuration'>Configuration</a></li>
<ul>
<li><a href='#Asterisk12APIImprovements-stasishttp.conf'>stasis-http.conf</a></li>
<li><a href='#Asterisk12APIImprovements-RealTimeschemas'>RealTime schemas</a></li>
</ul>
<li><a href='#Asterisk12APIImprovements-APIs'>APIs</a></li>
<ul>
<li><a href='#Asterisk12APIImprovements-Applications'>Applications</a></li>
<li><a href='#Asterisk12APIImprovements-RESTfulHTTPAPI'>RESTful HTTP API</a></li>
<li><a href='#Asterisk12APIImprovements-WebSocketCommandsandEvents'>WebSocket Commands and Events</a></li>
</ul>
</ul>
<li><a href='#Asterisk12APIImprovements-Design'>Design</a></li>
<ul>
<li><a href='#Asterisk12APIImprovements-PrettyPicture'>Pretty Picture</a></li>
<li><a href='#Asterisk12APIImprovements-ExistingComponents'>Existing Components</a></li>
<ul>
<li><a href='#Asterisk12APIImprovements-manager'>manager</a></li>
<li><a href='#Asterisk12APIImprovements-ActionCallbacks'>Action Callbacks</a></li>
<li><a href='#Asterisk12APIImprovements-Existingmodules'>Existing modules</a></li>
<li><a href='#Asterisk12APIImprovements-InternalAPI%27s'>Internal API's</a></li>
</ul>
<li><a href='#Asterisk12APIImprovements-NewComponents'>New Components</a></li>
<ul>
<li><a href='#Asterisk12APIImprovements-resstasiscore'>res_stasis_core</a></li>
<li><a href='#Asterisk12APIImprovements-resstasishttp'>res_stasis_http</a></li>
<li><a href='#Asterisk12APIImprovements-resstasisfacade'>res_stasis_facade</a></li>
</ul>
</ul>
<li><a href='#Asterisk12APIImprovements-TestPlan'>Test Plan</a></li>
<li><a href='#Asterisk12APIImprovements-ProjectPlanning'>Project Planning</a></li>
<ul>
<li><a href='#Asterisk12APIImprovements-JIRAIssues'>JIRA Issues</a></li>
<li><a href='#Asterisk12APIImprovements-Contributors'>Contributors</a></li>
</ul>
<li><a href='#Asterisk12APIImprovements-ReferenceInformation'>Reference Information</a></li>
<li><a href='#Asterisk12APIImprovements-Footnotes'>Footnotes</a></li>
</ul></div>
<h1><a name="Asterisk12APIImprovements-ProjectOverview"></a>Project Overview</h1>
<p>While Asterisk has a number of interfaces one could use for building telephony applications, they suffer from several significant problems.</p>
<ul>
        <li>Channels identifiers are not stable. Some operations (like <a href="/wiki/display/AST/Asterisk+11+ManagerEvent_Masquerade" title="Asterisk 11 ManagerEvent_Masquerade">masquerades</a>) will change the id out from under you.</li>
        <li>The protocols (AMI and AGI) are non-standard and poorly documented, making them difficult to work with.</li>
        <li>AMI's message format is restricted to simple name/value pairs. Commands that need to pass back lists or structured data are very hackish.</li>
        <li>AMI event filtering is very course grained, and established in configuration instead of at runtime. This has lead to some creative solutions to dealing with the flood of events (most of which are not of interest).</li>
        <li>AGI is a synchronous interface, which really hinders making truly interactive applications.
        <ul>
                <li>While AsyncAGI attempts to address this issue, it is an asynchronous wrapper around a synchronous implementation. Commands queue up after one another, and are not interruptible, leading to many of the same problems with AGI or FastAGI.</li>
        </ul>
        </li>
        <li>Internally, AMI events are formatted into strings at the time they are created. This makes it very difficult to do anything with the events, except send them out AMI connections. This also makes using different protocol formats difficult.</li>
        <li>Different interfaces tend to implement the same logical command in different ways.</li>
</ul>
<p>We're going to start with fixing one of the most glaring problems with the current APIs: <a href="https://issues.asterisk.org/jira/browse/ASTERISK-20725" class="external-link" rel="nofollow">add a stable identifier to channels</a>, and use that identifier consistently throughout AMI. This solves a big problem for current AMI+AGI based applications.</p>
<p>Unfortunately, solving some of the larger problems would be very intrusive with the current API's, and introduce a host of breaking changes. Some are so fundamental, we would essentially be rewriting the interface. That's not acceptable; the current API's aren't going anywhere anytime soon.</p>
<p>This leads us down the path of adding a new interface to Asterisk. We've got some time to put some though into this, so let's do it right. Since things are easier to talk about when they have a name, the new API work has the working title <a href="#Asterisk12APIImprovements-badname">Stasis</a>.</p>
<p>We want the API to be familiar and approachable to developers. We don't want to force them to use C. In fact, we don't want to force them to use any particular programming language; the API should be accessible from the language and platform of their choice.</p>
<p>The API should be relatively high level, and not get stuck down in the details of what's happening inside of Asterisk. Asterisk may go through all sorts of shenanigans to do what it needs to do, but the API should provide a nice, clean abstraction.</p>
<p>In building out the new API, we don't want to repeat past mistakes by re-implement the same functionality several times in slightly different ways. There should be a single core implementation, that all of the API's use. This would improve consistency between the API's and reduce code duplication.</p>
<p>To accomplish this, Stasis will be a set of new modules for providing control and management interfaces into Asterisk. While Stasis will initially be focused on third party call control and monitoring, it should be extensible enough to provide configuration and provisioning API's in the future.</p>
<p>Internally to Asterisk, <tt>stasis-core</tt> will provide a message bus for interfacing with Asterisk objects. The <tt>stasis-http</tt> component will be built upon this message bus to expose a RESTful API, also utilizing WebSockets for asynchronous communication to the external applications.</p>
<p>The split between <tt>stasis-core</tt> and <tt>stasis-http</tt> should allow for other protocol bindings to be added in the future. This could even go so far as replacing the existing API's with Stasis implementations.</p>
<p>The selection of HTTP as the first binding for Stasis allows for very broad appeal, ease of use, and simplicity for writing client libraries to make it easier to write applications to the API.</p>
<h1><a name="Asterisk12APIImprovements-RequirementsandSpecification"></a>Requirements and Specification</h1>
<h2><a name="Asterisk12APIImprovements-StasisRequirements"></a>Stasis Requirements</h2>
<ul>
        <li><b>Asynchronous Everything</b> - Most applications need to be able to interrupt activities, and receive events as they happen. Blocking operations are the devil.</li>
        <li><b>Version Stability</b> - This is important. Like, really important. The current mechanisms may change dramatically between releases, which causes developers/integrators/etc. to keep running on older versions of Asterisk than anyone would like.</li>
        <li><b>Interoperability</b> - Stasis must work in a variety of environments, detailed below.
        <ul>
                <li><b>Programming Language</b> - Stasis applications should be able to be easily written in a variety of languages.</li>
        </ul>
        </li>
        <li><b>Security</b> - Reasonable security measures should be taken.
        <ul>
                <li>Encryption: Since the API should not be accessible on a public network, encryption is not high in the priority list.
                <ul>
                        <li>Even if connections are plain text, reasonable precautions should be taken with sensitive information (e.g. use challenge handshakes for authentication instead of passing plaintext passwords over the wire).</li>
                        <li>If a binding protocol (say, HTTP) supports encryption (say, HTTPS), then it should be supported for Stasis as well.<br/>
Not needed immediately, and way down on the priority list.</li>
                </ul>
                </li>
                <li>Authentication: Client only authentication is sufficient. Should not be any more complicated than passwords/pre-shared secrets.</li>
                <li>Authorization: See <a href="#Asterisk12APIImprovements-StasisAuthorizationRequirements">below</a>.</li>
        </ul>
        </li>
</ul>
<h3><a name="Asterisk12APIImprovements-AuthorizationRequirements"></a>Authorization Requirements</h3>
<p>Unfortunately, authorization is a tricky subject.</p>
<p>There are many different schemes for implementing authorization, and we've learned that if you're not careful you can end up with a scheme that doesn't provide the value that you hoped for, and is more costly than you expected. And this cost shows up in the complexity of both the implementation and the API.</p>
<p>It's also important to understand who you are authorizing. In the case of the API, we are authorizing applications for API access; not (necessarily) the end users of the phone system. It's somewhat similar to the three tier client/application/database relationship. The database authenticates the application, and determines what data the application can access. The application authenticates the client, and determines what subset of that data it exposes to the client. It's not a perfect comparison, but you get the idea.</p>
<p>Possible use cases to consider:</p>
<ul>
        <li><b>Host multiple companies in one PBX</b> - "which channels are one particular user (or group) allowed to follow, manipulate and originate".</li>
        <li><b>Read only applications</b> - A monitoring application should not be able to affect the state of the system.</li>
</ul>
<h2><a name="Asterisk12APIImprovements-InternalImprovements"></a>Internal Improvements</h2>
<ul>
        <li><b>Stable channel identifier</b> - this is necessary for a reasonable Stasis API. Since so much of the world still depends on AMI, it should be updated to allow the stable id to be used in place of the current channel id</li>
        <li><b>AMI Event Structure</b> - AMI events should be generated into a key/value object pair instead of the <tt>printf</tt>-style string formatting currently used. This would allow Stasis to reuse the existing events.</li>
        <li><b>Improved implementation consistency</b> - While not something we would address in the initial Stasis work, existing disparate implementations could be reworked to use a single, consistent <tt>stasis-core</tt> implementation.</li>
        <li><b>Fix AMI Bridge Events</b>
        <ul>
                <li>Current event precludes multi-party bridges (Only has <tt>Channel1</tt> and <tt>Channel2</tt>)</li>
                <li>Some events in the system result in spurious Bridge events (such as <a href="https://issues.asterisk.org/jira/browse/ASTERISK-18639" class="external-link" rel="nofollow">DTMF</a>)</li>
        </ul>
        </li>
</ul>
<h2><a name="Asterisk12APIImprovements-UseCases"></a>Use Cases</h2>
<p>Note that at this point this it the list of <em>candidate</em> use cases. Which ones we get to, and in what priority, have not been determined yet.</p>
<h3><a name="Asterisk12APIImprovements-SummaryLevel"></a>Summary Level</h3>
<p>Highest level use cases; more or less applications that could be build on top of Stasis.</p>
<ul>
        <li><b>Standard two party call</b> - Very standard use case for Asterisk.</li>
        <li><b>Conference</b> - Multi-participant calls, in which media from one endpoint may be sent to two or more endpoints.
        <ul>
                <li>Some participants may control the conference via DTMF key presses</li>
                <li>Some participants may be muted</li>
                <li>Indicate who is speaking</li>
        </ul>
        </li>
        <li><b>IVR</b> - Interactive Voice Response.
        <ul>
                <li>Plays media to caller</li>
                <li>Detects DTMF key presses from caller</li>
                <li>Record media from caller</li>
        </ul>
        </li>
        <li><b>Queue</b> - Call dispatch queue.
        <ul>
                <li>Get presence information from queue agents</li>
                <li>Originate calls to agents as needed</li>
                <li>When agent answers, bridge to most appropriate call from queue</li>
                <li>May add supervisor to agent/caller conversation</li>
        </ul>
        </li>
        <li><b>Voicemail</b>
        <ul>
                <li>Record audio from caller</li>
                <li>Playback recorded audio</li>
                <li>Detect DTMF for media control (fast forward, skip, delete)</li>
        </ul>
        </li>
</ul>
<h3><a name="Asterisk12APIImprovements-UserLevel"></a>User Level</h3>
<ul>
        <li><b>Answer</b> - An application may answer a ringing channel.</li>
        <li><b>Hangup/Reject</b> - An application may hangup an active channel, or reject a ringing channel.</li>
        <li><b>Return to dialplan</b> - An application may send a channel back to the dialplan to continue processing.</li>
        <li><b>Originate</b> - An application may originate a new channel.</li>
        <li><b>DTMF Detection</b> - DTMF, and other channel events.</li>
        <li><b>Bridge</b> - Two or more channels may be bridged together, so that media from any channel may be mixed and sent to the others
        <ul>
                <li><b>Speaker Events</b> - Events indicating which channel(s) on the bridge are speaking.</li>
        </ul>
        </li>
        <li><b>Play</b> - An application may specify media to be played on a channel.</li>
        <li><b>Presence</b> - An application may query the presence state of endpoints, and subscribe to presence updates.</li>
        <li><b>Record</b> - An application may record the media from a channel/bridge.</li>
        <li><b>BLF</b> - The application may light up the BLF on an endpoint.</li>
</ul>
<h3><a name="Asterisk12APIImprovements-SubfunctionLevel"></a>Sub-function Level</h3>
<ul>
        <li><b>Media Control</b> - During the playback of media, the application may issue fine-grained media control commands. (fast forward, pause, stop, etc.)</li>
        <li><b>Mute participant</b> - Within a bridge, an application may (un)mute individual channels, controlling which media streams are mixed and sent to other participants.</li>
</ul>
<h2><a name="Asterisk12APIImprovements-Guidelines"></a>Guidelines</h2>
<h3><a name="Asterisk12APIImprovements-PBXvs.Toolkit"></a>PBX vs. Toolkit</h3>
<p>From the README in trunk: "Asterisk is an Open Source PBX and telephony toolkit." However, whether or not we are PBX-centric has implications for the API.</p>
<p>Currently, Asterisk leans more toward being a toolkit than a PBX. There is a very loose coupling between extensions and endpoints, as is typically defined by dialplan code in the extensions.conf file. There is no concept of 'inside' versus 'outside', unless you put it in the dialplan yourself. There is no standard definition of a 'call', or a 'user'. All of these vary depending upon your application, and being able to be applied to a variety of applications is what has made Asterisk so successful.</p>
<p>However, the primary application Asterisk is applied to is being a PBX. It is important that developers writing PBX applications aren't bogged down with general telephony toolkit details.</p>
<p>So while the PBX use cases are important, they should not undermine the general purpose toolkit use cases. Largely, this will influence default values and conventions of the API.</p>
<h3><a name="Asterisk12APIImprovements-ConventionoverConfiguration"></a>Convention over Configuration</h3>
<p>Continuing on with the theme of PBX vs. Toolkit, the API should adopt an approach of convention over configuration: reasonable defaults should be used wherever possible. Configuration should be possible, allowing users to specify their own values in place of these defaults.</p>
<h2><a name="Asterisk12APIImprovements-Configuration"></a>Configuration</h2>
<h3><a name="Asterisk12APIImprovements-stasishttp.conf"></a>stasis-http.conf</h3>
<h4><a name="Asterisk12APIImprovements-%5Cgeneral%5C"></a>[general]</h4>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Parameter </th>
<th class='confluenceTh'> Description </th>
<th class='confluenceTh'> Type </th>
<th class='confluenceTh'> Default Value </th>
</tr>
<tr>
<td class='confluenceTd'> enabled </td>
<td class='confluenceTd'> Turns Stasis HTTP binding on or off <br class="atl-forced-newline" />
HTTP server must be enabled in http.conf for this to take effect </td>
<td class='confluenceTd'> Boolean </td>
<td class='confluenceTd'> True </td>
</tr>
<tr>
<td class='confluenceTd'> use_manager_auth </td>
<td class='confluenceTd'> Share authentication with AMI over HTTP. </td>
<td class='confluenceTd'> Boolean </td>
<td class='confluenceTd'> False </td>
</tr>
</tbody></table>
</div>
<h4><a name="Asterisk12APIImprovements-%5Cusername%5C"></a>[username]</h4>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Parameter </th>
<th class='confluenceTh'> Description </th>
<th class='confluenceTh'> Type </th>
<th class='confluenceTh'> Default Value </th>
</tr>
<tr>
<td class='confluenceTd'> password </td>
<td class='confluenceTd'> Password for username </td>
<td class='confluenceTd'> String </td>
<td class='confluenceTd'> n/a </td>
</tr>
<tr>
<td class='confluenceTd'> password_crypt </td>
<td class='confluenceTd'> Encrypted password for username <br class="atl-forced-newline" />
Cannot use digest authentication </td>
<td class='confluenceTd'> String </td>
<td class='confluenceTd'> n/a </td>
</tr>
</tbody></table>
</div>
<h3><a name="Asterisk12APIImprovements-RealTimeschemas"></a>RealTime schemas</h3>
<h2><a name="Asterisk12APIImprovements-APIs"></a>APIs</h2>
<h3><a name="Asterisk12APIImprovements-Applications"></a>Applications</h3>
<p><b>Stasis</b> - direct a call to a Stasis application.</p>
<p><b>Arguments</b></p>
<ul>
        <li><b>name</b> - Name of the application to direct the call to.</li>
</ul>
<h3><a name="Asterisk12APIImprovements-RESTfulHTTPAPI"></a>RESTful HTTP API</h3>
<p>As <a href="#Asterisk12APIImprovements-resstasishttp">detailed below</a>, Stasis will expose a RESTful HTTP API for third party call control. This API should be documented using <a href="http://swagger.wordnik.com/" class="external-link" rel="nofollow">Swagger</a>, which allows for not only the generation of usable, interactive documentation, but also allows for the generation of server stubs, reducing a lot of the tediousness required in implementing a web application in C.</p>
<p>Message formats will initially be in JSON, but care will be taken with message design so that adding support for XML will be straightforward.</p>
<ul>
        <li><tt>/asterisk</tt>
        <ul>
                <li><tt>GET /asterisk/info</tt> - Gets Asterisk system information</li>
        </ul>
        </li>
        <li><tt>/endpoints</tt>
        <ul>
                <li><tt>GET /endpoints</tt> - List available endpoints</li>
                <li><tt>GET /endpoints{endpointId} -</tt> Details for an endpoint</li>
        </ul>
        </li>
        <li><tt>/channels</tt>
        <ul>
                <li><tt>GET /channels</tt> - List active channels</li>
                <li><tt>POST /channels</tt> - Create a new channel (i.e. originate)</li>
                <li><tt>GET /channels/{channelId} -</tt> Channel details</li>
                <li><tt>DELETE /channels/{channelId} -</tt> Delete (i.e. hangup) a channel.</li>
                <li><tt>POST /channels/{channelId}/reject</tt> - Reject a channel</li>
                <li><tt>POST /channels/{channelId}/answer</tt> - Answer a channel</li>
                <li><tt>POST /channels/{channelId}/hangup</tt> - Hangup a channel</li>
                <li><tt>POST /channels/{channelId}/mute</tt> - Mute a channel</li>
                <li><tt>POST /channels/{channelId}/unmute</tt> - Unmute a channel</li>
                <li><tt>POST /channels/{channelId}/record</tt> - Start a recording</li>
                <li><tt>POST /channels/{channelId}/dial</tt> - Originate a new channel and bridge it to this one.</li>
        </ul>
        </li>
        <li><tt>/bridges</tt>
        <ul>
                <li><tt>GET /bridges</tt> - List active bridges</li>
                <li><tt>POST /bridges</tt> - Create a new bridge</li>
                <li><tt>GET /bridges/{bridgeId} -</tt> Get bridge details</li>
                <li><tt>DELETE /bridges/{bridgeId} -</tt> Delete bridge</li>
                <li><tt>POST /bridges/{bridgeId}/add-channel</tt> - Add a channel to a bridge</li>
                <li><tt>POST /bridges/{bridgeId}/remove-channel</tt> - Remove a channel from a bridge</li>
                <li><tt>POST /bridges/{bridgeId}/record</tt> - Start a recording</li>
        </ul>
        </li>
        <li><tt>/recordings</tt>
        <ul>
                <li><tt>GET /recordings</tt> - List recordings</li>
                <li><tt>GET /recordings/{recordingId} -</tt> Get recording details</li>
                <li><tt>DELETE /recordings/{recordingId} -</tt> Delete recording</li>
                <li><tt>POST /recordings/{recordingId}/stop</tt> - Stop recording</li>
                <li><tt>POST /recordings/{recordingId}/pause</tt> - Pause recording</li>
                <li><tt>POST /recordings/{recordingId}/unpause</tt> - Unpause recording</li>
                <li><tt>POST /recordings/{recordingId}/mute</tt> - Mute recording</li>
                <li><tt>POST /recordings/{recordingId}/unmute</tt> - Unmute recording</li>
        </ul>
        </li>
</ul>
<h3><a name="Asterisk12APIImprovements-WebSocketCommandsandEvents"></a>WebSocket Commands and Events</h3>
<p>In addition to responding to commands from the application, Stasis will also need to asynchronously send events to the application, notifying the application of new channels, state changes, etc. There are also a few commands allowing the WebSocket client to subscribe to certain events.</p>
<p>As with the RESTful API, these messages will initially be in JSON, with XML coming along later.</p>
<ul>
        <li>Commands
        <ul>
                <li><b>SubscribeToEndpoints</b> - Subscribe to events for a particular set of endpoints.</li>
                <li><b>UnsubscribeToEndpoints</b></li>
                <li><b>ActivateApplication</b> - Subscribes to channel events for a specific Stasis application.</li>
                <li><b>DeactivateApplication</b></li>
        </ul>
        </li>
        <li>Endpoint Events
        <ul>
                <li><b>EndpointStateChange</b> - Indicates when endpoints go offline/online, and when channels activate/hangup on the endpoint.</li>
        </ul>
        </li>
        <li>Channel Events
        <ul>
                <li><b>TelephonyEvent</b> - DTMF, Hookflash, etc.</li>
                <li><b>ChannelStateChange</b> - Ringing, Established, Cleared, Held, Unheld</li>
                <li><b>ChannelIncoming</b> - Channel being routed to an application</li>
        </ul>
        </li>
        <li>Bridge Events - sent to the Stasis application that created the bridge
        <ul>
                <li><b>BridgeCreated</b></li>
                <li><b>BridgeDestroyed</b></li>
                <li><b>ChannelEnteredBridge</b></li>
                <li><b>ChannelLeftBridge</b></li>
        </ul>
        </li>
</ul>
<h1><a name="Asterisk12APIImprovements-Design"></a>Design</h1>
<h2><a name="Asterisk12APIImprovements-PrettyPicture"></a>Pretty Picture</h2>
<p>Visually, this is how it all fits together.</p>
<img src='/wiki/download/temp/graphviz3655810174125771428.png?contentType=image/png&delete=true'/>
<h2><a name="Asterisk12APIImprovements-ExistingComponents"></a>Existing Components</h2>
<p>Stasis will introduce several new modules into Asterisk. To understand how they interact with the existing system, it helps to know some of the existing components.</p>
<h3><a name="Asterisk12APIImprovements-manager"></a>manager</h3>
<p>Existing AMI implementation. Modules may register callbacks for AMI actions, and dispatch AMI events via this component.</p>
<h3><a name="Asterisk12APIImprovements-ActionCallbacks"></a>Action Callbacks</h3>
<p>Existing 'interfaces' for implementing AMI Actions. And by 'interface', I mean callback functions.</p>
<h3><a name="Asterisk12APIImprovements-Existingmodules"></a>Existing modules</h3>
<p>An existing Asterisk module. It already has functions that implements AMI action handlers, and dispatch AMI events.</p>
<h3><a name="Asterisk12APIImprovements-InternalAPI%27s"></a>Internal API's</h3>
<p>Internal state and API's exposed within Asterisk, but not necessarily exposed to the outside world via AMI.</p>
<h2><a name="Asterisk12APIImprovements-NewComponents"></a>New Components</h2>
<h3><a name="Asterisk12APIImprovements-resstasiscore"></a>res_stasis_core</h3>
<p>Core logic for the Stasis framework. This is a coordination layer between protocol bindings (as in stasis-http) and the underlying implementations in Asterisk modules.</p>
<p>The separation of responsibilities between stasis-core and stasis-http keeps the door open for other protocol bindings to be built upon the Stasis API's. While the exact details of how stasis-core exposes the internal API are not defined, at the moment we are leaning towards a generic message bus.</p>
<h3><a name="Asterisk12APIImprovements-resstasishttp"></a>res_stasis_http</h3>
<p>Binding between Stasis and HTTP. While other Stasis bindings are possible, this design allows them to be brought up in addition to the HTTP binding.</p>
<h3><a name="Asterisk12APIImprovements-resstasisfacade"></a>res_stasis_facade</h3>
<p>This allows us to manage existing Asterisk modules without changing them. This wrapper will use the interfaces exposed by modules, taking advantage of both AMI handlers and internal API's to get at richer state information.</p>
<p>By reducing the amount of change required for existing modules to support Stasis, we reduce the risk of Stasis-induced bugs.</p>
<p>As an additional benefit, if we can keep changes to existing code to a minimum, Stasis may be made available as a patch for Asterisk 11.</p>
<h1><a name="Asterisk12APIImprovements-TestPlan"></a>Test Plan</h1>
<p>Each controller in the RESTful API should have at least one integration test validating that function. Many will have multiple tests to validate failure conditions (originate failed, etc.).</p>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Test </th>
<th class='confluenceTh'> Level </th>
<th class='confluenceTh'> Description </th>
</tr>
<tr>
<td class='confluenceTd'> stasis_obj_to_json </td>
<td class='confluenceTd'> Unit </td>
<td class='confluenceTd'> Tests Stasis object to JSON codec </td>
</tr>
<tr>
<td class='confluenceTd'> stasis_obj_to_xml </td>
<td class='confluenceTd'> Unit </td>
<td class='confluenceTd'> Tests Stasis object to XML codec </td>
</tr>
</tbody></table>
</div>
<h1><a name="Asterisk12APIImprovements-ProjectPlanning"></a>Project Planning</h1>
<h2><a name="Asterisk12APIImprovements-JIRAIssues"></a>JIRA Issues</h2>
<p>
<table cellspacing="0" class="grid" style="width: 100%">
<tr>
<th colspan="11" style="text-align: left; ">
<a rel="nofollow" href="https://issues.asterisk.org/jira/secure/IssueNavigator.jspa?requestId=11923&tempMax=1000">JIRA Issues</a> (6 issues) </th>
</tr>
<tr>
<th style="text-align: left; text-transform: capitalize;">Type</th>
<th style="text-align: left; text-transform: capitalize;">Key</th>
<th style="text-align: left; text-transform: capitalize;">Summary</th>
<th style="text-align: left; text-transform: capitalize;">Assignee</th>
<th style="text-align: left; text-transform: capitalize;">Reporter</th>
<th style="text-align: left; text-transform: capitalize;">Priority</th>
<th style="text-align: left; text-transform: capitalize;">Status</th>
<th style="text-align: left; text-transform: capitalize;">Resolution</th>
<th style="text-align: left; text-transform: capitalize;">Created</th>
<th style="text-align: left; text-transform: capitalize;">Updated</th>
<th style="text-align: left; text-transform: capitalize;">Due</th>
</tr>
<tr class="rowNormal">
<td nowrap="true">
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-20736"><img src="https://issues.asterisk.org/jira/images/icons/issue_subtask.gif" alt="Sub-task" border="0" /></a>
</td>
<td nowrap="true">
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-20736">ASTERISK-20736</a>
</td>
<td >
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-20736">Add the ability to query for channels based on their handle value</a>
</td>
<td nowrap="true">
Unassigned
</td>
<td nowrap="true">
Matt Jordan
</td>
<td nowrap="true">
<img src="https://issues.asterisk.org/jira/images/icons/priority_major.gif" alt="Major" border="0" />
</td>
<td nowrap="true">
<img src="https://issues.asterisk.org/jira/images/icons/status_open.gif" alt="" border="0" /> Open
</td>
<td nowrap="true">
<font color="990000">Unresolved</font>
</td>
<td nowrap="true">
Nov 26, 2012
</td>
<td nowrap="true">
Nov 27, 2012
</td>
<td nowrap="true">
</td>
</tr>
<tr class="rowAlternate">
<td nowrap="true">
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-20730"><img src="https://issues.asterisk.org/jira/images/icons/issue_subtask.gif" alt="Sub-task" border="0" /></a>
</td>
<td nowrap="true">
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-20730">ASTERISK-20730</a>
</td>
<td >
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-20730">Add unit tests for UUID library/channel creation</a>
</td>
<td nowrap="true">
Unassigned
</td>
<td nowrap="true">
Matt Jordan
</td>
<td nowrap="true">
<img src="https://issues.asterisk.org/jira/images/icons/priority_major.gif" alt="Major" border="0" />
</td>
<td nowrap="true">
<img src="https://issues.asterisk.org/jira/images/icons/status_open.gif" alt="" border="0" /> Open
</td>
<td nowrap="true">
<font color="990000">Unresolved</font>
</td>
<td nowrap="true">
Nov 26, 2012
</td>
<td nowrap="true">
Nov 27, 2012
</td>
<td nowrap="true">
</td>
</tr>
<tr class="rowNormal">
<td nowrap="true">
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-20729"><img src="https://issues.asterisk.org/jira/images/icons/issue_subtask.gif" alt="Sub-task" border="0" /></a>
</td>
<td nowrap="true">
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-20729">ASTERISK-20729</a>
</td>
<td >
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-20729">Document UUID handle for channels</a>
</td>
<td nowrap="true">
David M. Lee
</td>
<td nowrap="true">
Matt Jordan
</td>
<td nowrap="true">
<img src="https://issues.asterisk.org/jira/images/icons/priority_major.gif" alt="Major" border="0" />
</td>
<td nowrap="true">
<img src="https://issues.asterisk.org/jira/images/icons/status_open.gif" alt="" border="0" /> Open
</td>
<td nowrap="true">
<font color="990000">Unresolved</font>
</td>
<td nowrap="true">
Nov 26, 2012
</td>
<td nowrap="true">
Nov 27, 2012
</td>
<td nowrap="true">
</td>
</tr>
<tr class="rowAlternate">
<td nowrap="true">
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-20728"><img src="https://issues.asterisk.org/jira/images/icons/issue_subtask.gif" alt="Sub-task" border="0" /></a>
</td>
<td nowrap="true">
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-20728">ASTERISK-20728</a>
</td>
<td >
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-20728">Add UUID handle to channel struct</a>
</td>
<td nowrap="true">
David M. Lee
</td>
<td nowrap="true">
Matt Jordan
</td>
<td nowrap="true">
<img src="https://issues.asterisk.org/jira/images/icons/priority_major.gif" alt="Major" border="0" />
</td>
<td nowrap="true">
<img src="https://issues.asterisk.org/jira/images/icons/status_open.gif" alt="" border="0" /> Open
</td>
<td nowrap="true">
<font color="990000">Unresolved</font>
</td>
<td nowrap="true">
Nov 26, 2012
</td>
<td nowrap="true">
Nov 27, 2012
</td>
<td nowrap="true">
</td>
</tr>
<tr class="rowNormal">
<td nowrap="true">
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-20726"><img src="https://issues.asterisk.org/jira/images/icons/issue_subtask.gif" alt="Sub-task" border="0" /></a>
</td>
<td nowrap="true">
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-20726">ASTERISK-20726</a>
</td>
<td >
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-20726">Add UUID support to Asterisk</a>
</td>
<td nowrap="true">
Mark Michelson
</td>
<td nowrap="true">
Matt Jordan
</td>
<td nowrap="true">
<img src="https://issues.asterisk.org/jira/images/icons/priority_major.gif" alt="Major" border="0" />
</td>
<td nowrap="true">
<img src="https://issues.asterisk.org/jira/images/icons/status_open.gif" alt="" border="0" /> Open
</td>
<td nowrap="true">
<font color="990000">Unresolved</font>
</td>
<td nowrap="true">
Nov 26, 2012
</td>
<td nowrap="true">
Dec 04, 2012
</td>
<td nowrap="true">
</td>
</tr>
<tr class="rowAlternate">
<td nowrap="true">
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-20725"><img src="https://issues.asterisk.org/jira/images/icons/newfeature.gif" alt="New Feature" border="0" /></a>
</td>
<td nowrap="true">
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-20725">ASTERISK-20725</a>
</td>
<td >
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-20725">Asterisk API stabilization - Channel Handle/UUID</a>
</td>
<td nowrap="true">
Unassigned
</td>
<td nowrap="true">
Matt Jordan
</td>
<td nowrap="true">
<img src="https://issues.asterisk.org/jira/images/icons/priority_major.gif" alt="Major" border="0" />
</td>
<td nowrap="true">
<img src="https://issues.asterisk.org/jira/images/icons/status_open.gif" alt="" border="0" /> Open
</td>
<td nowrap="true">
<font color="990000">Unresolved</font>
</td>
<td nowrap="true">
Nov 26, 2012
</td>
<td nowrap="true">
Nov 27, 2012
</td>
<td nowrap="true">
</td>
</tr>
</table>
</p>
<h2><a name="Asterisk12APIImprovements-Contributors"></a>Contributors</h2>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Name </th>
<th class='confluenceTh'> E-mail Address </th>
</tr>
<tr>
<td class='confluenceTd'> <a href="/wiki/display/~dlee" class="confluence-userlink" data-username="dlee" >David M. Lee</a> </td>
<td class='confluenceTd'> dlee@digium.com </td>
</tr>
</tbody></table>
</div>
<h1><a name="Asterisk12APIImprovements-ReferenceInformation"></a>Reference Information</h1>
<ul>
        <li>Stable identifier for channels:
        <ul>
                <li><a href="/wiki/display/~dlee/Stable+Identifiers+for+Asterisk" title="Stable Identifiers for Asterisk">Stable Identifiers for Asterisk</a></li>
                <li><a href="http://lists.digium.com/pipermail/asterisk-dev/2009-May/038430.html" class="external-link" rel="nofollow">http://lists.digium.com/pipermail/asterisk-dev/2009-May/038430.html</a></li>
                <li><a href="http://lists.digium.com/pipermail/asterisk-dev/2010-June/044754.html" class="external-link" rel="nofollow">http://lists.digium.com/pipermail/asterisk-dev/2010-June/044754.html</a></li>
                <li><a href="https://reviewboard.asterisk.org/r/760/" class="external-link" rel="nofollow">https://reviewboard.asterisk.org/r/760/</a></li>
        </ul>
        </li>
        <li>Stasis API:
        <ul>
                <li><a href="http://lists.digium.com/pipermail/asterisk-dev/2012-November/057814.html" class="external-link" rel="nofollow">http://lists.digium.com/pipermail/asterisk-dev/2012-November/057814.html</a>
                <ul>
                        <li>Thread continues here: <a href="http://lists.digium.com/pipermail/asterisk-dev/2012-December/057853.html" class="external-link" rel="nofollow">http://lists.digium.com/pipermail/asterisk-dev/2012-December/057853.html</a></li>
                </ul>
                </li>
                <li><a href="http://lists.digium.com/pipermail/asterisk-dev/2012-December/057893.html" class="external-link" rel="nofollow">http://lists.digium.com/pipermail/asterisk-dev/2012-December/057893.html</a></li>
        </ul>
        </li>
</ul>
<h1><a name="Asterisk12APIImprovements-Footnotes"></a>Footnotes</h1>
<ul>
        <li><a name="Asterisk12APIImprovements-badname"></a> While it may stand for "Some Thought Actually Spent In Specification", suggestions for a better name are welcome.</li>
</ul>
</div>
<div id="commentsSection" class="wiki-content pageSection">
<div style="float: right;" class="grey">
<a href="https://wiki.asterisk.org/wiki/users/removespacenotification.action?spaceKey=AST">Stop watching space</a>
<span style="padding: 0px 5px;">|</span>
<a href="https://wiki.asterisk.org/wiki/users/editmyemailsettings.action">Change email notification preferences</a>
</div>
<a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+API+Improvements">View Online</a>
|
<a href="https://wiki.asterisk.org/wiki/pages/diffpagesbyversion.action?pageId=21464586&revisedVersion=8&originalVersion=7">View Changes</a>
|
<a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+API+Improvements?showComments=true&showCommentArea=true#addcomment">Add Comment</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>