[asterisk-dev] RTP Bridging optimization
Tilghman Lesher
tilghman at mail.jeffandtilghman.com
Sun May 13 09:19:05 MST 2007
On Sunday 13 May 2007, Kevin P. Fleming wrote:
> 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.
Josh also brought up a valid point on IRC. How exactly are we to direct
packets to the destination IP address? Keep in mind that RTP is UDP
and thus there is no specific destination with respect to the socket. If this
were TCP, it would work fine, but with UDP, there is no connection.
--
Tilghman
More information about the asterisk-dev
mailing list