[asterisk-dev] [Code Review] 3072: Voicemail: Remove mailbox identifier format (box at context) assumptions in the system.

Mark Michelson reviewboard at asterisk.org
Wed Dec 18 16:35:53 CST 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3072/#review10457
-----------------------------------------------------------



/branches/12/apps/app_voicemail.c
<https://reviewboard.asterisk.org/r/3072/#comment19922>

    Going through this code, I've now seen this repeated three times in app_voicemail. Place this into its own function.
    
    /* Prototype */
    int separate_mailbox(char *mailbox_id, char **context, char **mailbox);
    
    /* Usage */
    if (separate_mailbox(ast_strdupa(mailbox_id), &context, &mailbox)) {
        return 0;
    }



/branches/12/configs/chan_dahdi.conf.sample
<https://reviewboard.asterisk.org/r/3072/#comment19926>

    This could use a mention in UPGRADE.txt since previously the command did not specify a context.


- Mark Michelson


On Dec. 18, 2013, 6:51 p.m., rmudgett wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3072/
> -----------------------------------------------------------
> 
> (Updated Dec. 18, 2013, 6:51 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> Removed code from the system for normal mailbox handling that appends @default to the mailbox identifier if it does not have a context.  The only exception is the legacy hasvoicemail users.conf option.  The legacy option will only work for app_voicemail mailboxes.  (I'd like to just remove the hasvoicemail option since it is usually superceeded by an explicit mailbox option. :) )  The system cannot make any assumptions about the format of the mailbox identifer used by app_voicemail.
> 
> chan_sip and chan_dahdi/sig_pri had the most changes because they both tried to interpret the mailbox identifier.  chan_sip just stored and compared the two components.  chan_dahdi actually used the box information.
> 
> The ISDN MWI support configuration options had to be reworked because chan_dahdi was parsing the box at context format to get the box number.  As a result the mwi_vm_boxes chan_dahdi.conf option was added and is documented in the chan_dahdi.conf.sample file.
> 
> 
> Diffs
> -----
> 
>   /branches/12/res/res_xmpp.c 404197 
>   /branches/12/res/res_jabber.c 404197 
>   /branches/12/main/app.c 404197 
>   /branches/12/include/asterisk/app.h 404197 
>   /branches/12/funcs/func_vmcount.c 404197 
>   /branches/12/configs/voicemail.conf.sample 404197 
>   /branches/12/configs/skinny.conf.sample 404197 
>   /branches/12/configs/sip.conf.sample 404197 
>   /branches/12/configs/iax.conf.sample 404197 
>   /branches/12/configs/chan_dahdi.conf.sample 404197 
>   /branches/12/channels/sip/include/sip.h 404197 
>   /branches/12/channels/sig_pri.c 404197 
>   /branches/12/channels/sig_pri.h 404197 
>   /branches/12/channels/h323/chan_h323.h 404197 
>   /branches/12/channels/chan_unistim.c 404197 
>   /branches/12/channels/chan_skinny.c 404197 
>   /branches/12/channels/chan_sip.c 404197 
>   /branches/12/channels/chan_mgcp.c 404197 
>   /branches/12/channels/chan_iax2.c 404197 
>   /branches/12/channels/chan_h323.c 404197 
>   /branches/12/channels/chan_dahdi.c 404197 
>   /branches/12/channels/chan_dahdi.h 404197 
>   /branches/12/apps/app_voicemail.c 404197 
>   /branches/12/UPGRADE.txt 404197 
>   /branches/12/CHANGES 404197 
> 
> Diff: https://reviewboard.asterisk.org/r/3072/diff/
> 
> 
> Testing
> -------
> 
> Tested chan_dahdi to be sure that the new mwi_vm_boxes option parses correctly and sets up mailboxes.
> Tested chan_sip to be sure that the mailbox option works.
> 
> 
> Thanks,
> 
> rmudgett
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20131218/5258c878/attachment-0001.html>


More information about the asterisk-dev mailing list