Monday, January 9, 2017

Understanding SDP


Below is a sample SDP captured from one of the clients am using. 

v=0  (version)
o=prettybaby 1795756 0 IN IP4 10.238.78.209 (Owner/creator = username, session ID, version, network type, address type, owner address)
s=- (subject/session name)
c=IN IP4 10.238.78.209 (network type, address type, address)
t=0 0 (time description, start time, end time) 
m=audio 8540 RTP/AVP 9 0 8 18 120 100 (media description : audio, port, protocol, Media Format G722, PCMU, PCMA, G729, dynamic RTP type 120, dynamic RTP type 100) 
a=sendrecv (Media flow attribute sendrecv) 
a=rtpmap:9 G722/8000 (field name rtpmap 9 corresponds to G722) 
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no (field name fmtp, format 18 (G729), media specific parameter annexb=no)
a=rtpmap:120 opus/48000/2 (Media format 120, media type opus, sampling rate 48000)
a=rtpmap:100 telephone-event/8000 (media format 100, media type telephone-event, sampling rate 8000)

Session ID will be generated by each client and the version number will be generated by each client as well. With each INVITE initiated from the client, the version number will be incremented. 

the media attribute a=sendonly indicates from sender end, he want to put the media on hold. The receiver responds back with a=receiveonly. If not specified, by default, it is assumed to be sendrecv. a = sendonly, receiveonly, sendrecv are used by modern RFC. Old RFC, to put the connection on hold, c=0.0.0.0 was used. 

references

No comments:

Post a Comment