On 1/22/08, Giuseppina Senzatela <giuseppina.senzatela at eunics.it> wrote: > > It seems the process you followed in siprtp.c more or less..., isn't it? Yeah, something like that, on the media side. This was indeed my starting point, but I had to give up the idea of using it > because I don't handle sip signalling directly through media proxy > (in my case only the sip proxy is involved with sip signalling , so I > don't have rdata thus I can't manage the incoming calls in media proxy). Then how using the stream is easier than my approach? Sorry I'm a bit confused. Having or not having call state (i.e. SIP signaling) doesn't make any difference between stream approach and my approach. The process you suggest looks quite difficult for me to achieve... > > If I involve media proxy in calls, I'm supposed to use streams, am I not? No, not at all. Like I said, stream is only needed if you need to have access to the media at PCM level, rather than RTP packet level. And this is quite expensive, because: - you need to decode/encode for every call, which is CPU intensive - stream has de-jitter buffer, which will add latency - stream only works if you operate it with some kind of timing (say, 20ms, just like normal media flow) So are you sure you want to do this? cheers, -benny If I use streams, which is the correct way to use them? How shall I proceed? > Would this last solution be simpler according to you? > > I've already created streams from UACs to media proxy.My problem now is > how to implement the route from media proxy to UACs. > > > Tnx! > Giusy > > > > > > In that case, I think you probably don't need to use stream at all. Stream > is needed if you need to work with the media at the PCM level, while in > this > case, probably what you want is just to forward the RTP packets (without > having to decode/encode etc.). > > If this is the case, then the solution couldn't be simpler: > - create two media transports, one for each UA > - call pjmedia_transport_attach() to attach your RTP/RTCP RX callbacks. > - when your RTP/RTCP callback is called by one transport, call > pjmedia_transport_send_rtp/rtcp() to to send the packet with the other > transport. > > You will still need to configure worker threads in pjmedia_endpt to poll > the ioqueue, or otherwise create these threads yourself and make them poll > the ioqueue. See pjmedia_endpt_create() documentation for the details. > > What do you think? > > cheers, > -benny > > > Now, do you want to proxy the media between UA1 and UA2, or do you want > to > > somehow have the media proxy involved in the media as well (by involved, > I > > mean the media proxy is sending its own media to the UAs, rather than > just > > forwarding media), or do you want both? We can do all of these of > course, > > it's easy. ;-) > > > > cheers, > > -benny > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip at lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080123/55268a42/attachment.html