[asterisk-dev] [Code Review] Added VM_INFO dialplan function to return voicemail user information
mjordan
reviewboard at asterisk.org
Sat Nov 5 20:08:13 CDT 2011
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1568/#review4701
-----------------------------------------------------------
The only real comment I have with this patch is that you duplicate the MAILBOX_EXISTS function. Since there's already a dedicated function for testing if a mailbox exists, I wouldn't duplicate it here. Also, if you get some time, it'd be great if this had a unit test associated with it - see the test_voicemail_msgcount unit test for an example of this (although I imagine a test for VM_INFO could be a bit less involved). You could certainly submit that as a separate patch if you'd like. Overall, looks like this would be a useful addition to get user information from the dialplan.
trunk/apps/app_voicemail.c
<https://reviewboard.asterisk.org/r/1568/#comment8895>
Red blob
trunk/apps/app_voicemail.c
<https://reviewboard.asterisk.org/r/1568/#comment8896>
Remove this if you decide to not duplicate the functionality in MAILBOX_EXISTS
trunk/apps/app_voicemail.c
<https://reviewboard.asterisk.org/r/1568/#comment8893>
Remove this if you decide to not duplicate the functionality in MAILBOX_EXISTS
- mjordan
On Nov. 5, 2011, 10:56 a.m., shawkris wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1568/
> -----------------------------------------------------------
>
> (Updated Nov. 5, 2011, 10:56 a.m.)
>
>
> Review request for Asterisk Developers.
>
>
> Summary
> -------
>
> Creted VM_INFO dialplan function which can return information about a user defined in the standard voicemail application.
>
> Supported attributes are: email, exists, fullname, pager, password, count.
>
> e.g. from the dialplan, ${VM_INFO(1234 at test,email)} would return the email address for voicemail user 1234 in the test context.
>
> The 'count' attribute can also take a folder parameter and will return the number of messages in that folder, or by default the Inbox.
>
>
> This addresses bug ASTERISK-18634.
> https://issues.asterisk.org/jira/browse/ASTERISK-18634
>
>
> Diffs
> -----
>
> trunk/apps/app_voicemail.c 343488
>
> Diff: https://reviewboard.asterisk.org/r/1568/diff
>
>
> Testing
> -------
>
> Tested with a local dialplan calling the VM_INFO function with each parameter to make sure the expected result was returned. Tested that calling with an invalid attribute parameter produced an error message.
>
>
> Thanks,
>
> shawkris
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20111106/f89bd536/attachment-0001.htm>
More information about the asterisk-dev
mailing list