[asterisk-dev] [Code Review] Rework the Asterisk indications API

Russell Bryant russell at digium.com
Fri Feb 13 16:30:20 CST 2009



> On 2009-02-13 15:58:08, Mark Michelson wrote:
> > /trunk/apps/app_playtones.c, line 52
> > <http://reviewboard.digium.com/r/149/diff/2/?file=2562#file2562line52>
> >
> >     Does "next step" mean the next dialplan priority?

Yes.  Text updated


> On 2009-02-13 15:58:08, Mark Michelson wrote:
> > /trunk/channels/chan_misdn.c, line 3410
> > <http://reviewboard.digium.com/r/149/diff/2/?file=2565#file2565line3410>
> >
> >     Why the cast here? It's already the correct type.

I have no idea.  :-)  I think the element used to be const ...

Anyway, fixed!


> On 2009-02-13 15:58:08, Mark Michelson wrote:
> > /trunk/include/asterisk/indications.h, line 61
> > <http://reviewboard.digium.com/r/149/diff/2/?file=2572#file2572line61>
> >
> >     s/freency/frequency/

Fixed, thanks!


> On 2009-02-13 15:58:08, Mark Michelson wrote:
> > /trunk/include/asterisk/indications.h, line 164
> > <http://reviewboard.digium.com/r/149/diff/2/?file=2572#file2572line164>
> >
> >     Volume is expressed in what sort of units?

Magic.  :-/

It's from the original code, and I haven't looked at it enough to understand it.


> On 2009-02-13 15:58:08, Mark Michelson wrote:
> > /trunk/main/indications.c, line 374
> > <http://reviewboard.digium.com/r/149/diff/2/?file=2576#file2576line374>
> >
> >     This if statement has no body. I suppose there's a missing continue here?

Wow, that line of code was embarrassing.  Thanks!


> On 2009-02-13 15:58:08, Mark Michelson wrote:
> > /trunk/main/indications.c, line 784
> > <http://reviewboard.digium.com/r/149/diff/2/?file=2576#file2576line784>
> >
> >     <indication> should have [] around it to indicate it is optional.

Fixed!


- Russell


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/149/#review418
-----------------------------------------------------------


On 2009-02-11 10:58:48, Russell Bryant wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.digium.com/r/149/
> -----------------------------------------------------------
> 
> (Updated 2009-02-11 10:58:48)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> This patch includes a number of changes to the indications API.  The primary motivation for this work was to improve stability.  The object management in this API was significantly flawed, and a number of trivial situations could cause crashes.
> 
> The changes included are:
> 
> 1) Remove the module res_indications.  This included the critical functionality that actually loaded the indications configuration.  I have seen many people have Asterisk problems because they accidentally did not have an indications.conf present and loaded.  In fact, this came up again in #asterisk-dev today.  Now, this code is in the core, and Asterisk will fail to start without indications configuration.  
> 
> There was one part of res_indications, the dialplan applications, which did belong in a module, and have been moved to a new module, app_playtones.
> 
> 2) Object management has been significantly changed.  Tone zones are now managed using astobj2, and it is no longer possible to crash Asterisk by issuing a reload while tone zones are in use.
> 
> 3) The API documentation has been filled out.
> 
> 4) The API has been updated to follow our naming conventions.
> 
> 5) Various bits of code throughout the tree have been updated to account for the API update.
> 
> 6) Configuration parsing has been mostly re-written.
> 
> 7) "Code cleanup"
> 
> 
> Diffs
> -----
> 
>   /trunk/apps/app_disa.c 174880 
>   /trunk/apps/app_playtones.c PRE-CREATION 
>   /trunk/apps/app_read.c 174880 
>   /trunk/apps/app_readexten.c 174880 
>   /trunk/channels/chan_misdn.c 174880 
>   /trunk/channels/chan_skinny.c 174880 
>   /trunk/channels/chan_unistim.c 174880 
>   /trunk/configs/indications.conf.sample 174880 
>   /trunk/funcs/func_channel.c 174880 
>   /trunk/include/asterisk/_private.h 174880 
>   /trunk/include/asterisk/channel.h 174880 
>   /trunk/include/asterisk/indications.h 174880 
>   /trunk/main/app.c 174880 
>   /trunk/main/asterisk.c 174880 
>   /trunk/main/channel.c 174880 
>   /trunk/main/indications.c 174880 
>   /trunk/main/loader.c 174880 
>   /trunk/main/pbx.c 174880 
>   /trunk/res/res_indications.c 174880 
>   /trunk/res/snmp/agent.c 174880 
> 
> Diff: http://reviewboard.digium.com/r/149/diff
> 
> 
> Testing
> -------
> 
> Basic testing playing different tones using the Playtones() application works fine.
> 
> 
> Thanks,
> 
> Russell
> 
>




More information about the asterisk-dev mailing list