Design and Implementation of the SIP protocol stack-Transaction Layer

Source: Internet
Author: User

 

A transaction is a request transaction sent by the customer (through the communication layer) to a server transaction, together with all the responses to the request of the server transaction, sent back to the client transaction. The transaction layer processes the re-sending of the application service layer, matches the response of the request, and the timeout of the application service layer. All tasks completed by a user agent client UAC are composed of a group of transactions. Generally, a SIP transaction is composed of a single request and all the responses to this request. These responses include zero or more temporary responses and one or more end responses.

 

The transaction layer contains two transaction databases: the client transaction database and the server transaction database. Each transaction contains several statuses. Invite client transactions include four states: calling, proceeding, completed, and terminated. Non-invite client transactions include trying, proceeding, completed, and terminated; invite service-side transactions include proceeding, completed, confirmed, and terminated. Non-invite service-side transactions include trying, proceeding, completed, and terminated.

 

The transaction layer depends on the TU layer and the transport layer. That is, the data received by the receiving transport layer is forwarded to the TU layer after processing; the data to be sent by the receiving tu layer is forwarded to the transport layer after processing.

 

The transaction layer contains a timer manager that maintains 11 timer types. This parameter is not enabled in TCP transmission mode.

 

Each transaction contains a transactionkey as the identifier of the transaction. In rfc3261, the branch of the top via and the method in CSeq are used as the identifier of the transaction, so it is used as the keyword of the transaction search. To handle this problem, check whether the parameter exists in the message and whether it starts with the string "z9hg4bk. If it is found that via does not contain the branch parameter or branch does not comply with the rfc3261 specification, the hash code is generated based on the URI, via, call-ID, to tag, from tag, and CSeq in the request message as the transaction identifier.

The transaction layer is thread-safe.

 

 

 

 

Class Diagrams describing the key classes at the Transaction Layer:

 

 

 

 

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.