mirror of
https://github.com/asterisk/asterisk.git
synced 2026-06-09 03:45:27 +00:00
in the case immediate=yes, we directly jump into the dialplan, where people can use PlayTones to indicate a Dialtone, so we don't need to to that by ourself. also we should not do a dialtone_indicate for incoming calls on a TE port in overlapdialmode.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@64513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2311,10 +2311,17 @@ static int misdn_write(struct ast_channel *ast, struct ast_frame *frame)
|
||||
|
||||
if ( !frame->samples ) {
|
||||
chan_misdn_log(4, ch->bc->port, "misdn_write: zero write\n");
|
||||
if (ch->state == MISDN_WAITING4DIGS) {
|
||||
chan_misdn_log(4, ch->bc->port, "misdn_write: WAIT4DIGS ..\n");
|
||||
|
||||
if (!strcmp(frame->src,"ast_prod")) {
|
||||
chan_misdn_log(1, ch->bc->port, "misdn_write: state (%s) prodded.\n", misdn_get_ch_state(ch));
|
||||
|
||||
if (ch->ts) {
|
||||
chan_misdn_log(4,ch->bc->port,"Starting Playtones\n");
|
||||
misdn_lib_tone_generator_start(ch->bc);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -2499,9 +2506,8 @@ static int dialtone_indicate(struct chan_list *cl)
|
||||
if (ts) {
|
||||
cl->notxtone=0;
|
||||
cl->norxtone=0;
|
||||
/* This prods us in misdn_write */
|
||||
ast_playtones_start(ast,0, ts->data, 0);
|
||||
chan_misdn_log(4,cl->bc->port,"Starting Playtones\n");
|
||||
misdn_lib_tone_generator_start(cl->bc);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -3181,11 +3187,6 @@ static void do_immediate_setup(struct misdn_bchannel *bc,struct chan_list *ch ,
|
||||
ch->state = MISDN_INCOMING_SETUP;
|
||||
}
|
||||
|
||||
if ( !bc->nt && (ch->orginator==ORG_MISDN) && !ch->incoming_early_audio )
|
||||
chan_misdn_log(1,bc->port, " --> incoming_early_audio off\n");
|
||||
else
|
||||
dialtone_indicate(ch);
|
||||
|
||||
chan_misdn_log(1, bc->port, "* Starting Ast ctx:%s dad:%s oad:%s with 's' extension\n", ast->context, ast->exten, AST_CID_P(ast));
|
||||
|
||||
strncpy(ast->exten,"s", 2);
|
||||
@@ -3801,7 +3802,8 @@ cb_events(enum event_e event, struct misdn_bchannel *bc, void *user_data)
|
||||
if ( (!ast_strlen_zero(bc->dad)) && stop_tone )
|
||||
stop_indicate(ch);
|
||||
else {
|
||||
dialtone_indicate(ch);
|
||||
if (bc->nt)
|
||||
dialtone_indicate(ch);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user