ashumeow / p2p-sip

Automatically exported from code.google.com/p/p2p-sip
0 stars 0 forks source link

Proxy across transport in SIP #10

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
First reported on Jul 2, 2012 by Debasish Chandra <debasish.chandra@gmail.com> 
--

However I noticed that sipd, only allowing call between phone register 
webscoket or between phones which are not using websocket. It doesn't 
interconnect between normal phone register using UDP with phone using 
websocket. Even though its getting proper port and IP, but using the same media 
as originating phone. For example if any ph connected with websocket, and when 
try to call another phone registered using UDP, SIPD trying to connect with 
that phone using websocket only. In case if it is originated from a phone using 
UDP transport, it sending Invite over UDP only, not on websocket.

--

The way sipd.py (and sipapi.py) evolved it was not trivial to change the 
transport on proxy. Need to re-think the design of the voip.py's Proxy class so 
that it allows multiple transports.

Original issue reported on code.google.com by theinten...@gmail.com on 9 Jul 2012 at 8:50

GoogleCodeExporter commented 9 years ago
I meant rfc3261's Proxy class.

Original comment by theinten...@gmail.com on 9 Jul 2012 at 8:52

GoogleCodeExporter commented 9 years ago
In rfc3261.py, the UserAgent class represents both UAS and UAC. When an 
application wants to proxy the request, it uses the Proxy class. Currently the 
Proxy class is derived from UserAgent (which probably is not the right way to 
do). The UserAgent class is associated with a single Stack object, and the 
Stack object is associated with a single transport type (UDP, TCP). Hence, a 
Proxy class gets associated with a single transport type. To change this, need 
to make Proxy class be associated with multiple Stack objects, and have the 
application supply all the Stack objects to Proxy so that it can correctly 
proxy to the right transport.

Original comment by theinten...@gmail.com on 9 Jul 2012 at 8:58