doyke / p2p-sip

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

Sample code for external media session #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
First asked by truongviethaptit@gmail.com on Mar 7, 2011.

--
Hello!

I have read this post http://code.google.com/p/p2p-sip/wiki/ExternalMediaSession
I am still not clearly about how to build a ExternalMediaSession.

Can you give me some examples?(I have checked voip.py + siprtmp.py
too)

Thanks & Regards,
--
Hi

First wanted to emphasize when external media session is useful. The
p2p-sip's voip.py has built-in media session using built-in RTP/RTCP
stack which can do basic media transport for audio and video.
Sometime, you already have external tools which handle RTP/RTCP and
handle media streams, e.g., RAT and vic are such tools. If you would
like to use those tools, then p2p-sip's voip.py should not enable
built-in RTP/RTCP stack, but just invoke those external tools as
needed.

You can do that by following the convention of class MediaSession of voip.py.
http://code.google.com/p/p2p-sip/source/browse/trunk/src/app/voip.py
Essentially, the constructor can start the external media tool and
setRemote can inform the tool about the remote party's RTP transport
address. For incoming call, it should also set mysdp to appropriate
sub-set of offered SDP.

I will try to write up an example sipua which uses external media tool
using p2p-sip library, hopefully soon.

Finally, you do not need ExternalMediaSession stuff for siprtmp related stuff.

Regards,
--

Original issue reported on code.google.com by kundan10 on 10 Mar 2011 at 9:59