diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-04-06 15:50:18 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-04-06 15:50:18 +0000 |
commit | e20d42804f910c76f70bf0d5e09bd359a66cee56 (patch) | |
tree | 36f1f9d792b40d6ee6a2664a30f884a135f610e6 /channels/chan_zap.c | |
parent | a93d14316ce295733d8fb4d69614304e2a545f33 (diff) |
Print actual hook state in chan_zap
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2637 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_zap.c')
-rwxr-xr-x | channels/chan_zap.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c index 3706e1462..7617478f9 100755 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -7056,6 +7056,7 @@ static int zap_show_channel(int fd, int argc, char **argv) int channel; struct zt_pvt *tmp = NULL; ZT_CONFINFO ci; + ZT_PARAMS ps; int x; if (argc != 4) @@ -7127,8 +7128,12 @@ static int zap_show_channel(int fd, int argc, char **argv) ast_cli(fd, "Actual Confmute: %s\n", x ? "Yes" : "No"); } #endif - ast_mutex_unlock(&iflock); - return RESULT_SUCCESS; + ps.channo = tmp->channel; + if (ioctl(tmp->subs[SUB_REAL].zfd, ZT_GET_PARAMS, &ps) < 0) { + ast_log(LOG_WARNING, "Failed to get parameters on channel %d\n", tmp->channel); + } else { + ast_cli(fd, "Actual Hookstate: %s\n", ps.rxisoffhook ? "Offhook" : "Onhook"); + } } tmp = tmp->next; } |