]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Make chan_misdn BRI TE side normally defer channel selection to the NT side.
authorRichard Mudgett <rmudgett@digium.com>
Mon, 30 Mar 2009 20:38:11 +0000 (20:38 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Mon, 30 Mar 2009 20:38:11 +0000 (20:38 +0000)
Channel allocation collisions are not handled by chan_misdn very well.
This patch simply avoids the problem for BRI only.

For PRI, allocation collisions are still possible but less likely since
there are simply more channels available and each end could use a different
allocation strategy.

misdn.conf options available:
te_choose_channel - Use to force the TE side to allocate channels.
method - Specify the channel allocation strategy.

(closes issue #13488)
Reported by: Christian_Pinedo
Patches:
      isdn_lib.patch.txt uploaded by crich
Tested by: crich, siepkes, festr

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@185120 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/misdn/isdn_lib.c

index b21c794e78f807bdf5f746b6212411116b29c4da..0e0930bbf4c5a6a01122504532b93cc1a68fea77 100644 (file)
@@ -915,7 +915,7 @@ static int create_process(int midev, struct misdn_bchannel *bc)
                bc->l3_id = l3_id;
                cb_log(3, stack->port, " --> new_l3id %x\n", l3_id);
        } else {
-               if (stack->ptp || bc->te_choose_channel) {
+               if ((stack->pri && stack->ptp) || bc->te_choose_channel) {
                        /* we know exactly which channels are in use */
                        if (find_free_chan_in_stack(stack, bc, bc->channel_preselected ? bc->channel : 0, bc->dec) < 0) {
                                return -1;