Pages

Monday, August 24, 2009

SIP Invite Message

SIP protocol is a good protocol for sending and receiving messages while the call is made. It is not responsible for the voice content. RTP protocol is used for sending and receiving the voice content. SIP does all the background work.

Following is the complete process for making a call:


INVITE MESSAGE:

INVITE sip:30001dmojs@192.168.1.103:5060;transport=udp SIP/2.0

Via: SIP/2.0/UDP 64.34.231.248:5060;branch=z9hG4bK2ef7805b;rport

From: "Reception" ;tag=as1db89e96

To:

Contact:

Call-ID: 400da942638ea5c96724784846686f7d@64.34.231.248

CSeq: 102 INVITE

User-Agent: Asterisk PBX

Max-Forwards: 70

Date: Tue, 18 Aug 2009 14:49:15 GMT

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY

Supported: replaces

Content-Type: application/sdp

Content-Length: 242

v=0

o=root 19191 19191 IN IP4 64.34.231.248

s=session

c=IN IP4 64.34.231.248

t=0 0

m=audio 13354 RTP/AVP 0 101

a=rtpmap:0 PCMU/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=silenceSupp:off - - - -

a=ptime:20

a=sendrecv

INVITE sip:30001dmojs@192.168.1.103:5060;transport=udp SIP/2.0


Via: SIP/2.0/UDP 64.34.231.248:5060;branch=z9hG4bK2ef7805b;rport


From: "Reception" ;tag=as1db89e96


To:


Contact:


Call-ID: 400da942638ea5c96724784846686f7d@64.34.231.248


CSeq: 102 INVITE


User-Agent: Asterisk PBX


Max-Forwards: 70


Date: Tue, 18 Aug 2009 14:49:15 GMT


Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY


Supported: replaces


Content-Type: application/sdp


Content-Length: 242


Session Description Protocol

· (v): SDP version. The preceding section’s example code uses version 0.

· (o): Owner/creator and session ID.

· (s): Session name. The example session isn’t named anything fancy, just branded with a default value of session.

· (c): Connection information. This identifies the version of Internet Protocol software used to generate the packet, along with the IP address from which the SDP was transmitted.

· (t): The time the session is active.

v=0


o=root 19191 19191 IN IP4 64.34.231.248

Owner name or the sip server name is root


Network time protocol (NTP) timestamp determines the time. A standard packet of voice generally represents only 20 milliseconds of sound. If NTP had any more variance than it does, transmissions could easily end up out of sequence.


IN is the internet


IP4 is the version used


64.34.231.248 is the source address

s=session

Session name

c=IN IP4 64.34.231.248

Can be different from above if separate server is used for media server

t=0 0

Start and stop time of a conference session.

Media level description

m=audio 13354 RTP/AVP 0 101

Audio transmission is used at the port 13354 to transmit the media of the call. Unique to each call.

Real Time Protocol and Audio/Video Profile to be used during the call

0[HC1] refer to RTP payload types which correspond to the codecs. 0 is ulaw codec

101 describes this is a telephone event

a further defines the RTP payload types

a=rtpmap:0 PCMU/8000

This tells to use the uLaw codec at the sampling rate of 8000 Hz so that both ends sample at same rate

a=rtpmap:101 telephone-event/8000


a=fmtp:101 0-16

Dtmf tones enabled

(0,1,2,….., A,B,…, #)

a=silenceSupp:off - - - -

If silence suppression is on, no data is transmitted during the call if no one is talking

a=ptime:20

20 of voicems is stored in each packet

a=sendrecv


The SDP information in the 200 OK response that’s sent against the example INVITE looks like this:

Media Description, name and address (m): audio 52150 RTP/

AVP 18 101

Media Attribute (a): ptime: 20

Media Attribute (a): rtpmap: 101 telephone-event/8000

Media Attribute (a): fmtp: 101 0-15

Media Attribute (a): sendrecv



No comments:

Post a Comment