index = zt_get_index(ast, p, 1);
if (p->sig == SIG_PRI) {
- x = 0;
+ x = 1;
ast_channel_setoption(ast,AST_OPTION_AUDIO_MODE,&x,sizeof(char),0);
}
+ x = 0;
+ zt_confmute(p, 0);
restore_gains(p);
- if (p->dsp)
- ast_dsp_digitmode(p->dsp,DSP_DIGITMODE_DTMF | p->dtmfrelax);
+ ast_dsp_digitmode(p->dsp,DSP_DIGITMODE_DTMF | p->dtmfrelax);
- x = 0;
- zt_confmute(p, 0);
ast_log(LOG_DEBUG, "Hangup: channel: %d index = %d, normal = %d, callwait = %d, thirdcall = %d\n",
p->channel, index, p->subs[SUB_REAL].zfd, p->subs[SUB_CALLWAIT].zfd, p->subs[SUB_THREEWAY].zfd);
p->dialing = 0;
strcpy(p->rdnis, "");
update_conf(p);
+ /* Restore data mode */
+ if (p->sig == SIG_PRI) {
+ x = 0;
+ ast_channel_setoption(ast,AST_OPTION_AUDIO_MODE,&x,sizeof(char),0);
+ }
+
+ if (p->dsp)
restart_monitor();
}
#ifdef ZAPATA_PRI
/* Assume calls are not idle calls unless we're told differently */
i->isidlecall = 0;
- if (i->sig == SIG_PRI) {
- /* Set to audio mode at this poitn mode */
- x = 1;
- ast_channel_setoption(tmp,AST_OPTION_AUDIO_MODE,&x,sizeof(char),0);
- }
#endif
/* Assure there is no confmute on this channel */
zt_confmute(i, 0);
if (strlen(pri->pvt[chan]->exten) && ast_exists_extension(NULL, pri->pvt[chan]->context, pri->pvt[chan]->exten, 1, pri->pvt[chan]->callerid)) {
/* Setup law */
int law;
+ /* Set to audio mode at this poitn mode */
+ law = 1;
+ ast_channel_setoption(tmp,AST_OPTION_AUDIO_MODE,&x,sizeof(char),0);
if (e->ring.layer1 == PRI_LAYER_1_ALAW)
law = ZT_LAW_ALAW;
else