<div dir="ltr">I'm currently starting on some basic implementation of the mailboxes<br><div><div>resource described at</div><div><a href="https://wiki.asterisk.org/wiki/display/AST/Blinky+Lights+API">https://wiki.asterisk.org/wiki/display/AST/Blinky+Lights+API</a></div>
<div><br></div><div>Data Model:</div><div><br></div><div>name: string name of the mailbox</div><div>new_messages: int count of messages that have not been marked as old</div><div>old_messages: int count of messages that have been marked as old</div>
<div><br></div><div>As such, I'm currently writing stub functions for the following commands</div><div><br></div><div>Method URL Return type </div><div>GET /mailboxes list(mailbox)</div>
<div>POST /mailboxes mailbox</div><div>GET /mailboxes/{mailboxName} void</div><div>PUT /mailboxes/{mailboxName} void</div><div>DELETE /mailboxes/{mailboxName} void</div><div><br></div>
<div>GET /mailboxes</div><div>List all mailboxes in Asterisk</div><div><br></div><div>POST /mailboxes</div><div>Create an empty mailbox</div><div>query parameters:</div><div> mailboxName - name for the mailbox</div><div>
<br></div><div>GET /mailboxes/{mailboxName}</div><div>Get the current state of a mailbox</div><div>path parameters:</div><div> mailboxName - name of the mailbox</div><div>error responses:</div><div> 404 - Mailbox not found</div>
<div><br></div><div>PUT /mailboxes/{mailboxName}</div><div>Change the state of a mailbox</div><div>path parameters:</div><div> mailboxName - name of the mailbox to be modified</div><div>query parameters:</div><div> new_messages - count of new messages in the mailbox</div>
<div> old_messages - count of old messages in the mailbox</div><div>error responses:</div><div> 404 - Mailbox not found</div><div> 409 - Mailbox not in a stasis application</div><div><br></div><div>DELETE /mailboxes/{mailboxName}</div>
<div>Delete an existing mailbox</div><div>path parameters:</div><div> mailboxName -name of the mailbox to be deleted</div><div>error responses:</div><div> 404 - Mailbox not found</div><div> 409 - Mailbox not in a stasis application</div>
<div><br></div><div>Events:</div><div>MailboxStateChanged</div><div> The contents of a mailbox have changed</div><div> mailbox - name of the mailbox that was changed</div><div><br></div><div>MailboxUpdateRequested</div>
<div> When Asterisk starts, it has no mailbox state from the external</div><div> application. This event requests that the external voicemail</div><div> application put the current mailbox state back into Asterisk.</div>
<div> mailbox - name of the mailbox Asterisk</div><div><br></div><div>I'm still a little hazy on some details, such as whether or not</div><div>mailbox data will be persisted. There was something of a debate</div><div>
over the topic that I couldn't quite tell whether it reached a</div><div>consensus and the wiki proposal contained conflicting information.</div><div>I'm unsure how that will affect the ARI work.</div><div><br></div>
<div>If anyone has any input into this, I'd appreciate hearing it before</div><div>getting too deep into the coding of it.</div><div><br></div><div>Also, it's worth noting that the Mailboxes resource will not be</div>
<div>released with Asterisk 12.0, and will likely be a new feature</div><div>slightly down the road (targeting 12.1).</div></div><div><br></div>-- <br><div dir="ltr">Jonathan R. Rose<br>Digium, Inc. | Software Engineer<br>
445 Jan Davis Drive NW - Huntsville, AL 35806 - US<br>direct +1 256 428 6139 <br><br>Check us out at: <a href="http://digium.com" target="_blank">http://digium.com</a> & <a href="http://asterisk.org" target="_blank">http://asterisk.org</a><br>
<br></div>
</div>