- Building Telephony Systems with OpenSIPS(Second Edition)
- Flavio E. Goncalves Bogdan-Andrei Iancu
- 390字
- 2021-08-20 10:43:11
SIP transactions and dialogs
It is important to understand the difference between a transaction and dialog because we will use this ahead in OpenSIPS scripting. For example, there are attribute value pairs attached to transactions and dialog variables attached to dialogs. If you can't recognize a dialog and variable, it will be hard to configure the SIP server.

A transaction occurs between a user agent client and server and comprises of all the messages from the request to the final response (including all the interim responses). The responses can be provisional, starting with one followed by two digits (for example, 180 Ringing) or final, starting with two followed by two digits (for example, 200 OK). The scope of a transaction is defined by the stack of Via headers of the SIP messages. So, the user agents, after the initial invite, don't need to rely on DNS or location tables to route the messages.
The ACK request is a special case. For positive replies (2XX), the UAC creates a new transaction and generates a new CONTACT header and it can be sent straight to the UAS bypassing the proxy. However, for negative replies, it belongs to the INVITE transaction because it is not possible to create a new transaction without the Contact of the other part. In this case, the request is sent to the same proxy as INVITE.
According to RFC 3261, a dialog represents a peer-to-peer SIP relationship between two user agents that persists for some time. A dialog is identified at each UA with a dialog ID, which consists of a Call-ID value, local tag, and remote tag present in the From and To headers, respectively.
A dialog is a succession of transactions that control the creation, existence, and termination of the dialog. All dialogs do have a transaction to create them and may (or may not) have a transaction to change the dialog (mid-transaction). Additionally, the end-dialog transaction may be missing. (Some dialogs do end based on timeouts rather than on explicit termination.)
According to RFC 3665, there are 11 basic session establishment flows. The list is not meant to be complete but covers the best practices. The first two were already covered in this chapter, Successful Session Establishment and Session Establishment through two Proxies. Some of them will be seen in Chapter 11, Implementing SIP Services.
- Python概率統計
- 精通Nginx(第2版)
- PWA入門與實踐
- LabVIEW2018中文版 虛擬儀器程序設計自學手冊
- SQL Server 2012數據庫技術及應用(微課版·第5版)
- Mastering Ubuntu Server
- 大學計算機基礎(第2版)(微課版)
- Drupal 8 Configuration Management
- Mastering Drupal 8 Views
- 焊接機器人系統操作、編程與維護
- 持續輕量級Java EE開發:編寫可測試的代碼
- Internet of Things with ESP8266
- Python數據可視化之美:專業圖表繪制指南(全彩)
- Node.js區塊鏈開發
- ASP.NET Web API Security Essentials