KAMAILIO (OPENSER) Devel Guide

http://www.asipto.com/pub/kamailio-devel-guide/

http://www.kamailio.org/docs/

Abstract

This book documents the internal architecture of KAMAILIO (OPENSER) SIP Server, providing the details useful to develop extensions in the core or as a module.

The focus will be on major components of the SIP server, such as memory manager, locking system, parser, database API, configuration file, MI commands, pseudo-variables and module interface.

Examples, API and the architecture are based on current development version of KAMAILIO (OPENSER) - 1.4.0 - at April 2, 2008. Some may change until 1.4.0 is released as stable. The document will be timely updated accordingly, check for updates at www.asipto.com or www.kamailio.org.

This document is free to use for anybody. The authors are not liable in any way for the consequences you may get due to usage of this document.

 


Table of Contents

1. Introduction
1.1. KAMAILIO (OPENSER) SIP Server 1.2. About the authors 1.3. Important
2. KAMAILIO (OPENSER) Architecture
2.1. KAMAILIO (OPENSER) Core 2.2. KAMAILIO (OPENSER) Modules 2.3. SIP Message Processing
3. Locking system
3.1. Simple Locks API
3.1.1. gen_lock_t 3.1.2. lock_alloc(...) 3.1.3. lock_dealloc(...) 3.1.4. lock_init(...) 3.1.5. lock_destroy(...) 3.1.6. lock_get(...) 3.1.7. lock_release(...)
3.2. Lock Set API
3.2.1. gen_lock_set_t 3.2.2. lock_set_alloc(...) 3.2.3. lock_set_dealloc(...) 3.2.4. lock_set_init(...) 3.2.5. lock_set_destroy(...) 3.2.6. lock_set_get(...) 3.2.7. lock_set_release(...)
3.3. Troubleshooting
4. Memory Manager
4.1. Private Memory
4.1.1. pkg_malloc(...) 4.1.2. pkg_free(...) 4.1.3. pkg_realloc(...)
4.2. Shared Memory
4.2.1. shm_malloc(...) 4.2.2. shm_free(...) 4.2.3. shm_realloc(...)
4.3. Troubleshooting
5. Data structures
5.1. str 5.2. struct sip_uri 5.3. struct sip_msg 5.4. struct msg_start 5.5. struct hdr_field 5.6. struct to_body 5.7. struct via_body
6. SIP Parser
6.1. parse_uri(...) 6.2. parse_msg(...) 6.3. parse_headers(...) 6.4. parse_to(...) 6.5. Get Message Body 6.6. Get Header Body 6.7. New Header Parsing Function
7. Transport Layer
7.1. DNS Implementation
8. Extending configuration file
8.1. Adding a core parameter 8.2. Adding a core function
8.2.1. Extending the grammar 8.2.2. Extending the interpreter
9. Database API
9.1. DB API Structure 9.2. DB API Functions
9.2.1. Function init(...) 9.2.2. Function close(...) 9.2.3. Function use_table(...) 9.2.4. Function query(...) 9.2.5. Function fetch_result(...) 9.2.6. Function raw_query(...) 9.2.7. Function free_result(...) 9.2.8. Function insert(...) 9.2.9. Function delete(...) 9.2.10. Function update(...) 9.2.11. Function replace(...) 9.2.12. Function last_inserted_id(...) 9.2.13. Function insert_update(...)
9.3. DB API Data Types
9.3.1. Type db_key_t 9.3.2. Type db_op_t 9.3.3. Type db_type_t 9.3.4. Type db_val_t 9.3.5. Type db_con_t 9.3.6. Type db_row_t 9.3.7. Type db_res_t
9.4. Macros 9.5. Example of usage
10. Management Interface
10.1. MI Command Function 10.2. Register MI Command 10.3. Example of MI Command Function 10.4. MI FIFO Command
11. Pseudo-variables
11.1. Naming Format 11.2. Data structures
11.2.1. Type pv_value_t 11.2.2. Type pv_name_t 11.2.3. Type pv_index_t 11.2.4. Type pv_param_t 11.2.5. Type pv_spec_t 11.2.6. Type pv_export_t
11.3. Adding a pseudo-variables
12. Transformations
12.1. Naming Format 12.2. Data Structures 12.3. Adding a Transformation
13. Statistics
13.1. Statistic Macros
14. Data Lumps 15. Timer
15.1. Data Types 15.2. Timer API Functions 15.3. Example of usage
16. Module Development
16.1. module_exports type 16.2. cmd_export_t type 16.3. param_export_t type 16.4. proc_export_t type 16.5. stat_export_t type 16.6. mi_export_t type 16.7. pv_export_t 16.8. Functions Types 16.9. Command Functions
16.9.1. Return Values 16.9.2. Fixup Functions
16.10. Developing a new module
16.10.1. Naming the module 16.10.2. Makefile 16.10.3. Main File 16.10.4. Add Module Parameter 16.10.5. Module Init Function 16.10.6. Module Child Init Function 16.10.7. Module Destroy Function 16.10.8. Add Command Function 16.10.9. Add Pseudo-Variable 16.10.10. Add MI Command 16.10.11. Add Extra Process 16.10.12. CFGUTILS module_exports
17. Licensing 18. References 19. Contact Details
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值