mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-08 19:08:14 +00:00
added nttimeout option to configure wether we disconnect calls on NT timeouts or not during an overlapdial session
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@46176 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -191,6 +191,9 @@ struct chan_list {
|
|||||||
int dropped_frame_cnt;
|
int dropped_frame_cnt;
|
||||||
|
|
||||||
int far_alerting;
|
int far_alerting;
|
||||||
|
|
||||||
|
int nttimeout;
|
||||||
|
|
||||||
int other_pid;
|
int other_pid;
|
||||||
struct chan_list *other_ch;
|
struct chan_list *other_ch;
|
||||||
|
|
||||||
@@ -1416,6 +1419,7 @@ static int read_config(struct chan_list *ch, int orig) {
|
|||||||
misdn_cfg_get( port, MISDN_CFG_SENDDTMF, &bc->send_dtmf, sizeof(int));
|
misdn_cfg_get( port, MISDN_CFG_SENDDTMF, &bc->send_dtmf, sizeof(int));
|
||||||
|
|
||||||
misdn_cfg_get( port, MISDN_CFG_NEED_MORE_INFOS, &bc->need_more_infos, sizeof(int));
|
misdn_cfg_get( port, MISDN_CFG_NEED_MORE_INFOS, &bc->need_more_infos, sizeof(int));
|
||||||
|
misdn_cfg_get( port, MISDN_CFG_NTTIMEOUT, &ch->nttimeout, sizeof(int));
|
||||||
|
|
||||||
misdn_cfg_get( port, MISDN_CFG_FAR_ALERTING, &ch->far_alerting, sizeof(int));
|
misdn_cfg_get( port, MISDN_CFG_FAR_ALERTING, &ch->far_alerting, sizeof(int));
|
||||||
|
|
||||||
@@ -2361,11 +2365,14 @@ enum ast_bridge_result misdn_bridge (struct ast_channel *c0,
|
|||||||
*rc=who;
|
*rc=who;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
if (f->frametype == AST_FRAME_VOICE) {
|
if (f->frametype == AST_FRAME_VOICE) {
|
||||||
chan_misdn_log(1,0,"Got Voice frame in Bridged state..\n");
|
chan_misdn_log(1, ch1->bc->port, "I SEND: Splitting conference with Number:%d\n", ch1->bc->pid +1);
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (who == c0) {
|
if (who == c0) {
|
||||||
ast_write(c1,f);
|
ast_write(c1,f);
|
||||||
@@ -3943,9 +3950,11 @@ cb_events(enum event_e event, struct misdn_bchannel *bc, void *user_data)
|
|||||||
chan_misdn_log(1,bc->port,"--> state: %s\n",misdn_get_ch_state(ch));
|
chan_misdn_log(1,bc->port,"--> state: %s\n",misdn_get_ch_state(ch));
|
||||||
|
|
||||||
switch (ch->state) {
|
switch (ch->state) {
|
||||||
case MISDN_CALLING:
|
|
||||||
case MISDN_DIALING:
|
case MISDN_DIALING:
|
||||||
case MISDN_PROGRESS:
|
case MISDN_PROGRESS:
|
||||||
|
if (bc->nt && !ch->nttimeout) break;
|
||||||
|
|
||||||
|
case MISDN_CALLING:
|
||||||
case MISDN_ALERTING:
|
case MISDN_ALERTING:
|
||||||
case MISDN_PROCEEDING:
|
case MISDN_PROCEEDING:
|
||||||
case MISDN_CALLING_ACKNOWLEDGE:
|
case MISDN_CALLING_ACKNOWLEDGE:
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ enum misdn_cfg_elements {
|
|||||||
MISDN_CFG_ECHOCANCEL, /* int */
|
MISDN_CFG_ECHOCANCEL, /* int */
|
||||||
MISDN_CFG_ECHOCANCELWHENBRIDGED, /* int (bool) */
|
MISDN_CFG_ECHOCANCELWHENBRIDGED, /* int (bool) */
|
||||||
MISDN_CFG_NEED_MORE_INFOS, /* bool */
|
MISDN_CFG_NEED_MORE_INFOS, /* bool */
|
||||||
|
MISDN_CFG_NTTIMEOUT, /* bool */
|
||||||
MISDN_CFG_JITTERBUFFER, /* int */
|
MISDN_CFG_JITTERBUFFER, /* int */
|
||||||
MISDN_CFG_JITTERBUFFER_UPPER_THRESHOLD, /* int */
|
MISDN_CFG_JITTERBUFFER_UPPER_THRESHOLD, /* int */
|
||||||
MISDN_CFG_CALLGROUP, /* ast_group_t */
|
MISDN_CFG_CALLGROUP, /* ast_group_t */
|
||||||
|
|||||||
@@ -114,6 +114,7 @@ static const struct misdn_cfg_spec port_spec[] = {
|
|||||||
{ "incoming_early_audio", MISDN_CFG_INCOMING_EARLY_AUDIO, MISDN_CTYPE_BOOL, "no", NONE },
|
{ "incoming_early_audio", MISDN_CFG_INCOMING_EARLY_AUDIO, MISDN_CTYPE_BOOL, "no", NONE },
|
||||||
{ "echocancel", MISDN_CFG_ECHOCANCEL, MISDN_CTYPE_BOOLINT, "0", 128 },
|
{ "echocancel", MISDN_CFG_ECHOCANCEL, MISDN_CTYPE_BOOLINT, "0", 128 },
|
||||||
{ "need_more_infos", MISDN_CFG_NEED_MORE_INFOS, MISDN_CTYPE_BOOL, "0", NONE },
|
{ "need_more_infos", MISDN_CFG_NEED_MORE_INFOS, MISDN_CTYPE_BOOL, "0", NONE },
|
||||||
|
{ "nttimeout", MISDN_CFG_NTTIMEOUT, MISDN_CTYPE_BOOL, "no", NONE },
|
||||||
{ "jitterbuffer", MISDN_CFG_JITTERBUFFER, MISDN_CTYPE_INT, "4000", NONE },
|
{ "jitterbuffer", MISDN_CFG_JITTERBUFFER, MISDN_CTYPE_INT, "4000", NONE },
|
||||||
{ "jitterbuffer_upper_threshold", MISDN_CFG_JITTERBUFFER_UPPER_THRESHOLD, MISDN_CTYPE_INT, "0", NONE },
|
{ "jitterbuffer_upper_threshold", MISDN_CFG_JITTERBUFFER_UPPER_THRESHOLD, MISDN_CTYPE_INT, "0", NONE },
|
||||||
{ "callgroup", MISDN_CFG_CALLGROUP, MISDN_CTYPE_ASTGROUP, NO_DEFAULT, NONE },
|
{ "callgroup", MISDN_CFG_CALLGROUP, MISDN_CTYPE_ASTGROUP, NO_DEFAULT, NONE },
|
||||||
|
|||||||
@@ -207,6 +207,13 @@ reject_cause=16
|
|||||||
;
|
;
|
||||||
need_more_infos=no
|
need_more_infos=no
|
||||||
|
|
||||||
|
|
||||||
|
;
|
||||||
|
; set this to yes if you want to disconnect calls when a timeout occurs
|
||||||
|
; for example during the overlapdial phase
|
||||||
|
;
|
||||||
|
nttimeout=no
|
||||||
|
|
||||||
; set the method to use for channel selection:
|
; set the method to use for channel selection:
|
||||||
; standard - always choose the first free channel with the lowest number
|
; standard - always choose the first free channel with the lowest number
|
||||||
; round_robin - use the round robin algorithm to select a channel. use this
|
; round_robin - use the round robin algorithm to select a channel. use this
|
||||||
|
|||||||
Reference in New Issue
Block a user