[asterisk-dev] RTP Bridging optimization

Kevin P. Fleming kpfleming at digium.com
Sun May 13 09:01:46 MST 2007


Vadim Lebedev wrote:

> I beleive you are mistaken,  the pipe syscals creates 2 file
> descirptors, one for reading other for writing....
> so in worst case you need 2 pipes meaning 4 fds
> so first you splice to a write side of first pipe from a socket, then
> optioanlly in case of montiored stream
> tee form read side of the first pipe to the write side of the second pipe,
> then splice from write side of the first pipe to the target socket, then
> read from the read side of the second pipe
> to perfrom monitoring

You just validated my point. A single bridge connecting two sockets
requires two pipes, one for each direction between the sockets. This
turns the '2 fds required' for a bridge into _6_ fds.

In addition, this only works in the cases where the media streams are
completely compatible, including dynamic RTP format number assignments,
frame lengths and other variables.


More information about the asterisk-dev mailing list