Application of ptime in SIP and ptimeSIP

Source: Internet
Author: User

Application of ptime in SIP and ptimeSIP

The SDP in the INVITE request sent by the caller carries the ptime attribute, indicating that the packaging duration of the caller media is the value carried by ptime. After receiving the request message, the server replies that the SDP in the 200 OK message carries the ptime attribute, indicating that the packaging duration of the media supported by the server is the value carried by ptime. The caller negotiates the final sending media package Length Based on the ptime attribute carried by SDP in 200 OK, that is, the ptime value.

The detailed process is as follows:

1) the caller is called 2001 and sends a call request message to IPBX. The SDP in INVITE carries the ptime: 2009 attribute, indicating that the packaging duration of the caller media AMR is 100 ms.

INVITE sip: 2009@192.168.50.34 SIP/2.0

Via: SIP/2.0/UDP192.168.50.171: 40435; rport; branch = z9hG4bK91447

Max-Forwards: 70

To: <sip: 2009@192.168.50.34>

From: <sip: 2001@192.168.50.34>; tag = z9hG4bK69390462

Call-ID: 890631906834

CSeq: 1 INVITE

Contact: <sip: 2001@192.168.50.171: 40435; transport = udp>

Content-Length: 223

Content-Type: application/sdp

 

V = 0

O = Mr. Wang 0 0 IN IP4 192.168.50.171

S = hua

C = IN IP4 192.168.50.171

T = 0 0

M = audio 21000 RTP/AVP 114 101

A = rtpmap: 114 AMR/8000.

A = rtpmap: 101 telephone-event/8000

A = fmtp: 101 0-15

A = ptime: 100

 

2) 2009 called, the server replies 100 OK, and carries the media SDP negotiated by the server. The SDP carries the media packaging duration supported by the server, ptime.

SIP/2.0 200 OK

Via: SIP/2.0/UDP192.168.50.171: 40435; rport; branch = z9hG4bK91447

From: <sip: 2001@192.168.50.34>; tag = z9hG4bK69390462

To: <sip: 2009@192.168.50.34>; tag = 2af1_903

Call-ID: 890631906834

CSeq: 1 INVITE

Contact: <sip: 2009@192.168.50.34: 7080>

Content-Type: application/sdp

Content-Length: 217

 

V = 0

O = Mr. Wang 1103994876 1103994876 IN IP4192.168.50.34

S = hua

C = IN IP4 192.168.50.34

T = 0 0

M = audio 27676 RTP/AVP 114 101

A = rtpmap: 114 AMR/8000.

A = rtpmap: 101 telephone-event/8000

A = fmtp: 101 0-15

A = ptime: 100

 

3) The caller receives a OK Response Message and replies to ACK.

ACK sip: 2009@192.168.50.34: 7080 SIP/2.0

Via: SIP/2.0/UDP192.168.50.171: 40435; rport; branch = z9hG4bK90086

Max-Forwards: 70

To: <sip: 2009@192.168.50.34>; tag = 2af1_903

From: <sip: 2001@192.168.50.34>; tag = z9hG4bK69390462

Call-ID: 890631906834

CSeq: 1 ACK

Contact: <sip: 2001@192.168.50.171: 40435; transport = udp>

Content-Length: 0

 

At this point, the call is successfully established and the media is transmitted through the RTP protocol.

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.