< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

Re: [reSIProcate-users] Establishing a direct RTP session between 2 SIP clients



On 9-Oct-07, at 08:33 , Megha Saini wrote:

Hi..

Using reSIProcate, I am able to establish a SIP session between two user agents A and B using the Asterix server. The two use agents register on the server and an INVITE message is sent containing the correct credentials followed by 200 OK and ACK responses.

However, now I would like to establish a two-way direct RTP session between the clients A and B, i.e. without passing the media through my server Asterix.


This sounds almost certainly like the Asterisk 'server' is changing the SDP to proxy the session on the Asterisk machine.

Can anybody please tell me if it is possible to create a direct RTP session from A to B after establishment of SIP session between them. In such a case, I also need to get the current IP address of the callee (not the mnemonic identifier) so that I can send the media directly to my client without sending it to the server? 


This is the norm. I suspect (again) that Asterisk is doing something silly.

Looking at the logs, I observe that in the SIP session, I get the address of the server in the Via field of the SIP header and not the IP address of the callee. Also, in SDP, I dont get the callee's IP address. Can anybody tell me that how should I get the IP address of the callee if I have to establish a direct RTP session between the two clients.

Does it also depends on the server that I am using? I am using Asterix. Is it possible to create a direct RTP session with that or do I have to send the media only through the server everytime? I guess that it might create an extra overhead if I pass the media through the server for every call.

I have read that when a SIP server like SER receives a message, it can decide that it wants to stay in the loop or not. If not, SER will provide the user agents with the information they need to contact each other and then SIP messages will go directly between the two user agents.Is it possible with Asterix too?



Recall that SIP is a session establishment protocol. Elements might remain in the signaling path (like the proxies / servers) but ultimately the normal mode of operation is to let the two endpoints exchange SDP and start a session directly. If you were to install SER or some other SIP proxy, you would likely see that there is no problem setting up direct media.

I have a deadline of the project. Any help would be highly appreciated.


As a conceptual aid : SIP sets up the control session and SDP offers and answers setup the media session. These offers and answers are TYPICALLY but not always in the INVITE and 200/INVITE messages. Try to keep these two negotiations separate. (Invite transaction is really just a piggy-back ride for the offer-answer negotiation). Take a good read of RFC 3264 to see more on the offer-answer basic model.


Depending on your needs, Asterisk may NOT be the ideal server / infrastructure for you to use. If this is a commercial endeavour, please make sure you consult knowledgeable people before planning to deploy, if this is an academic project, you are better off deploying a system that more closely models the standard(s).

If all you want is a proxy/registrar, then you could likely try repro - the proxy/registrar that is part of the reSIProcate project.

SER and sipX (http://sipfoundry.org/) are both more standards compliant and easier to wrap your head around than Asterisk. Asterisk's SIP support is something of an afterthought and therefore, the underlying conceptual model does a poor job of mapping onto the concepts in SIP.

Best of luck.


Alan Hawrylyshen
a l a n a t p o l y p h a s e d o t c a