mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 23:08:32 +00:00
Allow do not disturb to be set on analog channels via the CLI and AMI.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217954 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -3477,3 +3477,22 @@ int analog_fixup(struct ast_channel *oldchan, struct ast_channel *newchan, void
|
||||
analog_update_conf(new_pvt);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int analog_dnd(struct analog_pvt *p, int flag)
|
||||
{
|
||||
if (flag == -1) {
|
||||
return p->dnd;
|
||||
}
|
||||
|
||||
p->dnd = flag;
|
||||
|
||||
ast_verb(3, "%s DND on channel %d\n",
|
||||
flag? "Enabled" : "Disabled",
|
||||
p->channel);
|
||||
manager_event(EVENT_FLAG_SYSTEM, "DNDState",
|
||||
"Channel: DAHDI/%d\r\n"
|
||||
"Status: %s\r\n", p->channel,
|
||||
flag? "enabled" : "disabled");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user