- Building Telephony Systems with OpenSER
- Flavio E. Goncalves
- 408字
- 2021-07-02 11:38:33
OpenSER Architecture

Core and Modules
OpenSER is built on top of a core that is responsible for the basic functionality and handling of SIP messages. The modules are responsible for the majority of OpenSER functions. OpenSER modules expose their functionality inside OpenSER with new commands and parameters used inside scripts. OpenSER is configured in a file called openser.cfg
. This configuration file controls which modules are loaded and their respective parameters. All the SIP flow is controlled too in several routing blocks defined in the file. The file openser.cfg
is the OpenSER main configuration file.
Sections of the File openser.cfg
The openser.cfg
file has seven sections:
- Global definitions: This portion of the file contains several working parameters for OpenSER including the listening
ip:port
pair for the SIP service and debug level. - Modules: Contains a list of external libraries required to expose the functionalities not available in the core. Modules are loaded with
loadmodule
. - Modules configuration: Modules have parameters that needs to be set appropriately. These parameters are configured using
modparam(modulename, parametername, parametervalue)
. - Main routing block: The main routing block is where the SIP message processing starts. It controls the processing of each message received.
- Secondary routing blocks: The administrator can define new routing blocks using the command
route()
. These routing blocks works like subroutines in the OpenSER script. - Reply routing blocks: Reply routing blocks are used to process reply messages, usually
200 OK
. - Failure routing blocks: Failure routing blocks are used to process failure conditions such as busy or timeout.
Sessions, Dialogs, and Transactions
It is important to understand some SIP concepts used in OpenSER processing:
- SIP transaction: A SIP message including any resends and their direct responses (that is, REGISTER and 200 OK).
- SIP dialog: A relation that exists for some time between two SIP entities (that is, a dialog established between two UACs from the INVITE until the BYE message).
- SIP Session: A media flow (
audio/video/text
) between two SIP entities.
openser.cfg Message Processing
The openser.cfg
is a script executed for each SIP message received. For example: If the userA wants to talk to userB it sends an INVITE message. This message is processed in the main routing block. The processing continues until it finds a t_relay()
(forward) or an sl_send_reply
(send an error message) or eventually discards the message at the end of the block using the exit()
command.
- WordPress 2.7 Cookbook
- Irrlicht 1.7 Realtime 3D Engine Beginner's Guide
- 從零開始學LATEX
- Midjourney AI繪畫藝術創作教程:關鍵詞設置、藝術家與風格應用175例
- Python數據分析實戰:從Excel輕松入門Pandas
- 中文版Photoshop CS6平面設計從新手到高手(超值版)
- CAD/CAM軟件應用技術
- Android從入門到精通
- AutoCAD 2016中文版完全自學手冊
- CryENGINE 3 Cookbook
- iPad+Procreate室內設計手繪表現技法
- Photoshop CS6中文版基礎與實例教程(第6版)
- 手把手教你學成PPT高手
- 中文版Photoshop CS6基礎教程
- AutoCAD 2010 建筑設計與制作技能基礎教程