add manager events for Zaptel DND state changes (bug #4070, with mods)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5513 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
c485db98d0
commit
c2c4532496
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Reference in New Issue