[asterisk-dev] [Code Review] Add AMI actions for changing custom device state and generate manager events when device states changes

Russell Bryant russell at digium.com
Tue Feb 23 06:19:08 CST 2010



> On 2010-02-12 20:09:58, Russell Bryant wrote:
> > I think the event is fine.  However, I'm not sure what I think about the new manager actions for getting and setting device states.  The reason I hesitate is because you can already do this via the AMI getvar and setvar actions with the DEVICE_STATE() function.
> 
> haakon wrote:
>     I get what you say. I must admit didn't think that far. But one reason for leaving the get/set device state actions would be to be able to restrict a manager client to only get/set device state data with the new "devicestate" event-class setting in manager.conf.

I'm hesitant to buy into that reasoning.  The current access control system is definitely not built for providing fine grained controls down to the individual events and actions.  If we start doing that, it's going to become a huge mess...


- Russell


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


On 2010-02-04 04:03:34, Olle E Johansson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/488/
> -----------------------------------------------------------
> 
> (Updated 2010-02-04 04:03:34)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> Patch by Haakon
> 
> This patch adds a "DeviceStateChanged" event to AMI. And also introduces AMI commands DeviceStateSet and DeviceStateGet to controll device states from AMI, if func_devicestate is compiled in.
> 
> 
> This addresses bug 16732.
>     https://issues.asterisk.org/view.php?id=16732
> 
> 
> Diffs
> -----
> 
>   /trunk/include/asterisk/manager.h 244686 
>   /trunk/main/devicestate.c 244686 
>   /trunk/main/manager.c 244686 
>   /trunk/funcs/func_devstate.c 244686 
>   /trunk/CHANGES 244686 
>   /trunk/configs/manager.conf.sample 244686 
> 
> Diff: https://reviewboard.asterisk.org/r/488/diff
> 
> 
> Testing
> -------
> 
> Tested by contributor. 
> 
> 
> Thanks,
> 
> Olle E
> 
>




More information about the asterisk-dev mailing list