Greetings everyone on this glorious weekend!

I've had an idea bouncing around my head for the past many months on an alternative approach for optimizing Local/Unreal channels. This morning everything finally clicked and I put it together[1] (I'm still working on it/tweaking it, but it DOES work).

The traditional approach has been to collapse the chain of Local channels down until you are left with the minimum amount required. Unfortunately this can be rather complex and error prone as you need to go through the entire chain and then figure out the best way to accomplish this (keeping in mind juggling multiple locks and potentially multiple bridges). You also end up needing to give information when this happens so consumers know what is going on.

The bridge_unreal approach doesn't do this. It aims to optimize the path for frames traveling through the chain, allowing them to skip intermediary hops where they don't need to go through. This results in a very similar situation for the frames but does not move/change/alter/hangup the intermediary channels involved.

It does this by passing each far end channel through the entire chain with each intermediary hop storing them and the next hop in the chain examining and forwarding them on over and over. Once this completes each end has the channel that is at the far end and is able to queue frames onto it directly, bypassing the intermediary hops. This happens over time (less than a second, I'm not talking minutes here) but leads to eventual optimization. Even in a compromised optimized state frames will still flow as expected.

This also works perfectly fine when a hop uses /n and wishes to remain in the path of frames. Each side of that hop will optimize themselves and skip any intermediary hops. (Although, since channels stick around... when would you need to use /n? Hrm...)

So, thoughts?

[1] http://svn.digium.com/svn/asterisk/team/file/bridge_unreal/

--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to