aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_zap.c
diff options
context:
space:
mode:
authorjim <jim@f38db490-d61c-443f-a65b-d21fe96a405b>2003-03-23 17:14:29 +0000
committerjim <jim@f38db490-d61c-443f-a65b-d21fe96a405b>2003-03-23 17:14:29 +0000
commitab99e2e10eef37f28f07cfb3ceee92f2f6f0b915 (patch)
treea9f8d3cf67367ff98a5f1c5866bc5666434a50c1 /channels/chan_zap.c
parentf9d207f4d433e7e9660c1255754a17c37fb4da1e (diff)
Fixed so that dial from a Zap channel to a Zap channel in 'dataquality' mode actually puts channels into CLEAR mode (so that 56k ISDN calls will work thru it) 64K calls STILL DONT.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@677 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_zap.c')
-rwxr-xr-xchannels/chan_zap.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index d762d87cd..a6a49f3bd 100755
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -1617,6 +1617,8 @@ static int zt_hangup(struct ast_channel *ast)
x = 0;
ast_channel_setoption(ast,AST_OPTION_TONE_VERIFY,&x,sizeof(char),0);
ast_channel_setoption(ast,AST_OPTION_TDD,&x,sizeof(char),0);
+ x = 1;
+ ast_channel_setoption(ast,AST_OPTION_AUDIO_MODE,&x,sizeof(char),0);
p->didtdd = 0;
p->cidspill = NULL;
p->callwaitcas = 0;
@@ -1743,7 +1745,7 @@ int x;
struct zt_pvt *p = chan->pvt->pvt;
- if ((option != AST_OPTION_TONE_VERIFY) &&
+ if ((option != AST_OPTION_TONE_VERIFY) && (option != AST_OPTION_AUDIO_MODE) &&
(option != AST_OPTION_TDD) && (option != AST_OPTION_RELAXDTMF))
{
errno = ENOSYS;
@@ -1857,6 +1859,20 @@ int x;
}
ast_dsp_digitmode(p->dsp,x ? DSP_DIGITMODE_RELAXDTMF : DSP_DIGITMODE_DTMF | p->dtmfrelax);
break;
+ case AST_OPTION_AUDIO_MODE: /* Set AUDIO mode (or not) */
+ if (!*cp)
+ {
+ ast_log(LOG_DEBUG, "Set option AUDIO MODE, value: OFF(0) on %s\n",chan->name);
+ x = 0;
+ }
+ else
+ {
+ ast_log(LOG_DEBUG, "Set option AUDIO MODE, value: ON(1) on %s\n",chan->name);
+ x = 1;
+ }
+ if (ioctl(p->subs[SUB_REAL].zfd, ZT_AUDIOMODE, &x) == -1)
+ ast_log(LOG_WARNING, "Unable to set audio mode on channel %d\n", p->channel);
+ break;
}
errno = 0;
return 0;