add manager events for Zaptel DND state changes (bug #4070, with mods)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2005-04-27 04:03:49 +00:00
parent 14fba8d8be
commit 22ef00edde
2 changed files with 13 additions and 2 deletions

View File

@@ -5291,8 +5291,12 @@ static void *ss_thread(void *data)
break;
} else if (!strcmp(exten, "*78")) {
/* Do not disturb */
if (option_verbose > 2)
if (option_verbose > 2) {
ast_verbose(VERBOSE_PREFIX_3 "Enabled DND on channel %d\n", p->channel);
manager_event(EVENT_FLAG_SYSTEM, "DNDState",
"Channel: Zap/%d\r\n"
"Status: enabled\r\n", p->channel);
}
res = tone_zone_play_tone(p->subs[index].zfd, ZT_TONE_DIALRECALL);
p->dnd = 1;
getforward = 0;
@@ -5300,8 +5304,12 @@ static void *ss_thread(void *data)
len = 0;
} else if (!strcmp(exten, "*79")) {
/* Do not disturb */
if (option_verbose > 2)
if (option_verbose > 2) {
ast_verbose(VERBOSE_PREFIX_3 "Disabled DND on channel %d\n", p->channel);
manager_event(EVENT_FLAG_SYSTEM, "DNDState",
"Channel: Zap/%d\r\n"
"Status: disabled\r\n", p->channel);
}
res = tone_zone_play_tone(p->subs[index].zfd, ZT_TONE_DIALRECALL);
p->dnd = 0;
getforward = 0;
@@ -9353,10 +9361,12 @@ static int action_zapshowchannels(struct mansession *s, struct message *m)
"Channel: %d\r\n"
"Signalling: %s\r\n"
"Context: %s\r\n"
"DND: %s\r\n"
"Alarm: %s\r\n"
"%s"
"\r\n",
tmp->channel, sig2str(tmp->sig), tmp->context,
tmp->dnd ? "Enabled" : "Disabled",
alarm2str(alarm), idText);
ast_mutex_unlock(&s->lock);
}

View File

@@ -275,6 +275,7 @@ Some standard AMI headers:
Status: -- Peer status (if monitored) ** Will change name **
"unknown", "lagged", "ok"
Status: <num> -- Queue Status
Status: -- DND status (DNDState)
Time: <sec> -- Roundtrip time (latency)
Timeout: -- Parking timeout time
Timeout: -- Timeout for call setup (Originate)