参考:http://www.cnblogs.com/DreamSea-for-Jimmy/archive/2011/07/28/2119877.html
1、简介
Doubango框架是3GPP IMS(多媒体子系统(移动业务))的一种实现,目前IMS已被3GPP国际组织标准化,IMS所支持的服务将能在任一种网络中实现,这些网络包括3GP LTE(4G), GPRS, WLAN, CDMA2000 等已经公用的通信网络协议。
doubango是一个实验性的,开放源码的3GPP IMS/ LTE、兼容嵌入式和桌面系统的框架。该框架由ANSI - C编写,这样可以提高移植性,有效地工作在嵌入式系统与有限的内存和计算能力低的移动设备中。
doubango是一系列API的集合,形成一个强大的3GPP IMS/ LTE框架。这些栈实现多种协议,如SIP / SDP,HTTP / HTTPS,DNS,DHCPv4/DHCPv6,SigComp,MSRP,XCAP,NAT穿透(STUN,TURN,ICE)等。
2 包括哪些项目
doubango是一系列项目的合集,它包括以下项目集:
1 tinySAK
Prefix: tsk
API reference: http://doubango.org/API/tinySAK/
2 tinySigComp
Prefix: tcomp
API reference: http://doubango.org/API/tinySigComp/
3 tinySMS
Prefix: tsms
API reference: http://doubango.org/API/tinySMS/
4 tinyNET
YouMUST call tnet_startup() before using any network functionprefixed with tnet_. tnet_cleanup is used to terminate use ofnetwork functions.
Prefix: tnet
API reference: http://doubango.org/API/tinyNET/
5 tinyIPSec
Prefix: tipsec
API reference: http://doubango.org/API/tinyIPSec/
6 tinyHTTP
Prefix: thttp
API reference: http://doubango.org/API/tinyHTTP/
7 tinyXCAP
Prefix: txcap
API reference: http://doubango.org/API/tinyXCAP/
8 tinyMEDIA
Prefix: tmedia
API reference: http://doubango.org/API/tinyMEDIA/
9 tinySDP
Prefix: tsdp
API reference: http://doubango.org/API/tinySDP/
10 tinyMSRP
Prefix: tmsrp
API reference: http://doubango.org/API/tinyMSRP/
11 tinyGST
Prefix: tgst
API reference: http://doubango.org/API/tinyGST/
12 tinySIP
Prefix: tsip
API reference: http://doubango.org/API/tinySIP/
3 doubango提供四种调试模式,通过设置宏DEBUG_LEVEL来设置。
•DEBUG_LEVEL_INFO:它是最低值。用于记录用户信息,应用程序的进展,配置......
•DEBUG_LEVEL_WARN: 这种类型的错误不会阻止应用程序地正常运行。
•DEBUG_LEVEL_ERROR:这是默认的最低值。当前操作失败的信号。如果操作是关键(如线程创建),那么这将严重改变应用程序的行为,否则(如通过网络发送数据),应用程序将继续如预期般运作。
•DEBUG_LEVEL_FATAL:它是最大价值。出现应用程序崩溃或不可能恢复状态时,会出现这种错误信号。
这些错误信息都被记录到stderr里,你也可以通过定义TSK_HAVE_DEBUG_H(#define TSK_HAVE_DEBUG_H 1)来设置自己的调试方法。你的方法要定义在my_debug.h文件里。
4 开发
.1 了解系统架构
.2 重用先有库
![]()
![Doubango 入门_第1张图片](http://img.e-com-net.com/image/info5/06d1636dbf544991adf71e0eb7b909c0.jpg)
API Reference
For newbies, please refer to the Programmer's Guide v1.0.0
tinySAK(a.k.a tiny Swiss Army Knife)
- ANSI-C Object Programing(ANSI-C面向对象程序)
- Linked lists(链表)
- String utility functions( 字符处理函数工具集)
- Memory management(内存管理)
- Dynamic buffers(动态缓存)
- Threading( 线程)
- Runnable (Runnable接口)
- Mutexes
- Semaphores
- Conditional Variables
- Timers
- Time
- Final State Machine (FSM) manager
- Base64 encoder/decoder( Base64 编码与解码)
- UUID generator (UUID 生成器)
- CRC32 and CRC16 (16位和32为循环冗余校验)
- URL encoder/decoder (URL 编码和解码)
- SHA-1, MD5, HMAC-MD5, HMAC-SHA-1 (支持的加密方式有)
No dependencies.
tinyNET (Networking)
- IPv4/IPv6 Sockets (UDP, TCP, TLS and SCTP) IPv4/IPv6 Sockets解析
- DHCPv4/v6 DHCPv4/v6解析
- DNS (NAPTR, PTR, SRV, MX, A, AAAA, OPT, CNAME ...)DNS解析
- ENUM
- NAT Traversal (STUN, TURN and ICE) 虚拟网络地址映射(NAT)
Depends on tinySAK
tinyHTTP (HTTP/HTTPS stack)
- Digest/Basic Authentication 数字/基础认证
- Pipelining 管道(管线)技术
- CONNECT, DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT and TRACE (基本的网络处理:连接,删除连接 GET/HEAD/POST请求 网络请求参数,patch, put, trace)
Depends on tinySAK and tinyNET
tinyXCAP (XCAP implementation)
- AUID manager
- URL generator
Depends on tinySAK, tinyNET and tinyHTTP
tinySMS (SMS over IP)
- SM-TL (3GPP TS 23.040)
- SM-RL (3GPP TS 24.011)
- SMS over 3GPP IMS/LTE networks (3GPP TS 24.341)
Depends on tinySAK
tinySigComp (Signaling Compression)
- Stream and Dgram compression/decompression
- SIP/SDP and Presence dictionaries
- Deflate Compressor
- UDVM
Depends on tinySAK
tinyIPSec (IPSec)
- Mode: Transport and Tunnel
- Protocol: AH, ESP or both
- IP Protocol: UDP and TCP
- Algorithm: HMAC-MD5-96 and HMAC-SHA-1-96
- Encryption Algorithm: NULL, DES-EDE3-CBC and AES
Depends on tinySAK
tinyMSRP(MSRP)
- Large Message IM (RFC 4975 and OMA SIMPLE IM)
- File Transfer (RFC 5547)
- Image Sharing (GSMA IR.79)
Depends on ...
tinySDP (SDP)
- SDP Offer Answer (RFC 3262 and draft-ietf-sipping-sip-offeranswer-12)
Depends on tinySAK
tinyMEDIA (Audio, Video, File transfer, Large Message IM ...)
Depends on tinySAK, tinyNET and tinySDP
tinySIP (3GPP IMS/LTE framework)
- SIP (RFC 3261, 3GPP TS 24.229 Rel-9)
- IMS-AKA (RFC 3310, 3GPP TS 33.203)
- IPv4/IPv6 dual stack
- UDP, TCP, TLS and SCTP
- Service-Route Discovery (RFC 3608)
- Proxy-CSCF discovery using DHCPv4/v6 or/and DNS NAPTR
- SigComp (RFC 3320, 3485, 4077, 4464, 4465, 4896, 5049, 5112 and 1951)
- IPSec
- Security Agreement (RFC 3329)
- NAT Traversal (STUN, TURN and ICE)
- Preconditions (RFC 3312, 4032 and 5027)
- SMS over IP (3GPP TS 23.038, 24.040, 24.011, 24.341 and 24.451)
- ENUM (RFC 3761)
- The tel URI for Telephone Numbers (RFC 3966)
- SIP SIMPLE (Presence subsciption/publication, Pager Mode IM, ...)
- MMTel (UNI)
- SDP Offer-Answer (SOA)
- Session Timers
- File transfer (RFC 5547) and Image Sharing(GSMA IR.79)
- Large Message IM (OMA SIMPLE IM)
- To be continued....
Depends on tinySAK, tinyNET, tinySDP, tinyMEDIA, tinyHTTP and tinyIPSec
5 Doubango演示
配置服务端OpenCVS
OpenVCS_1.0.52.551.zip
配置客户端
Android平台 IMSDroid
iPod,iPad平台iDoubs