mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-20 12:20:12 +00:00
This introduces a new dialplan function, DEVSTATE, which allows you to do some
pretty cool things. First, you can get the device state of anything in the dialplan: NoOp(SIP/mypeer has state ${DEVSTATE(SIP/mypeer)}) NoOp(The conference room 1234 has state ${DEVSTATE(MeetMe:1234)}) Most importantly, this allows you to create custom device states so you can control phone lamps directly from the dialplan. Set(DEVSTATE(Custom:mycustomlamp)=BUSY) ... exten => mycustomlamp,hint,Custom:mycustomlamp git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@54261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
16
main/cli.c
16
main/cli.c
@@ -1354,20 +1354,24 @@ int ast_cli_register(struct ast_cli_entry *e)
|
||||
/*
|
||||
* register/unregister an array of entries.
|
||||
*/
|
||||
void ast_cli_register_multiple(struct ast_cli_entry *e, int len)
|
||||
int ast_cli_register_multiple(struct ast_cli_entry *e, int len)
|
||||
{
|
||||
int i;
|
||||
int i, res = 0;
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
ast_cli_register(e + i);
|
||||
res |= ast_cli_register(e + i);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
void ast_cli_unregister_multiple(struct ast_cli_entry *e, int len)
|
||||
int ast_cli_unregister_multiple(struct ast_cli_entry *e, int len)
|
||||
{
|
||||
int i;
|
||||
int i, res = 0;
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
ast_cli_unregister(e + i);
|
||||
res |= ast_cli_unregister(e + i);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user