SIP Messages and Media Session

Aug 05, 2004 1 Replies

Hi all,



Suppose we have two SIP UAs that one invites the other, then they start a media session and then the connection is terminated. How exactly the media session is being terminated? I mean, one of the UA terminates the Media Session and then sends a BYE SIP message to the other party; or once the media session is opened and the UA decide to close it will send first a BYE message and then will close the media session?



Option 1.



UA1 UA2 |-----------> INVITE Close Media Session



|-----------> BYE INVITE BYE |-----------> Close Media Session


Media sessions are RTP streams over UDP, so they don't really "close" in the way TCP sockets do. You just stop sending or stop listening.

But yes, in a typical flow, the phone that hangs up sends BYE and stops sending (and possibly stops listening to) the RTP media stream.

The other phone gets the BYE, and similarly stops, and sends an OK.

(The first phone probably should also wait for the OK before it stops listening, and possibly even sending.)

UDP packets don't have connections. If nobody is listening they just vanish in a poof like a Jaffa against the Iris. Nobody knows they didn't get received.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required