0

I have read about SIP and RTP packet flows but ended with a question about RTP packets flow logic between client-to client when the SIP session starts. I have a running Kamailio (V 4.0.4) server on ubuntu (12.04) platform which is also configured fro DNS and DHCP servers. And following are my test bed set-ups:

                                                                   Kamailio server
                                                             (DNS+ DHCP+Kamailio)
                                                                      |
                              Router <----------------------------> Switch<----------------------------> Router
                                  |                                                                        |
                              clientA <--------------------- RTP(audio/video) ? --------------------> client B

Now when the SIP session established (SIP Packets have to pass through all the routers and switch to reach Kamailio server), RTP session will start between Client A and B. But What is meant by client to client here ? what is the RTP packets path between the clients to reach their destinations ? Is the RTP packets have to pass through Routers and switch to reach its destination client ? (i.e Client A--->Router 1---->switch -----> Router 2-----> client B) ? What if i connect both client A and client B to the same router ?

PS: I have not configured any media-relays (RTPproxy/Media-proxy)

Please help me in clarifying all this doubts.

Anybody's help will greatly appreciate.

Regards,

Nandini

Nandini
  • 1
  • 2

1 Answers1

0

In a "normal" SIP call the media RTP gets send directly between the clients. If you sniff the SIP traffic you can see where it's going.

In the SIP INVITE dialog, the body of the INVITE message is normally in 'SDP' format. You can see that's it's SDP format because the SIP message should include something like:

Content-Type: application/sdp

The INVITE message will normally contain, what is known as the SDP offer, and the 200 OK response (when it comes) will normally contain the SDP answer.

An example:

[Offer]

  v=0
  o=alice 2890844526 2890844526 IN IP4 10.1.1.10
  s=
  c=IN IP4 10.1.1.10
  t=0 0
  m=audio 49170 RTP/AVP 0 8 97
  a=rtpmap:0 PCMU/8000
  a=rtpmap:8 PCMA/8000
  a=rtpmap:97 iLBC/8000

[Answer]

  v=0
  o=bob 2808844564 2808844564 IN IP4 10.1.1.11
  s=
  c=IN IP4 10.1.1.11
  t=0 0
  m=audio 49174 RTP/AVP 0
  a=rtpmap:0 PCMU/8000

In this offer/answer the audio media will sent / received between

10.1.1.10:49170 <--> 10.1.1.11:49174

The will only be a audio codec and it will be encoded in the G711u format (PCMU 8hz).

If you are asking how psychically the network traffic will travel between the two endpoints. The would greatly depend of the psychical network. Logically it's just sending packets to/from each of those addresses and it doesn't go through any 'server'.

Shane Powell
  • 13,698
  • 2
  • 49
  • 61
  • Ya i am accepting your answer, but I am specifically wanted to know how physically the RTP packets flow from one client to other client(like you said : 10.1.1.10:49170 <--> 10.1.1.11:49174) in the instance like in my above mentioned set-up.As clients registers with SIP server, Once signalling path establihed by SIP, then RTP will take another path to transfer media between the clients. so in this context what is the path this RTP packets follow to reach other end client (to achieve client-client connection) if the clients are connected diffrent nodes (WAP)? or to Single WAP ? – Nandini Feb 25 '14 at 11:44
  • What your asking is not really related to SIP / RTP but networking. Your basically asking when a packet is sent from 'a' to 'b' how does it get there. Maybe you need to read about the OSI network model. http://en.wikipedia.org/wiki/OSI_model There really is no one answer to your question, it would highly depend on your exact network. The only other situation that would confuse the above answer is if one or more of the sip endpoints lives behind a NAT router, in that situation things like STUN, TURN and ICE can some into play. – Shane Powell Feb 25 '14 at 17:45