From 2cdaf67ae0b68dca72b7d8ab3bde855620f5ad8d Mon Sep 17 00:00:00 2001 From: Christian Richter Date: Fri, 18 May 2007 09:47:19 +0000 Subject: Merged revisions 59774 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r59774 | crichter | 2007-04-03 09:20:27 +0200 (Di, 03 Apr 2007) | 17 lines Merged revisions 59623-59624,59639 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r59623 | crichter | 2007-04-02 09:12:24 +0200 (Mo, 02 Apr 2007) | 1 line we can now make 30 channels on a PRI (before we forgot chan 31..) ........ r59624 | crichter | 2007-04-02 09:25:54 +0200 (Mo, 02 Apr 2007) | 1 line don't be verbose if no need ........ r59639 | crichter | 2007-04-02 14:08:12 +0200 (Mo, 02 Apr 2007) | 1 line added option which allows us to accept incoming SETUP Messages without automatically sending Proceeding or Setup Acknowledge, this is useful with some broken switches and if you want to Release incoming calls without previously having acknowledged them. The new option is noautorespond_on_setup=yes|no default is no, so we don't break the existing behaviour ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@64954 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/misdn/chan_misdn_config.h | 1 + channels/misdn/isdn_lib.c | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'channels/misdn') diff --git a/channels/misdn/chan_misdn_config.h b/channels/misdn/chan_misdn_config.h index 0e0a7b9c4..47d767a46 100644 --- a/channels/misdn/chan_misdn_config.h +++ b/channels/misdn/chan_misdn_config.h @@ -65,6 +65,7 @@ enum misdn_cfg_elements { MISDN_CFG_BNEC_ADAPT, #endif MISDN_CFG_NEED_MORE_INFOS, /* bool */ + MISDN_CFG_NOAUTORESPOND_ON_SETUP, /* bool */ MISDN_CFG_NTTIMEOUT, /* bool */ MISDN_CFG_JITTERBUFFER, /* int */ MISDN_CFG_JITTERBUFFER_UPPER_THRESHOLD, /* int */ diff --git a/channels/misdn/isdn_lib.c b/channels/misdn/isdn_lib.c index 429242783..8b91937e5 100644 --- a/channels/misdn/isdn_lib.c +++ b/channels/misdn/isdn_lib.c @@ -443,9 +443,11 @@ static int find_free_chan_in_stack(struct misdn_stack *stack, struct misdn_bchan } channel--; + + int bnums=stack->pri?stack->b_num:stack->b_num-1; if (dec) { - for (i = stack->b_num-1; i >=0; i--) { + for (i = bnums; i >=0; i--) { if (i != 15 && (channel < 0 || i == channel)) { /* skip E1 Dchannel ;) and work with chan preselection */ if (!stack->channels[i]) { cb_log (3, stack->port, " --> found chan%s: %d\n", channel>=0?" (preselected)":"", i+1); @@ -455,7 +457,7 @@ static int find_free_chan_in_stack(struct misdn_stack *stack, struct misdn_bchan } } } else { - for (i = 0; i < stack->b_num; i++) { + for (i = 0; i <= bnums; i++) { if (i != 15 && (channel < 0 || i == channel)) { /* skip E1 Dchannel ;) and work with chan preselection */ if (!stack->channels[i]) { cb_log (3, stack->port, " --> found chan%s: %d\n", channel>=0?" (preselected)":"", i+1); -- cgit v1.2.3