[asterisk-app-dev] MWI/Mailboxes ARI specifications
Paul Belanger
paul.belanger at polybeacon.com
Thu Dec 19 13:10:46 CST 2013
On Thu, Dec 19, 2013 at 2:05 PM, Jonathan Rose <jrose at digium.com> wrote:
> On Thu, Dec 19, 2013 at 12:54 PM, Paul Belanger
> <paul.belanger at polybeacon.com> wrote:
>>
>> On Thu, Dec 19, 2013 at 1:42 PM, Paul Belanger
>> <paul.belanger at polybeacon.com> wrote:
>> > On Wed, Dec 18, 2013 at 5:25 PM, Jonathan Rose <jrose at digium.com> wrote:
>> >> ARI Mailboxes resource
>> >>
>> >> I'm currently starting on some basic implementation of the mailboxes
>> >> resource described at
>> >> https://wiki.asterisk.org/wiki/display/AST/Blinky+Lights+API
>> >>
>> >> Data Model:
>> >>
>> >> name: string name of the mailbox
>> >> new_messages: int count of messages that have not been marked as old
>> >> old_messages: int count of messages that have been marked as old
>> >>
>> >> As such, I'm currently writing stub functions for the following
>> >> commands
>> >>
>> >> Method URL Return type
>> >> GET /mailboxes list(mailbox)
>> >> POST /mailboxes mailbox
>> >> GET /mailboxes/{mailboxName} void
>> >> PUT /mailboxes/{mailboxName} void
>> >> DELETE /mailboxes/{mailboxName} void
>> >>
>> >> GET /mailboxes
>> >> List all mailboxes in Asterisk
>> >>
>> >> POST /mailboxes
>> >> Create an empty mailbox
>> >> query parameters:
>> >> mailboxName - name for the mailbox
>> >>
>> >> GET /mailboxes/{mailboxName}
>> >> Get the current state of a mailbox
>> >> path parameters:
>> >> mailboxName - name of the mailbox
>> >> error responses:
>> >> 404 - Mailbox not found
>> >>
>> >> PUT /mailboxes/{mailboxName}
>> >> Change the state of a mailbox
>> >> path parameters:
>> >> mailboxName - name of the mailbox to be modified
>> >> query parameters:
>> >> new_messages - count of new messages in the mailbox
>> >> old_messages - count of old messages in the mailbox
>> >> error responses:
>> >> 404 - Mailbox not found
>> >> 409 - Mailbox not in a stasis application
>> >>
>> >> DELETE /mailboxes/{mailboxName}
>> >> Delete an existing mailbox
>> >> path parameters:
>> >> mailboxName -name of the mailbox to be deleted
>> >> error responses:
>> >> 404 - Mailbox not found
>> >> 409 - Mailbox not in a stasis application
>> >>
>> >> Events:
>> >> MailboxStateChanged
>> >> The contents of a mailbox have changed
>> >> mailbox - name of the mailbox that was changed
>> >>
>> >> MailboxUpdateRequested
>> >> When Asterisk starts, it has no mailbox state from the external
>> >> application. This event requests that the external voicemail
>> >> application put the current mailbox state back into Asterisk.
>> >> mailbox - name of the mailbox Asterisk
>> >>
>> >> I'm still a little hazy on some details, such as whether or not
>> >> mailbox data will be persisted. There was something of a debate
>> >> over the topic that I couldn't quite tell whether it reached a
>> >> concensus and the wiki proposal contained conflicting information.
>> >> I'm unsure how that will affect the ARI work.
>> >>
>> >> If anyone has any input into this, I'd appreciate hearing it before
>> >> getting too deep into the coding of it.
>> >>
>> >> Also, it's worth noting that the Mailboxes resource will not be
>> >> released with Asterisk 12.0, and will likely be a new feature
>> >> slightly down the road (targeting 12.1).
>> >>
>> >> If all of this seems appropriate, I'll go ahead and start trimming
>> >> the more generic topics proposal and getting the details fleshed
>> >> out on the wiki page.
>> >>
>> > So, I had a list of replies I was going to type out, but the more I
>> > did, the more I asked why are mailboxes in ARI, opposed to an ARI
>> > application. I think I am not seeing the big picture, however when I
>> > envision mailboxes, I see an application, like app_voicemail.
>> >
>> > In fact, after we get our ARI queue application working, the next one
>> > on the list was a app_voicemail replacement on ARI.
>> >
>> > Would'nt this be a perfect example of building a mailbox ARI
>> > application on top of Asterisk, then using the exposed MWI to notify
>> > phones of a new message? This would all the information to truely live
>> > outside of asterisk and if asterisk was to disappear not take away all
>> > the information at the same time.
>> >
>> Okay, my reply was also flawed. I guess we are talking about the
>> actually notification mechanism not voicemail boxes.
>>
>> Is the correct?
>>
>> --
>> Paul Belanger | PolyBeacon, Inc.
>> Jabber: paul.belanger at polybeacon.com | IRC: pabelanger (Freenode)
>> Github: https://github.com/pabelanger | Twitter:
>> https://twitter.com/pabelanger
>>
>> _______________________________________________
>> asterisk-app-dev mailing list
>> asterisk-app-dev at lists.digium.com
>> http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev
>
>
> Correct. The ARI mailbox object doesn't actually have anything to do with
> the storage of messages. It
> simply manages an topic which is responsible for relaying information to
> subscribers about the state of
> the mailbox. Specifically, it relays counts of old/new (read/unread)
> messages. Phones generally subscribe
> to the mailboxes so that they can do things like toggle notification lamps
> when new messages come in or
> just provide this basic information about the mailbox themselves.
>
> Formerly, this would all be handled by app_voicemail, but Richard is
> currently working on an external MWI
> API which will allow an external application to directly set mailboxes and
> values (which a phone could then
> subscribe to instead of using an app_voicemail configured mailbox). The
> purpose of this resource is to
> provide ARI a way to hook into that system so that it can be used to control
> the notifications.
>
Okay, that's to Marquis42 and Juggie for being my soundboard. My
confusing was from the 'mailboxes' name, I immediately went to
app_voicemail.
Okay, I'll resume my original comments in a follow email.
--
Paul Belanger | PolyBeacon, Inc.
Jabber: paul.belanger at polybeacon.com | IRC: pabelanger (Freenode)
Github: https://github.com/pabelanger | Twitter: https://twitter.com/pabelanger
More information about the asterisk-app-dev
mailing list