ImageVerifierCode 换一换
格式:DOCX , 页数:37 ,大小:24.83KB ,
资源ID:12028226      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/12028226.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(exoSip+开发者手册.docx)为本站会员(b****5)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

exoSip+开发者手册.docx

1、exoSip+开发者手册exoSip 开发者手册本手册指导开发者利用exoSip 栈开发用户代理原文标题:exoSIP User Manual1 The eXtented eXosip stack.41.1 How-To initialize libeXosip2.41.2 How-To initiate, modify or terminate calls. .51.2.1 Initiate a call.61.2.2 Answer a call.71.2.3 Sending other request.81.3 How-To send or update registrations. .9

2、1.3.1 Initiate a registration .91.3.2 Update a registration .91.3.3 Closing the registration .102 General purpose API .112.1 eXosip2 configuration API.112.1.1 Functions.112.1.2 Function Documentation.112.2 eXosip2 network API .142.2.2 Functions.142.2.3 Function Documentation.142.3 eXosip2 event API

3、.162.3.1 Data Structures.162.3.2 Enumerations .162.3.3 Functions.172.3.4 Enumeration Type Documentation.172.3.5 Function Documentation.193 SIP messages and call control API .213.1 eXosip2 INVITE and Call Management.213.1.1 Functions.213.1.2 Function Documentation.223.2 eXosip2 request outside of dia

4、log .293.2.1 Functions.293.2.2 Function Documentation.293.3 eXosip2 OPTIONS and UA capabilities Management .313.3.1 Functions.313.3.2 Function Documentation.313.4 eXosip2 Publication Management .333.4.1 Functions.333.4.2 Function Documentation.333.5 eXosip2 REFER and blind tranfer Management outside

5、 of calls.353.5.1 Functions.353.5.2 Function Documentation.353.6 eXosip2 REGISTER and Registration Management .373.6.1 Functions.373.6.2 Function Documentation.373.7 eXosip2 SUBSCRIBE and outgoing subscriptions.393.7.1 Enumerations.393.7.2 Functions.393.7.3 Enumeration Type Documentation.403.7.4 Fun

6、ction Documentation.413.8 eXosip2 SUBSCRIBE and incoming subscriptions.433.8.1 Functions.433.8.2 Function Documentation.433.9 eXosip2 authentication API.463.9.1 Functions.463.9.2 Function Documentation.463.10 Xosip2 SDP helper API.483.10.1 Functions.483.10.2 Function Documentation.481 The eXtented e

7、Xosip stack1.1 How-To initialize libeXosip2.When using eXosip, your first task is to initialize both eXosip context and libosiplibrary (parser and state machines). This must be done prior to any use of libeXosip2.include int i;TRACE_INITIALIZE (6, stdout);i=eXosip_init();if (i!=0)return -1;i = eXosi

8、p_listen_addr (IPPROTO_UDP, NULL, port, AF_INET, 0);if (i!=0)eXosip_quit();fprintf (stderr, could not initialize transport layern);return -1;. then you have to send messages and wait for eXosip events.In the previous code, youve learned how to:? Initialize the osip trace (compile this code with -DEN

9、ABLE_TRACE)? Initialize eXosip (and osip) stack? Open a socket for signalling (only UDP with initial eXosip2 version)Now you have to handle eXosip events. Here is some code to get eXosip_event from the eXosip2 stack. eXosip_event_t *je;for (;)je = eXosip_event_wait (0, 50);eXosip_lock();eXosip_autom

10、atic_action ();eXosip_unlock();if (je = NULL)break;if (je-type = EXOSIP_CALL_NEW).else if (je-type = EXOSIP_CALL_ACK).else if (je-type = EXOSIP_CALL_ANSWERED).else .eXosip_event_free(je);You will receive one event for each SIP message sent. Each event contains theoriginal request of the affected tra

11、nsaction and the last response that triggers theevent when available.You can access all headers from those messages and store them in your own contextfor other actions or graphic displays.For example, when you receive a REFER request for a call transfer, youll typicallyretreive the refer-To header:o

12、sip_header_t *referto_head = NULL;i = osip_message_header_get_byname (evt-sip, refer-to, 0,&referto_head);if (referto_head = NULL | referto_head-hvalue = NULL)The eXosip_event also contains identifiers for calls, registrations, incomingsubscriptions or outgoing subscriptions when applicable. Those i

13、dentifiers are used inAPI to control calls, registrations, incoming or outgoing subscriptions. These API willbuild default messages with usual SIP headers (From, To, Call-ID, CSeq, Route,Record-Route, Max-Forward.) and send thoses messages for you.1.2 How-To initiate, modify or terminate calls.eXosi

14、p2 offers a flexible API to help you controling calls.1.2.1 Initiate a callTo start an outgoing call, you typically need a few headers which will be used byeXosip2 to build a default SIP INVITE request. The code below is used to start a call:osip_message_t *invite;int i;i = eXosip_call_build_initial

15、_invite (&invite,NULL, / optionnal route headerThis is a call for aconversation);if (i != 0)return -1;osip_message_set_supported (invite, 100rel);char tmp4096;char localip128;eXosip_guess_localip (AF_INET, localip, 128);snprintf (tmp, 4096,v=0rno=josua 0 0 IN IP4 %srns=conversationrnc=IN IP4 %srnt=0 0rnm=audio %s RTP/AVP 0 8 101rna=rtpmap:0 PCMU/8000rna=rtpmap:8 PCMA/8000rna=rtpmap:101 telephone-event/800

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1