mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-13 00:04:53 +00:00
mer feb 26 20:41:00 CET 2003
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@624 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1,7 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Extended AGI test application
|
* Extended AGI test application
|
||||||
*
|
*
|
||||||
* Copyright (C) 2003, Digium, Inc.
|
* This code is released into public domain
|
||||||
|
* without any warranty of any kind.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@@ -1,7 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* Extended AGI test application
|
* Extended AGI test application
|
||||||
*
|
*
|
||||||
* Copyright (C) 2003, Digium, Inc.
|
* This code is released into the public domain
|
||||||
|
* with no warranty of any kind
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@@ -2375,6 +2375,7 @@ static struct ast_frame *zt_handle_event(struct ast_channel *ast)
|
|||||||
break;
|
break;
|
||||||
case ZT_EVENT_ALARM:
|
case ZT_EVENT_ALARM:
|
||||||
p->inalarm = 1;
|
p->inalarm = 1;
|
||||||
|
ast_log(LOG_WARNING, "Detected alarm on channel %d\n", p->channel);
|
||||||
/* fall through intentionally */
|
/* fall through intentionally */
|
||||||
case ZT_EVENT_ONHOOK:
|
case ZT_EVENT_ONHOOK:
|
||||||
if (p->radio)
|
if (p->radio)
|
||||||
@@ -4075,9 +4076,11 @@ static int handle_init_event(struct zt_pvt *i, int event)
|
|||||||
break;
|
break;
|
||||||
case ZT_EVENT_NOALARM:
|
case ZT_EVENT_NOALARM:
|
||||||
i->inalarm = 0;
|
i->inalarm = 0;
|
||||||
|
ast_log(LOG_NOTICE, "Alarm cleared on channel %d\n", i->channel);
|
||||||
break;
|
break;
|
||||||
case ZT_EVENT_ALARM:
|
case ZT_EVENT_ALARM:
|
||||||
i->inalarm = 1;
|
i->inalarm = 1;
|
||||||
|
ast_log(LOG_WARNING, "Alarm detected on channel %d\n", i->channel);
|
||||||
/* fall thru intentionally */
|
/* fall thru intentionally */
|
||||||
case ZT_EVENT_ONHOOK:
|
case ZT_EVENT_ONHOOK:
|
||||||
/* Back on hook. Hang up. */
|
/* Back on hook. Hang up. */
|
||||||
@@ -4106,6 +4109,10 @@ static int handle_init_event(struct zt_pvt *i, int event)
|
|||||||
res = tone_zone_play_tone(i->subs[SUB_REAL].zfd, -1);
|
res = tone_zone_play_tone(i->subs[SUB_REAL].zfd, -1);
|
||||||
zt_set_hook(i->subs[SUB_REAL].zfd, ZT_ONHOOK);
|
zt_set_hook(i->subs[SUB_REAL].zfd, ZT_ONHOOK);
|
||||||
break;
|
break;
|
||||||
|
case SIG_PRI:
|
||||||
|
zt_disable_ec(i);
|
||||||
|
res = tone_zone_play_tone(i->subs[SUB_REAL].zfd, -1);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
ast_log(LOG_WARNING, "Don't know how to handle on hook with signalling %s on channel %d\n", sig2str(i->sig), i->channel);
|
ast_log(LOG_WARNING, "Don't know how to handle on hook with signalling %s on channel %d\n", sig2str(i->sig), i->channel);
|
||||||
res = tone_zone_play_tone(i->subs[SUB_REAL].zfd, -1);
|
res = tone_zone_play_tone(i->subs[SUB_REAL].zfd, -1);
|
||||||
|
4
cli.c
4
cli.c
@@ -345,6 +345,7 @@ static int handle_showchan(int fd, int argc, char *argv[])
|
|||||||
"1st File Descriptor: %d\n"
|
"1st File Descriptor: %d\n"
|
||||||
" Frames in: %d\n"
|
" Frames in: %d\n"
|
||||||
" Frames out: %d\n"
|
" Frames out: %d\n"
|
||||||
|
" Time to Hangup: %d\n"
|
||||||
" -- PBX --\n"
|
" -- PBX --\n"
|
||||||
" Context: %s\n"
|
" Context: %s\n"
|
||||||
" Extension: %s\n"
|
" Extension: %s\n"
|
||||||
@@ -356,7 +357,8 @@ static int handle_showchan(int fd, int argc, char *argv[])
|
|||||||
c->name, c->type,
|
c->name, c->type,
|
||||||
(c->callerid ? c->callerid : "(N/A)"),
|
(c->callerid ? c->callerid : "(N/A)"),
|
||||||
(c->dnid ? c->dnid : "(N/A)" ), ast_state2str(c->_state), c->_state, c->rings, c->nativeformats, c->writeformat, c->readformat,
|
(c->dnid ? c->dnid : "(N/A)" ), ast_state2str(c->_state), c->_state, c->rings, c->nativeformats, c->writeformat, c->readformat,
|
||||||
c->fds[0], c->fin, c->fout, c->context, c->exten, c->priority, ( c->appl ? c->appl : "(N/A)" ),
|
c->fds[0], c->fin, c->fout, c->whentohangup,
|
||||||
|
c->context, c->exten, c->priority, ( c->appl ? c->appl : "(N/A)" ),
|
||||||
( c-> data ? (strlen(c->data) ? c->data : "(Empty)") : "(None)"),
|
( c-> data ? (strlen(c->data) ? c->data : "(Empty)") : "(None)"),
|
||||||
c->stack, (c->blocking ? c->blockproc : "(Not Blocking)"));
|
c->stack, (c->blocking ? c->blockproc : "(Not Blocking)"));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user