[asterisk-dev] [Code Review] chan_misdn has a most broken round robin routiune
irroot
reviewboard at asterisk.org
Sun Sep 4 07:57:42 CDT 2011
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1410/#review4217
-----------------------------------------------------------
Here is a explanation of the problem and logic behind this fix.
/branches/1.8/channels/chan_misdn.c
<https://reviewboard.asterisk.org/r/1410/#comment8272>
1)the port is always bounced on entering the loop and on each iteration this prevents all channels on a port been checked.
2)robin_channel on a BRI [maxbchans=2] will always be 1 and 2 channel will never be checked after the first time if rr->channel = 1
i have fixed this by checking all channels on a up port before moving to the next port and if a channel is chosen the next channel/port will be started with on next rotation.
the change also makes the loop more efficient instead of starting all over it checks all channels on active port.
- irroot
On Sept. 4, 2011, 6:58 a.m., irroot wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1410/
> -----------------------------------------------------------
>
> (Updated Sept. 4, 2011, 6:58 a.m.)
>
>
> Review request for Asterisk Developers.
>
>
> Summary
> -------
>
> It seems that only one channel per port is allowed to be used in round robin. this is wrong
> it should go from port to port and all channels in the port.
>
> on single port devices round robin would never work it now does.
>
> it needs to remember what port / channel to use next.
>
> i have redone the whole section
>
>
> Diffs
> -----
>
> /branches/1.8/channels/chan_misdn.c 334220
>
> Diff: https://reviewboard.asterisk.org/r/1410/diff
>
>
> Testing
> -------
>
> I have now tested this more extensivly with single HFC dongle and digium 4 port card.
>
> the last port / channel is retained and the routine rotates both channels and ports as expected.
>
> previously only one channel per port was taken into account for routing calls.
>
>
> Thanks,
>
> irroot
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110904/63f18ab9/attachment-0001.htm>
More information about the asterisk-dev
mailing list