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:
Jeff Peeler
2009-09-10 23:29:14 +00:00
parent a393b47316
commit 3a718192c6
3 changed files with 43 additions and 12 deletions

View File

@@ -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;
}