[Nice] Ideas on how to implement support for SIP forking

Olivier Crête olivier.crete at collabora.co.uk
Thu Apr 23 14:30:30 PDT 2009


After much though, I think I know how to properly implement support for
SIP forking.. But that will entail changing the API quite a bit.

I propose splitting the Agent object into two parts, a Socket wrapper
and the agent.

The socket wrapper would surround the socket. It would handle local
candidate discovery including things like TURN, UPnP, simple STUN
discovery, etc. It would also have a _sendto() method to send buffers
and a "received-buffer" signal when a new buffer is received. It will
have methods to set STUN servers, local interfaces, TURN servers, etc.
It will completely hide the implementation of the socket.

Then one would create an Agent object by giving it N socket objects (one
per component). There would be one Agent per remote party. From this
agent object, one would get the credentials, set the remote candidates
and it would do the actual ICE negotiation.

So in the case of ICE forking, one can just create multiple agents for
the same socket object and possibly do negotiations with all of them,
and then destroy the ones that fail.

We possibly need some kind of "remote person" object that will link the
different agents that talk to the same person at the other end
(equivalent to the Participant in farsight), so that some data can be
shared. That said, I don't think the current implementation shares any
data between streams except local configuration, so I'm not sure it is

Another possible advantage of this approach, is that multiple agents
with one socket can be used for multi-party calls, having the advantage
of reducing the number of ports used on a mixing server (so only one
port has to be used per call instead of one per person).

Please comment, discuss, fight...

Olivier Crête
olivier.crete at collabora.co.uk
Collabora Ltd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/nice/attachments/20090423/f139a402/attachment.pgp 

More information about the Nice mailing list