第一范文网 - 专业文章范例文档资料分享平台

exoSip+开发者手册

来源:用户分享 时间:2025/6/1 12:34:25 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

exoSip 开发者手册

——本手册指导开发者利用exoSip 栈开发用户代理

原文标题:exoSIP User Manual

1 The eXtented eXosip stack.............................................................................................................4

1.1 How-To initialize libeXosip2........................................................................................4 1.2 How-To initiate, modify or terminate calls. ..................................................................5 1.2.1 Initiate a call......................................................................................................6 1.2.2 Answer a call.....................................................................................................7 1.2.3 Sending other request........................................................................................8 1.3 How-To send or update registrations. ...........................................................................9 1.3.1 Initiate a registration .........................................................................................9 1.3.2 Update a registration .........................................................................................9 1.3.3 Closing the registration ...................................................................................10 2 General purpose API ...............................................................................................................11 2.1 eXosip2 configuration API..........................................................................................11 2.1.1 Functions.......................................................................................................................11

2.1.2 Function Documentation.................................................................................11 2.2 eXosip2 network API ..................................................................................................14 2.2.2 Functions.........................................................................................................14 2.2.3 Function Documentation.................................................................................14 2.3 eXosip2 event API ............................................................................................................16 2.3.1 Data Structures.......................................................................................................16 2.3.2 Enumerations .........................................................................................................16 2.3.3 Functions.......................................................................................................................17 2.3.4 Enumeration Type Documentation.................................................................................17 2.3.5 Function Documentation................................................................................................19 3 SIP messages and call control API ..........................................................................................21 3.1 eXosip2 INVITE and Call Management.....................................................................21 3.1.1 Functions.........................................................................................................21 3.1.2 Function Documentation.................................................................................22 3.2 eXosip2 request outside of dialog ...............................................................................29 3.2.1 Functions.........................................................................................................29 3.2.2 Function Documentation.................................................................................29 3.3 eXosip2 OPTIONS and UA capabilities Management ...............................................31 3.3.1 Functions.........................................................................................................31 3.3.2 Function Documentation.................................................................................31 3.4 eXosip2 Publication Management ..............................................................................33 3.4.1 Functions.........................................................................................................33 3.4.2 Function Documentation.................................................................................33 3.5 eXosip2 REFER and blind tranfer Management outside of calls................................35 3.5.1 Functions.........................................................................................................35

3.5.2 Function Documentation.................................................................................35 3.6 eXosip2 REGISTER and Registration Management ..................................................37 3.6.1 Functions.........................................................................................................37 3.6.2 Function Documentation.................................................................................37 3.7 eXosip2 SUBSCRIBE and outgoing subscriptions.....................................................39 3.7.1 Enumerations...................................................................................................39 3.7.2 Functions.........................................................................................................39 3.7.3 Enumeration Type Documentation..................................................................40 3.7.4 Function Documentation.................................................................................41 3.8 eXosip2 SUBSCRIBE and incoming subscriptions....................................................43 3.8.1 Functions.........................................................................................................43 3.8.2 Function Documentation.................................................................................43 3.9 eXosip2 authentication API.........................................................................................46 3.9.1 Functions.........................................................................................................46 3.9.2 Function Documentation.................................................................................46 3.10 Xosip2 SDP helper API...............................................................................................48 3.10.1 Functions.........................................................................................................48 3.10.2 Function Documentation.................................................................................48

1 The eXtented eXosip stack 1.1 How-To initialize libeXosip2.

When using eXosip, your first task is to initialize both eXosip context and

libosip

library (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 = eXosip_listen_addr (IPPROTO_UDP, NULL, port, AF_INET, 0);

if (i!=0) { eXosip_quit();

fprintf (stderr, \

return -1;

}

... then you have to send messages and wait for eXosip events...

In the previous code, you've learned how to:

? Initialize the osip trace (compile this code with -DENABLE_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_automatic_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 the

搜索更多关于: exoSip+开发者手册 的文档
exoSip+开发者手册.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c8todj0kopm6k2th1y0p1_1.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top