aboutsummaryrefslogtreecommitdiffstats
path: root/channels/misdn
diff options
context:
space:
mode:
authorcrichter <crichter@f38db490-d61c-443f-a65b-d21fe96a405b>2007-04-03 07:20:27 +0000
committercrichter <crichter@f38db490-d61c-443f-a65b-d21fe96a405b>2007-04-03 07:20:27 +0000
commit7f128000f078acd416d2d00bde03a0a719f70911 (patch)
tree128a5f5bc09fafe484a1a24a31f140cfad4a46ce /channels/misdn
parentc2014fd5516bb0879a99225cfef8892e9ee72932 (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.4@59774 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/misdn')
-rw-r--r--channels/misdn/chan_misdn_config.h1
-rw-r--r--channels/misdn/isdn_lib.c6
2 files changed, 5 insertions, 2 deletions
diff --git a/channels/misdn/chan_misdn_config.h b/channels/misdn/chan_misdn_config.h
index fc714853a..9e93a9ac8 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 607492bb1..1459f109c 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);