exoSip 开发者手册

合集下载

Cadence-SiP设计工具说明

Cadence-SiP设计工具说明

Cadence SiP设计工具介绍现有的集成电路与封装设计之间的串行设计方法已经不能满足今天的复杂、顶尖的器件设计的成本、性能、以及上市时间压力。

电气和物理可行性研究和芯片/封装设计折衷必须在设计周期的早期进行,也就是在芯片实现和可能的选项变得极为有限之前。

在这一个阶段,考虑物理设计选择对集成电路的电气性能的影响是至关重要的,反过来也一样。

一旦芯片设计已经最终成型,满足设计要求的负担就落在封装设计人员肩上,一旦发现封装难以进行,这时候再要设计公司更改版图已经不太可能。

允许设计者进行同步物理和电气设计折衷,能够确保在尽可能短的时间,使集成电路满足它的性能和成本目标。

而就封装设计本身而言,如何合并逻辑IC、RF IC、无源元件以及机械部件到一个单一的衬底并保证产品的性能是最大的挑战,具体包括:集成无源元件的专用成型工艺,3D结构验证,复杂信号的完整性,电源传输性能以及系统级功能仿真等。

也正是基于对这些设计挑战的充分理解和把握,Cadence-SIP才有能力成为事实上的工业标准,被世界上大多数封装企业所采用。

Cadence公司的先进封装设计工具是一个可升级的平台,可以完全满足不同阶段的需要。

以下我们就这些设计工具作简要介绍:1.Allegro(R) Design Authoring原理设计及输入Allegro Design Authoring是SiP,MCM,PCB 通用原理图设计及输入工具。

通过协作式设计方法将工作效率最大化。

设计可以在工作表或模块层级上进行划分,每个设计师可以指派一个或多个模块或工作表。

不管多少个设计师同时从事相同设计的不同部分都没有问题,不会彼此干扰。

接着可以将多个设计阶段组合起来,然后在Allegro 版图设计工具里进行布局。

这种同步设计法使Allegro Design Authoring用于大型设计时的效率极高。

设计师可以同时进行主板布局与电路图设计。

在Allegro Design Authoring或Allegro 版图设计工具里的任何变动可以周期性地合并与同步。

eXosip简例

eXosip简例

eXosip简例1. 从利用eXosip的注册开始int i;char identity[50]; char registerer[50]; char localip[128]; static int flag = 0; int id;eXosip_guess_localip (AF_INET, localip, 128);sprintf(identity,\ sprintf(registerer,\//初始化 if( flag == 0) {i = eXosip_init(); if (i != 0) {return -1; }TRACE(\ flag ++;i = eXosip_listen_addr(IPPROTO_UDP, NULL, 5060, AF_INET, 0); if (i != 0) {eXosip_quit();fprintf(stderr, \ return -1; }TRACE(\ }osip_message_t *reg = NULL;eXosip_lock();id = eXosip_register_build_initial_register (identity,registerer, NULL, 1800, &reg); printf(\if (id < 0) {eXosip_unlock();fprintf (stderr, \ return 0; }eXosip_lock();i = eXosip_register_send_register(id, reg); if (i != 0) {fprintf (stderr, \ return 0; } eXosip_unlock ();TRACE(\eXosip_event_t *je; for (;;) {je = eXosip_event_wait (0, 50);eXosip_lock();eXosip_automatic_action (); eXosip_unlock();if (je == NULL) {continue; }if (je->type == EXOSIP_REGISTRATION_SUCCESS) {TRACE(\ return 1; break; }if(je->type == EXOSIP_REGISTRATION_FAILURE) {//注册失败之后,再次提交授权信息,也可放在上面eXosip_add_authentication_info(username, username,password, NULL,NULL); }if(je->type == EXOSIP_REGISTRATION_REFRESHED) {TRACE(\ return 0; } }eXosip_quit();eXosip_guess_localip (AF_INET, localip, 128);这句在eXosip中的实现为eXosip_guess_localip (int family, char *address, int size)address在函数体外首先进行定义为一数组,分配好空间,再给形式参数传指针过去,在函数体内对实际参数address赋值。

使用exosip进行注册的方法

使用exosip进行注册的方法

使用exosip进行注册的方法2009-10-27 09:20用户注册:注册类整理int CExOsip2::ExOsip2Register(){int retVal;osip_message_t *reg = NULL;eXosip_event_t *je = NULL;char *m_strAuth = NULL;char from_url[160]={0};char proxy_url[160]={0};char contact_url[160]={0};const char *pcTelNum = "87541059";const char *pcFromURLIp = "10.0.0.231";const char *pcContactURLIp = "10.0.0.211";int proxyport = 5060;int contactport = 11000;//sprintf(from_url,"%s <sip:%s@%s:%d>",pcTelNum,pcTelNum, pcFromURLIp,proxyport);// sprintf(from_url,"%s <sip:%s@%s:%d>",pcTelNum,pcTelNum, pcFromURLIp,proxyport);// sprintf(proxy_url,"sip:%s:%d", pcFromURLIp,proxyport);// sprintf(contact_url, "\"%s\" <sip:%s@%s:%d>", pcTelNum,pcTelNum, pcContactURLIp,contactport);sprintf(from_url,"sip:%s@%s:%d",pcTelNum,pcFromURLIp,proxyport); sprintf(proxy_url,"sip:%s@%s:%d",pcTelNum,pcFromURLIp,proxyport); sprintf(contact_url,"sip:%s@%s:%d",pcTelNum,pcContactURLIp,proxyport) ;eXosip_lock();int regid = eXosip_register_build_initial_register(from_url,proxy_url, from_url, 5, &reg);if (regid<0){eXosip_unlock();return -3;}eXosip_clear_authentication_info(); //去除上次加入的错误认证信息//添加认证信息if (eXosip_add_authentication_info(pcTelNum, pcTelNum, pcTelNum, "md5", NULL)){printf("--Add_authentication_info failed\n");eXosip_unlock();return -4;//发送注册信息retVal = eXosip_register_send_register (regid, reg);if (retVal != 0){printf ("register_send_register failed\n");eXosip_unlock();return -5;}eXosip_unlock ();int flag = 1;while(flag){je = eXosip_event_wait(0,200);if (je == NULL){printf ("No response or the time is over!\n");break;}else if (je->response->status_code == 401){osip_message_t *resendreg = NULL;eXosip_register_build_register(je->rid, 300, &reg);// //取回认证的字符串authorization{osip_authorization_t * auth;char *strAuth=NULL;osip_message_get_authorization(reg,0,&auth);osip_authorization_to_str(auth,&strAuth);//strcpy(m_strAuth,strAuth);//保存认证字符串delete []strAuth;}eXosip_register_send_register(je->rid,reg);eXosip_event_free(je);break;}else{continue;}}getchar();return retVal;这个注册过程分为六步:1.sip初始化.eXosip_init ();2.侦听的端口eXosip_listen_addr (IPPROTO_UDP, NULL, CfgMsg.contact_port, AF_INET, 0);这里需要注意的是CfgMsg.contact_port是一个与对方建立连接所需的端口,这里我设置为5060.3.构造注册信息eXosip_register_build_initial_register()4.去除上次加入的错误认证信息eXosip_clear_authentication_info();5.添加注册证书eXosip_add_authentication_info()6.发送注册信息eXosip_register_send_register ();这6步之后一个注册就建立了.下面的做法是捕获PROXY发送回来的消息,这里我通过开辟新线程的方法捕获,因为这个一个循环.while (pDlg->m_LoginEventsFlag){eXosip_event_t *event;event = eXosip_event_wait (0, 50); //侦听是否有消息到来eXosip_lock ();eXosip_default_action(event);eXosip_unlock();if (event==NULL) {continue;}//下面是一个SWITCH语句对捕获的消息进行处理.}主要就这两个消息:EXOSIP_REGISTRATION_SUCCESS,EXOSIP_REGISTRATION_FAILURE捕获PROXY发送回来的消息,抓包可以看到先得到一个401应答,之后再得到一个200OK应答,这样就可以判断注册成功了.这样,一个注册就建立了.。

一个eXosip的例子

一个eXosip的例子

一个基于exosip的软电话例子exosip针对UA是对osip进行扩展,oSIP不提供任何快速产生请求消息和响应消息的方法,所有请求消息和响应消息的形成必须调用一组sip message api来手动组装完成,所以作者在osip上基础上开发了exosip,用exosip开发软电话非常方便,仅需几个API就可以完成.exosip 中附带一个例子:josua,不过josua相对复杂了点,下面给出一个最简单的例子供大家参考,因为例子实在太简单所以没有给出注释,用到exosip的API的参数请参看exosip源代码,看懂这个例子再研究josua就很简单了.我使用的是osip 2.0.9+exosip 0.77.#include "assert.h"#include <conio.h>#include <iostream>#include <osip2/osip_mt.h>#include <eXosip/eXosip.h>#include <eXosip/eXosip_cfg.h>using namespace std;class jcall;class jcall {public:int cid;int did;char reason_phrase[50];int status_code;char textinfo[256];char req_uri[256];char local_uri[256];char remote_uri[256];char subject[256];char remote_sdp_audio_ip[50];int remote_sdp_audio_port;int payload;char payload_name[50];int state;jcall() {}int build(eXosip_event_t *je){jcall *ca = this;ca->cid = je->cid;ca->did = je->did;if (ca->did<1 && ca->cid<1){assert(0);return -1; /* not enough information for this event?? */}osip_strncpy(ca->textinfo, je->textinfo, 255);osip_strncpy(ca->req_uri, je->req_uri, 255);osip_strncpy(ca->local_uri, je->local_uri, 255);osip_strncpy(ca->remote_uri, je->remote_uri, 255);osip_strncpy(ca->subject, je->subject, 255);if (ca->remote_sdp_audio_ip[0]=='\0'){osip_strncpy(ca->remote_sdp_audio_ip, je->remote_sdp_audio_ip, 49); ca->remote_sdp_audio_port = je->remote_sdp_audio_port;ca->payload = je->payload;osip_strncpy(ca->payload_name, je->payload_name, 49);}if (je->reason_phrase[0]!='\0'){osip_strncpy(ca->reason_phrase, je->reason_phrase, 49);ca->status_code = je->status_code;}ca->state = je->type;return 0;}};jcall call;void __exit( int r ){char line[256];gets( line );exit( r );}void josua_printf(char* buf){printf( "\n" );}int josua_event_get(){int counter =0;/* use events to print some info */eXosip_event_t *je;for (;;){char buf[100];je = eXosip_event_wait(0,50);if (je==NULL)break;counter++;if (je->type==EXOSIP_CALL_NEW){printf( "<- (%i %i) INVITE from: %s",je->cid, je->did,je->remote_uri);josua_printf(buf);call.build(je);}else if (je->type==EXOSIP_CALL_ANSWERED) {printf( "<- (%i %i) [%i %s] %s",je->cid, je->did,je->status_code,je->reason_phrase,je->remote_uri);josua_printf(buf);}else if (je->type==EXOSIP_CALL_PROCEEDING) {printf( "<- (%i %i) [%i %s] %s",je->cid, je->did,je->status_code,je->reason_phrase,josua_printf(buf);}else if (je->type==EXOSIP_CALL_RINGING){printf( "<- (%i %i) [%i %s] %s",je->cid, je->did,je->status_code,je->reason_phrase,je->remote_uri);josua_printf(buf);}else if (je->type==EXOSIP_CALL_REDIRECTED){printf( "<- (%i %i) [%i %s] %s",je->cid, je->did,je->status_code,je->reason_phrase,je->remote_uri);josua_printf(buf);}else if (je->type==EXOSIP_CALL_REQUESTFAILURE) {printf( "<- (%i %i) [%i %s] %s",je->cid, je->did,je->status_code,je->reason_phrase,je->remote_uri);josua_printf(buf);}else if (je->type==EXOSIP_CALL_SERVERFAILURE) {printf( "<- (%i %i) [%i %s] %s",je->cid, je->did,je->status_code,je->reason_phrase,je->remote_uri);josua_printf(buf);}else if (je->type==EXOSIP_CALL_GLOBALFAILURE) {printf( "<- (%i %i) [%i %s] %s",je->cid, je->did,je->status_code,je->remote_uri);josua_printf(buf);}else if (je->type==EXOSIP_CALL_CLOSED){printf( "<- (%i %i) BYE from: %s",je->cid, je->did, je->remote_uri);josua_printf(buf);}else if (je->type==EXOSIP_CALL_HOLD){printf( "<- (%i %i) INVITE (On Hold) from: %s",je->cid, je->did, je->remote_uri);josua_printf(buf);}else if (je->type==EXOSIP_CALL_OFFHOLD){printf( "<- (%i %i) INVITE (Off Hold) from: %s",je->cid, je->did, je->remote_uri);josua_printf(buf);}else if (je->type==EXOSIP_REGISTRATION_SUCCESS) {printf( "<- (%i) [%i %s] %s for REGISTER %s",je->rid,je->status_code,je->reason_phrase,je->remote_uri,je->req_uri);josua_printf(buf);}else if (je->type==EXOSIP_REGISTRATION_FAILURE) {printf( "<- (%i) [%i %s] %s for REGISTER %s",je->rid,je->status_code,je->reason_phrase,je->remote_uri,je->req_uri);josua_printf(buf);}else if (je->type==EXOSIP_OPTIONS_NEW){printf( "<- (%i %i) OPTIONS from: %s",je->cid, je->did,je->remote_uri);josua_printf(buf);}else if (je->type==EXOSIP_OPTIONS_ANSWERED){printf( "<- (%i %i) [%i %s] %s",je->cid, je->did,je->status_code,je->reason_phrase,je->remote_uri);josua_printf(buf);}else if (je->type==EXOSIP_OPTIONS_PROCEEDING){printf( "<- (%i %i) [%i %s] %s",je->cid, je->did,je->status_code,je->reason_phrase,je->remote_uri);josua_printf(buf);}else if (je->type==EXOSIP_OPTIONS_REDIRECTED){printf( "<- (%i %i) [%i %s] %s",je->cid, je->did,je->status_code,je->reason_phrase,je->remote_uri);josua_printf(buf);}else if (je->type==EXOSIP_OPTIONS_REQUESTFAILURE) {printf( "<- (%i %i) [%i %s] %s",je->cid, je->did,je->status_code,je->reason_phrase,je->remote_uri);josua_printf(buf);}else if (je->type==EXOSIP_OPTIONS_SERVERFAILURE) {printf( "<- (%i %i) [%i %s] %s",je->cid, je->did,je->status_code,je->reason_phrase,je->remote_uri);josua_printf(buf);}else if (je->type==EXOSIP_OPTIONS_GLOBALFAILURE) {printf( "<- (%i %i) [%i %s] %s",je->cid, je->did,je->status_code,je->reason_phrase,je->remote_uri);josua_printf(buf);}else if (je->type==EXOSIP_INFO_NEW){printf( "<- (%i %i) INFO from: %s",je->cid, je->did,je->remote_uri);josua_printf(buf);}else if (je->type==EXOSIP_INFO_ANSWERED){printf( "<- (%i %i) [%i %s] %s",je->cid, je->did,je->status_code,je->reason_phrase,je->remote_uri);josua_printf(buf);}else if (je->type==EXOSIP_INFO_PROCEEDING){printf( "<- (%i %i) [%i %s] %s",je->cid, je->did,je->status_code,je->reason_phrase,je->remote_uri);josua_printf(buf);}else if (je->type==EXOSIP_INFO_REDIRECTED)printf( "<- (%i %i) [%i %s] %s",je->cid, je->did,je->status_code,je->reason_phrase,je->remote_uri);josua_printf(buf);}else if (je->type==EXOSIP_INFO_REQUESTFAILURE){printf( "<- (%i %i) [%i %s] %s",je->cid, je->did,je->status_code,je->reason_phrase,je->remote_uri);josua_printf(buf);}else if (je->type==EXOSIP_INFO_SERVERFAILURE){printf( "<- (%i %i) [%i %s] %s",je->cid, je->did,je->status_code,je->reason_phrase,je->remote_uri);josua_printf(buf);}else if (je->type==EXOSIP_INFO_GLOBALFAILURE){printf( "<- (%i %i) [%i %s] %s",je->cid, je->did,je->status_code,je->reason_phrase,je->remote_uri);josua_printf(buf);}else if (je->type==EXOSIP_SUBSCRIPTION_ANSWERED) {printf( "<- (%i %i) [%i %s] %s for SUBSCRIBE",je->sid, je->did,je->status_code,je->reason_phrase,je->remote_uri);josua_printf(buf);printf( "<- (%i %i) online=%i [status: %i reason:%i]",je->sid, je->did,je->online_status,je->ss_status,je->ss_reason);josua_printf(buf);}else if (je->type==EXOSIP_SUBSCRIPTION_PROCEEDING){printf( "<- (%i %i) [%i %s] %s for SUBSCRIBE",je->sid, je->did,je->status_code,je->reason_phrase,je->remote_uri);josua_printf(buf);}else if (je->type==EXOSIP_SUBSCRIPTION_REDIRECTED){printf( "<- (%i %i) [%i %s] %s for SUBSCRIBE",je->sid, je->did,je->status_code,je->reason_phrase,je->remote_uri);josua_printf(buf);}else if (je->type==EXOSIP_SUBSCRIPTION_REQUESTFAILURE) {printf( "<- (%i %i) [%i %s] %s for SUBSCRIBE",je->sid, je->did,je->status_code,je->reason_phrase,je->remote_uri);josua_printf(buf);}else if (je->type==EXOSIP_SUBSCRIPTION_SERVERFAILURE) {printf( "<- (%i %i) [%i %s] %s for SUBSCRIBE",je->sid, je->did,je->status_code,je->reason_phrase,je->remote_uri);josua_printf(buf);}else if (je->type==EXOSIP_SUBSCRIPTION_GLOBALFAILURE){printf( "<- (%i %i) [%i %s] %s for SUBSCRIBE",je->sid, je->did,je->status_code,je->reason_phrase,je->remote_uri);josua_printf(buf);}else if (je->type==EXOSIP_SUBSCRIPTION_NOTIFY){printf( "<- (%i %i) NOTIFY from: %s",je->sid, je->did,je->remote_uri);josua_printf(buf);printf( "<- (%i %i) online=%i [status: %i reason:%i]",je->sid, je->did,je->online_status,je->ss_status,je->ss_reason);josua_printf(buf);}else if (je->type==EXOSIP_IN_SUBSCRIPTION_NEW){printf( "<- (%i %i) SUBSCRIBE from: %s",je->nid, je->did,je->remote_uri);josua_printf(buf);/* search for the user to see if he has beenpreviously accepted or not! */eXosip_notify(je->did, EXOSIP_SUBCRSTATE_PENDING,EXOSIP_NOTIFY_AWAY);}else if (je->textinfo[0]!='\0'){printf( "(%i %i %i %i) %s", je->cid, je->sid, je->nid, je->did, je->textinfo); josua_printf(buf);}eXosip_event_free(je);}if (counter>0)return 0;return -1;}int main(int argc, char* argv[]){int i;memset( &call, 0, sizeof(call) );cout << "Usage:"<< endl;cout << "a - answering call"<< endl;cout << "h - hangup"<< endl;cout << "r - ringing"<< endl;cout << "c - call"<< endl;cout << "q - quit"<< endl;FILE* logfile = fopen( "logfile.txt", "w");// osip_trace_initialize( (_trace_level)0, logfile );// osip_trace_initialize( (_trace_level)8, stdout );i = eXosip_init(stdin, stdout, 5060);if (i!=0){fprintf (stderr, "test: could not initialize eXosip\n"); __exit(0);}eXosip_sdp_negotiation_remove_audio_payloads(); eXosip_sdp_negotiation_add_codec(osip_strdup("0"), NULL,osip_strdup("RTP/AVP"),NULL, NULL, NULL,NULL,NULL,osip_strdup("0 PCMU/8000"));eXosip_sdp_negotiation_add_codec(osip_strdup("8"), NULL,osip_strdup("RTP/AVP"),NULL, NULL, NULL,NULL,NULL,osip_strdup("8 PCMA/8000"));/* register callbacks? */eXosip_set_mode(EVENT_MODE);osip_message_t *invite;i = eXosip_build_initial_invite(&invite,"sip:192.168.197.5:5060", //被叫对IP"sip:192.168.197.254:5060", //自己IPNULL,"oSIP phone");if (i!=0){fprintf (stderr, "eXosip_build_initial_invite failed\n"); __exit(0);}cout << "oSIP>";bool run = true;while( run ){josua_event_get();if ( _kbhit() ){switch ( _getch() ){case 'a':cout << "answer"<< endl;eXosip_lock();eXosip_answer_call(call.did, 200, 0);eXosip_unlock();break;case 'h':cout << "hangup"<< endl;eXosip_lock();eXosip_terminate_call( call.cid, call.did );eXosip_unlock();break;case 'r':cout << "ringing"<< endl;eXosip_lock();eXosip_answer_call(call.did, 180, 0);eXosip_unlock();break;case 'c':cout << "call"<< endl;eXosip_lock();eXosip_initiate_call(invite, NULL, NULL, "10500"); eXosip_unlock();break;case 'q':cout << "quit"<< endl;run = false;break;default :cout << "\noSIP>";}}}return 0;}。

XO Enterprise SIP 门户快速启动指南说明书

XO Enterprise SIP 门户快速启动指南说明书

XO Enterprise SIP Portal: Quick Start GuideWelcome! As an XO Enterprise SIP customer, you have access to a full suite of online tools to help you manage your XO services. These capabilities are available to you 24x7 via the XO Business Center, our robust and easy-to-use customer self-service website.XO Business Center NavigationThe top navigation bar takes you to the main functional areas within the Business Center: My Account, Billing, Network Management, Orders, Support, Contact Us, and Help.My AccountThis Overview page displays up to five Billing Locations with the current balance due for each, and five of your most recently submitted support requests and trouble tickets. You can also perform searches to display information on service locations, trouble tickets and telephone numbers/circuit IDs.In the Manage Users section you can create and approve new Business Center users, and view and update the existing users’ status. Go to My Profile section to update your account information or change your password. In the Notification Preferences section you can sign upto receive network outage and proactive maintenance notifications, and billing email alerts and reminders. BillingView current balance due, invoice date, and due datefor each of your accounts. Access and download up to 13 months of account statements and call detail in your choice of PDF, CSV or XML formats. Go Green by signing up for paperless billing. Pay your bills online or set up automatic payments.Network ManagementPreview Repair and Networking activity via convenient dashboards. Create trouble tickets and view/update their status. View and export your XO circuit inventory and active circuit alarms. Access a near-real time interactive map of your active circuit alarms. View and receive network outage and maintenance notifications.OrdersView your orders and their status, learn about the service installation process, export all orders at the account level or location level, get a detailed view of each order andall related orders, access order summaries, and accept/ decline your orders*.*for Enterprise SIP orders onlySupportUse the Message Center tab to access the list of all issues submitted within the last 90 days. Search for and display details of each Network Alert, trouble ticket or billing inquiry by clicking on the reference number. Access the online Knowledge Base for answers to frequently asked questions by clicking on the Help tab.Contact UsSubmit issues to XO Customer Care; initiate trouble tickets and check their status; contact XO Customer Care agents.HelpAccess the online Knowledge Base for answers to frequently asked questions and troubleshooting advice. Search by topic for up-to-date billing, troubleshooting and support information.A B C D EF GDEFGOnline Feature Management (OFM) for Enterprise SIP CustomersOnline Feature Management lets your group administrator easily access and configure services and telephone features on your organization’s phone lines, including:• Place orders to add or disconnect phone numbers• Manage account codes• Configure Automatic Call Routing*• E dit phone number and business name displayed in Caller ID• Set up Call Forwarding and Call Waiting• Manage directory listings• View your consolidated network diagram• View and analyze your session utilization* Not available in configurations where a customer already has failover between two or more IP-PBXs Navigating the OFMThe Location Details page lets you access the tools to manage your XO Enterprise SIP services (Online Feature Management).First, search for the desired service location, branch or phone number by entering the street address, city, or state in the search bar and clicking Find. If multiple locations match the criteria,a list of locations will be displayed. Select the desired location from the list.You can also click on the location address if it’s shown on the list of the Most Viewed Locations below the search bar.Location ProfileDisplays recently viewed locations andnumbers. Allows you to quickly look upprofiles of your service locations, branchesand phone numbers by clicking on theappropriate link.Managing Services at a Branch LocationThe Manage This Location menu on the right displays all feature management options available to perform for this branch location.Placing OrdersFollow a four-step process to manage features or place orders to add, reassign or disconnect phone numbers:Step 1: Find and select location(s)Step 2: Choose a feature to manage or select new service type, request a date for service installation, and calculate pricing informationStep 3: Configure service detailsStep 4: Review and submit orderAdd the following VoIP features to yourphone lines, quickly and easily:Call Forwarding AlwaysEnables a user to redirect incoming calls to another phone number. End user has the option to activate and deactivate the service by dialing a feature code. If activated, a user must specify the forwarding number.Automatic Call Routing (ACR)A business continuity failover option that automatically redirects an incoming call to an alternate number allowing your organization to maintain optimal performance anduptime in the event of an unforeseen interruption in service. Note: ACR is not available in Enterprise SIP configurations where a customer already has failover between two or more IP-PBXs.Account CodesEnable the tracking of outbound calls made to numbers outside the service location by prompting users for a code. You can change account codes online and specify which lines should have account codes. For locations usingaccount codes, your invoice call detail record (CDR) section will be arranged by account code. Account codes can also be useful in tracking calls billed to clients (e.g., law offices). You may select verified or non-verified account codes, but not both.Add Phone NumbersYou can add Direct Inward Dial extensions (DIDs) in blocks of 20 and 100, providing flexibility and scalability to meet the needs of growing businesses and multiple locations.Quick Tip : Making outbound callsPlease ensure that you and your end users are dialing 10 digits for all calls. You should not dial a “1” before any call. Credit card and fax machines, modems and other customer-premise equipment must be programmed for 10 digits only.Usage ReportingWhen your Enterprise SIP service is provisioned and installed, you get immediate access to usage reporting via your Business Center account. You can view and analyze your session usage anytime without having to call XO Customer Care.To access your usage reports, first find the location for which you want to view a report. Go to the Location Details page and either search for a specific location or click on an address from the list of recently viewed locations. Once you found the needed location, click on the Manage Services tab and scroll down to find Usage Reporting link or click on the View Usage Reports link in the Quick Links box on the right-hand side.Both of the links take you to a site where you will be able to view the following reports:• Usage Reports (shows your Enterprise SIP session utilization)• MIB Stats • Call Bursting© Copyright 2012. XO Communications, LLC. All rights reserved. XOESIPQSG1112。

exoSip开发者手册

exoSip开发者手册

exoSip开发者手册exoSip 开发者手册1 扩展的eXosip协议栈1.1 如何初始化libeXosip2当使用eXosip时,你的首要任务是初始化eXosip上下文和libosip库(语法分析器和状态机)。

这是在使用libeXosip2之前一定要完成的。

includeint i;TRACE_INITIALIZE (6, stdout);i=eXosip_init();if (i!=0)return -1;//在特定的socket上监听i = eXosip_listen_addr (IPPROTO_UDP, NULL, port, AF_INET,0);if (i!=0){eXosip_quit();fprintf (stderr, "could not initialize transport layer\n");return -1;}…初始化之后就可以发送消息或者等待eXosip事件的到来…在前面的代码中,您学习了如何:初始化osip trace(用- DENABLE_TRACE编译此代码)初始化eXosip(和osip)堆栈为信号打开一个套接字(只有UDP要初始eXosip2)现在你要处理eXosip事件。

下面是一些来获得eXosip_event从在eXosip2堆栈的代码。

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);你将为每个SIP消息的发送收到一个事件,每个事件包含。

eXosip 软电话实现的UAC和UAS的例子

eXosip 软电话实现的UAC和UAS的例子

一个用eXosip实现的UAC和UAS的例子经过一段时间的学习,对sip总算有了一点认识,在学习过程中,遇到了太多的问题,郁闷过,惆怅过,但是一咬牙,还是过来了。

令我感动的是,在网上遇到一些很热心的朋友,不厌其烦地给我以解惑,感谢他们,尤其是友善的大狗,呵呵,希望将来有一天他能看到这篇文章。

我是利用eXosip协议栈进行开发的,网上有一篇<一个简单的sip呼叫例子>,写的不错,但是好像有一些问题,而对于初学者来说,能拿到一个好的例子,对sip的理解可以到达事半功倍的效果。

于是便把自己的写的例子拿出来,让大家参考一下,若有问题,欢迎指正。

只需把里面的IP地址改正、编译即可使用。

/******************************************编译方法:gcc xxx.c -o xxx -leXosip2****************************************//*******************UAS*****************************************************本文可以任意转载,但必须保留出处作者:rainfish网址:/bat603/测试环境:eXosip3.0.1/redhat AS 4***************************************************************************/#include <eXosip2/eXosip.h>#include <osip2/osip_mt.h>#include <stdio.h>#include <stdlib.h>#include <netinet/in.h>#include <sys/socket.h>#include <sys/types.h>intmain (int argc, char *argv[]){eXosip_event_t *je = NULL;osip_message_t *ack = NULL;osip_message_t *invite = NULL;osip_message_t *answer = NULL;sdp_message_t *remote_sdp = NULL;int call_id, dialog_id;int i,j;int id;char *sour_call = "sip:133@192.168.0.133";char *dest_call = "sip:140@192.168.0.140:5060";char command;char tmp[4096];char localip[128];int pos = 0;//初始化sipi = eXosip_init ();if (i != 0){printf ("Can't initialize eXosip!\n");return -1;}else{printf ("eXosip_init successfully!\n");}i = eXosip_listen_addr (IPPROTO_UDP, NULL, 5060, AF_INET, 0);if (i != 0){eXosip_quit ();fprintf (stderr, "eXosip_listen_addr error!\nCouldn't initialize transport layer!\n"); }for(;;){//侦听是否有消息到来je = eXosip_event_wait (0,50);//协议栈带有此语句,具体作用未知eXosip_lock ();eXosip_default_action (je);eXosip_automatic_refresh ();eXosip_unlock ();if (je == NULL)//没有接收到消息continue;// printf ("the cid is %s, did is %s\n", je->did, je->cid);switch (je->type){case EXOSIP_MESSAGE_NEW://新的消息到来printf (" EXOSIP_MESSAGE_NEW!\n");if (MSG_IS_MESSAGE (je->request))//如果接受到的消息类型是MESSAGE{{osip_body_t *body;osip_message_get_body (je->request, 0, &body);printf ("I get the msg is: %s\n", body->body);//printf ("the cid is %s, did is %s\n", je->did, je->cid);}//按照规则,需要回复200 OK信息eXosip_message_build_answer (je->tid, 200,&answer);eXosip_message_send_answer (je->tid, 200,answer);}break;case EXOSIP_CALL_INVITE://得到接收到消息的具体信息printf ("Received a INVITE msg from %s:%s, UserName is %s, password is %s\n",je->request->req_uri->host,je->request->req_uri->port, je->request->req_uri->username, je->request->req_uri->password);//得到消息体,认为该消息就是SDP格式.remote_sdp = eXosip_get_remote_sdp (je->did);call_id = je->cid;dialog_id = je->did;eXosip_lock ();eXosip_call_send_answer (je->tid, 180, NULL);i = eXosip_call_build_answer (je->tid, 200, &answer);if (i != 0){printf ("This request msg is invalid!Cann't response!\n");eXosip_call_send_answer (je->tid, 400, NULL);}else{snprintf (tmp, 4096,"v=0\r\n""o=anonymous 0 0 IN IP4 0.0.0.0\r\n""t=1 10\r\n""a=username:rainfish\r\n""a=password:123\r\n");//设置回复的SDP消息体,下一步计划分析消息体//没有分析消息体,直接回复原来的消息,这一块做的不好。

SiP产品使用说明应用手册说明书

SiP产品使用说明应用手册说明书

类别内容关键词SiP 产品使用说明摘要SiP 产品使用说明应用手册UM010101011.2Date:2023/5/18Application Manual©2023Guangzhou ZHIYUAN Electronics Co.,Ltd.修订历史版本日期原因V1.02022/04/08创建文档V1.012023/05/181、增加参考IPC/JEDEC标准说明;2、增加回流焊最高温度说明;3、更新公司全称,修改文内部分格式。

目录1.产品使用说明 (1)1.1存储 (1)1.2上机前检验包装及湿度指示卡 (1)1.3车间使用寿命 (1)1.4回流焊 (2)1.4.1最高温度 (2)1.4.2曲线 (2)2.热风枪焊接方法 (4)2.1注意事项 (4)2.2焊接主要工具 (4)2.3焊接步骤 (5)2.3.1给焊接测试板焊盘与产品引脚上锡 (5)2.3.2产品放置 (6)2.3.3热风枪焊接 (7)2.3.4焊接完效果和检查 (8)3.免责声明 (9)1.产品使用说明1.1存储产品来料检后,需放入干燥柜进行存储,存储条件25℃/5%RH。

1.2上机前检验包装及湿度指示卡拆封前应检查包装是否存在漏气、破损问题;拆封后应检查湿度指示卡是否变色并记录拆包时间。

1.3车间使用寿命表1车间使用寿命(参考标准:IPC/JEDEC J-STD-020E)湿汽敏感等级车间使用寿命时间条件1不限≤30℃,85%RH 21年≤30℃,60%RH 2a4周≤30℃,60%RH 3168h≤30℃,60%RH 472h≤30℃,60%RH 548h≤30℃,60%RH 5a24h≤30℃,60%RH6使用前必须进行烘烤,并在规定时间内焊接完≤30℃,60%RH注:1、在车间使用寿命内,拆封后未使用完产品,须重新放入新的湿度指示卡和干燥剂进行真空包装,包装后放入干燥柜进行存储,存储条件25℃/5%RH,并记录时间;2、对于超出车间使用寿命未使用完产品,需烘烤后再使用,烘烤标准见表2。

Osip_Exosip解析

Osip_Exosip解析

Osip2和eXosip协议栈的简析Osip2是一个开放源代码的sip协议栈,是开源代码中不多使用C语言写的协议栈之一,它具有短小简洁的特点,专注于sip底层解析使得它的效率比较高。

eXosip是Osip2的一个扩展协议集,它部分封装了Osip2协议栈,使得它更容易被使用。

一、介绍Osip2是一个开放源代码的sip协议栈,是开源代码中不多使用C语言写的协议栈之一,它具有短小简洁的特点,专注于sip底层解析使得它的效率比较高。

但缺点也很明显,首先就是可用性差,没有很好的api封装,使得上层应用在调用协议栈时很破碎;其次,只做到了transaction层次的协议过程解析,缺少call、session、dialog等过程的解析,这也增加了使用的难度;再次,缺少线程并发处理的机制,使得它的处理能力有限。

eXosip是Osip2的一个扩展协议集,它部分封装了Osip2协议栈,使得它更容易被使用。

eXosip增加了call、dialog、registration、subscription等过程的解析,使得实用性更强。

但是eXosip局限于UA的实现,使得它用于registrar、sip server等应用时极其不容易。

另外,它并没有增加线程并发处理的机制。

而且只实现了音频支持,缺少对视频和其它数据格式的支持。

综合来说,Osip2加上eXosip协议栈仍然是个实现Sip协议不错的选择。

当然需要根据不同的需求来增加更多的内容。

二、Osip2协议栈的组成Osip2协议栈大致可以分为三部分:sip协议的语法分析、sip协议的过程分析和协议栈框架。

1、Sip协议的语法分析:主要是osipparser2部分,目前支持RFC3261和RFC3265定义的sip协议消息,包括INVITE、ACK、OPTIONS、CANCEL、BYE、SUBSCRIBE、NOTIFY、MESSAGE、REFER和INFO。

不支持RFC3262定义的PRACK。

基于eXosip协议栈的软电话设计与实现

基于eXosip协议栈的软电话设计与实现

文 章 编 号 :0 2 88 (0 7 0 - 0 2 0 10 - 6 4 2 0 )5 0 7 - 3
基于 e s Xoi p协议栈 的软 电话设 计与实现 统 计 ・ 设・ 系
雷 晓 荣 , 朱 志祥
( .煤 炭科 学研 究 总 院 西 安 分 院 ,陕 西 西安 7 0 5 1 10 4;2 .西 安 邮 电 学 院 通 信 技 术 研 究所 , 陕西 西 安 7 0 6 ) 10 1
成) 状态记录 , 并在特定状态下触发相应 的事件或 回凋 函数 。 其主要 围绕事务层来实现 SP消息的解析。 I 根据 请求 的不 同和发 送/ 收 的不 同将 状 态 机分 为 4类 : 接
原理 , 用 O i2和 e oi 利 s p Xs p实现 了基 于 e oi Xs p的软 电
【 src】T ecneto s d e oi r it d cd b e y A crigt tei pe e t o r c l, ot Abtat h o t fO i a X s a nr u e r f . codn o h m lm na n p ni e asf n pn p e o il i t i p
2 o .C mmu iain a d T c n lg sac e tr nc t n e h oo y Ree rh C ne ,Xi U iest fP s d T lc mmu iao s o n a nv ri o o ta ee o y n ncin ,Xi 1 0 1 hn ) 7 0 6 ,C ia n a
O i2 议 栈 的 组 成 : 法 解 析 器 模 块 、 态 机 器 s 协 p 语 状 模 块 和工 具模 块 。
务 。同时 , 协议还能将蜂 窝移动通信 系统与 Itme 该 n e t 的应用融合 在一起 。 H. 3 比 ,I 与 3 相 2 SP具有简单 、 立 独 于 媒体 、 独立 于传输 层 、 展性好 以及 同现有 It t 扩 ne me

exosip osip 交叉编译

exosip osip 交叉编译

exosip和osip是两种常用于SIP(会话初始协议)协议栈实现的开源软件库,它们可以帮助开发人员在其应用程序中实现基于SIP协议的通信功能。

在某些情况下,由于开发环境的限制,我们可能需要进行交叉编译来将这些库移植到不同的评台上,本文将重点介绍如何使用交叉编译工具来将exosip和osip库移植到目标评台上。

1. 了解交叉编译的基本概念在开始介绍如何进行exosip和osip库的交叉编译之前,我们首先需要了解一些基本的概念。

交叉编译是指在一种评台上开发、编译出在另一种不同的评台上运行的应用程序的过程。

在实际应用中,我们可能需要在PC机上编译出在嵌入式评台上运行的程序,这就需要用到交叉编译工具链。

2. 准备交叉编译工具链在进行交叉编译之前,我们需要先准备好交叉编译工具链。

交叉编译工具链包括交叉编译器、交叉连接器、交叉汇编器等,它们用于将源代码编译成目标评台上可执行的程序。

可以从官方全球信息湾或者第三方渠道下载已经编译好的交叉编译工具链,也可以自行编译搭建交叉编译环境。

3. 配置编译环境在准备好交叉编译工具链之后,我们需要配置编译环境,以便将exosip和osip库移植到目标评台上。

配置编译环境包括设置交叉编译器的路径、指定目标评台的系统类型、设置编译选项等。

具体的配置步骤和方法可以参考官方文档或者相关的教程。

4. 下载源代码在配置好编译环境之后,我们需要下载exosip和osip库的源代码,这些源代码通常是以压缩包的形式发布在官方全球信息湾上,也可以从版本控制系统如Git、SVN等获取最新的源代码。

下载源代码后,我们需要解压缩并进行一些基本的配置。

5. 编译和安装在下载和配置完源代码之后,我们可以使用交叉编译工具链来编译和安装exosip和osip库。

编译和安装过程通常包括配置编译选项、执行编译命令、进行单元测试、安装到目标系统等步骤。

在编译和安装过程中可能会遇到一些依赖库缺失、编译错误等问题,这就需要我们根据具体情况进行调试和解决。

SIP开发手册-协议详解

SIP开发手册-协议详解

8. PRACK*
用亍回复一个临时性的请求
9. REFER*
使用这个 REFER 挃向另一个电话,从而完成 call transfer。
10. SUBSCRIBE*
4 / 16
告诉 server 一旦发生特定事件时,愿意接收一个通知。
11. NOTIFY*
用来通知 subscriber 发生了特定的事件,也可用亍传送 DTMF。
423
Interval Too Brief
480
Temporarily Not Available
481
Call Leg or Transaction Does Not Exist
482
Loop Detected
483
Too Many Hops
484
Address Incomplete
485
Ambiguous
7. Presence Server
负责维护 presence 信息,并发送 status notification。
三、 SIP Messages(methods)
1. REGISTER
UA client 使用此 message 向 server 注册以标明自己的位置。
2. INVITE
UAC 发送此信息用以邀请 UAS 加入会话(包择一对一通话或 conference), 其实就是一个 call setup mes
487
Request Terminated
488
Not Acceptable Here
491
Request Pending
493
Undecipherable
500
Internal Server Error

SIP:exosip

SIP:exosip

SIP:exosip前几天编程虽然一直都成功,但是有个问题就是我们总是在重复开启eXosip_event_wait(0,50)函数,现在打算围绕eXosip_event_wait展开,即eXosip_event_wait一直处以循环跑。

--------海xx程序研究--------参看下海xx的程序,是如下所示的,在imsUA.c中的main函数中有如下函数:g_timeout_add (200, get_exosip_events, imsUA);解释如下:g_timeout_add (guint interval,GSourceFunc function,gpointer data);第一个参数是间隔的毫秒数,第二个参数是定时后的callback,第三个是传递给callback的数据。

海xx的程序是指每隔200ms进行如下流程,对不同的事件进行不同的响应。

int get_exosip_events(gpointer main_window){eXosip_event_t *je;char display[500] = "";eXosip_lock();eXosip_unlock();if((je = eXosip_event_wait(0,50)) != NULL){// fprintf(stderr, "Event type: %d %s\n", je->type, je->textinfo);imsua_display_event_info(je);if (je->type == EXOSIP_CALL_INVITE){ims_process_incoming_invite(je);}else if (je->type == EXOSIP_CALL_REINVITE){ims_process_incoming_reinvite(je);}else if (je->type == EXOSIP_CALL_RINGING){ims_process_18x(je);}else if (je->type == EXOSIP_CALL_GLOBALFAILURE){ims_process_released_call(je);}else if (je->type == EXOSIP_CALL_CLOSED){ims_process_released_call(je);}else if (je->type == EXOSIP_CALL_ANSWERED){ims_process_200ok(je);}else if (je->type == EXOSIP_CALL_RELEASED){ims_process_released_call(je);}else if (je->type == EXOSIP_CALL_CANCELLED){ims_process_released_call(je);}else if (je->type == EXOSIP_CALL_ACK){ims_process_ack(je);}else if (je->type == EXOSIP_CALL_MESSAGE_REQUESTFAILURE){ims_process_released_call(je);}else if (je->type == EXOSIP_CALL_REQUESTFAILURE){set_display("Call released");}else if (je->type == EXOSIP_CALL_SERVERFAILURE){set_display("Call released by server");}else if (je->type == EXOSIP_CALL_MESSAGE_NEW){if (MSG_IS_PRACK(je->request))ims_process_prack(je);else if (MSG_IS_UPDATE(je->request))ims_process_update(je);else if (MSG_IS_INFO(je->request))common_process_info(je);}else if (je->type == EXOSIP_CALL_MESSAGE_ANSWERED){if (MSG_IS_BYE(je->request))ims_process_released_call(je);else if (MSG_IS_UPDATE(je->request) || MSG_IS_PRACK(je->request))ims_process_2xx(je);}else if (je->type == EXOSIP_MESSAGE_NEW){if (MSG_IS_MESSAGE(je->request)){char sending_ui[50];strcpy(sending_ui,(((je->request)->to)->url)->username);strcat(sending_ui,"@");strcat(sending_ui,(((je->request)->to)->url)->host);char *temp;temp = strstr(pref->impu,":") + 1;if(strcmp(sending_ui,temp)==0){ims_start_im_session(je);}}else if (MSG_IS_BYE(je->request)){set_display("Call ended");}}else if(je->type == EXOSIP_MESSAGE_REQUESTFAILURE) {}else if(je->type == EXOSIP_MESSAGE_ANSWERED) {}else if(je->type == EXOSIP_REGISTRATION_SUCCESS) {if(is_message_deregister == 1){registered = NOT_REGISTERED;is_message_deregister = 0;sprintf(display, "Deregistered with %s",pref->realm);set_display(display);sprintf(display,"Not registered");set_status_bar(display);watchers_remove_all_watchers();num_associated_uris = 0;}else{registered = REGISTERED;ims_process_registration_200ok(je);}}else if(je->type == EXOSIP_REGISTRATION_FAILURE){if((je->response)== NULL){set_display("Registration failed for unknown reason\nMost probably incorrect credentials\n\nCheck Preferences");}else if(((je->response)->status_code == 403)){set_display("Invalid user name\n\nCheck Preferences");}else if(((je->response)->status_code == 401)){ims_process_401(je);}else if(((je->response)->status_code == 404) || ((je->response)->status_code == 407)){set_display("Error with credentials\n\nCheck Preferences");}else{set_display("Registration failed for unknown reason\n\nMost probably incorrect credentials\nCheck Preferences");}}else if(je->type == EXOSIP_REGISTRATION_REFRESHED){set_display("Regsitration Refreshed");registered = REGISTERED;}else if(je->type == EXOSIP_REGISTRATION_TERMINATED) {}else if(je->type == EXOSIP_SUBSCRIPTION_ANSWERED){}else if (je->type == EXOSIP_SUBSCRIPTION_NOTIFY){ims_process_notify(je);}else if (je->type == EXOSIP_SUBSCRIPTION_REQUESTFAILURE){}else if(((je->response)->status_code == 302)){ims_process_302(je);}else{}return TRUE;}----------------------------好了,GTK有上述函数,那现在需要在VC++上实现需要使用线程函数,孙鑫教程中使用了CreateThread函数,但是网上更加推荐_beginthreadex,函数,使用起来也非常简单,由于这个日志也算是回炒了,现在看起来也没什么,但是当时没有涉猎线程的概念,成功的意义倒是非常大。

oSIP开发者手册

oSIP开发者手册

Osip开发者手册:/zysee/archive/2007/01/16/1484239.aspxoSIP开发者手册——本手册指导开发者利用oSIP栈开发用户代理原文标题:oSIP User Manual原文作者:Aymeric Moizard联系方法:jack@版权保护:GNU Free Documentation License项目网站:译文作者:陈善学联系方法:chenshanxue@摘要“会话发起协议(Session Initiation Protocol-SIP)是一个应用层的信令控制协议。

用于创建、修改和终止一个或多个参与者的会话。

这些会话可以是Internet多媒体会议、IP电话或多媒体分发(例如:语音信箱)。

会话的参与者可以通过组播(multicast)、网状单播(unicast)或两者的混合体进行通信。

”"The Session Initiation Protocol (SIP) is an application-layer control (signaling) protocol for creating, modifying and terminating sessions with one or more participants. These sessions include Internet multimedia conferences, Internet telephone calls and multimedia distribution. Members in a session can communicate via multicast or via a mesh of unicast relations, or a combination of these."版权本文的版权归Aymeric Moizard所有。

允许拷贝、分发和在”GNU Free Documentation License”(版本1.1或由自由软件基金会最近发布的任何版本)下的定制。

exoSip开发手册

exoSip开发手册
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

exosip

exosip

exosip概述exosip 是一个开源的基于 C 语言编写的 SIP 协议栈。

它提供了一种轻量级的方式来实现 SIP 协议的客户端和服务器端功能。

exosip 的设计目标是简单易用、高性能、高可靠性。

特性1.轻量级:exosip 采用模块化设计,只包含了实现SIP 协议所必需的功能。

它的核心代码库非常小,运行内存占用也很低。

2.易用性:exosip 提供了清晰简洁的 API,使开发者可以快速理解和使用该库。

它提供了一套完整的函数接口,用于创建和发送 SIP 请求、处理 SIP 响应、建立和管理 SIP 会话。

3.高性能:exosip 使用了各种优化技术,包括多线程、异步 IO、事件驱动等,以实现高性能的 SIP 协议处理。

它能够高效地处理大量的 SIP 请求和响应。

4.高可靠性:exosip 实现了完整的 SIP 协议规范,对异常情况进行了处理,确保了系统的稳定性和可靠性。

它还提供了灵活的错误处理机制,方便开发者进行故障排查和问题定位。

安装和使用安装exosip 可以通过源代码编译安装,也可以通过包管理器进行安装。

下面是使用包管理器在 Ubuntu 操作系统上安装exosip 的示例:sudo apt-get install libeXosip2-dev使用使用 exosip 构建一个 SIP 客户端或服务器非常简单。

以下是一个基本的示例代码,演示了如何使用 exosip 创建一个注册请求,并处理注册响应:```c #include <eXosip2/eXosip.h>int main() { eXosip_t ctx; // exosip 上下文对象osip_message_t reg; // 注册请求对象 int ret;/* 初始化 exosip */ret = eXosip_init(ctx);if (ret != 0) { printf(\。

openeuler exosip编译

openeuler exosip编译

openeuler exosip编译
Exosip是一个基于SIP协议的开放源代码库,用于实现SIP客户端和服务器。

在OpenEuler上编译Exosip可以让开发者更方便地构建SIP应用程序。

以下是在OpenEuler上编译Exosip的步骤:
1. 安装必要的软件包
在OpenEuler上编译Exosip需要安装一些软件包,包括gcc、make、autoconf、automake等。

可以使用以下命令安装它们:
sudo zypper install gcc make autoconf automake
2. 下载Exosip源代码
可以从Exosip的官方网站上下载最新的源代码,并解压缩到本地目录中。

3. 配置和编译
在Exosip源代码目录中执行以下命令:
./configure --prefix=/usr/local/exosip
make
sudo make install
其中,--prefix指定了Exosip安装的路径,可以根据实际情况进行修改。

4. 配置环境变量
在~/.bashrc文件中添加以下行:
export
PKG_CONFIG_PATH=/usr/local/exosip/lib/pkgconfig:$PKG_CONFIG _PATH
然后执行以下命令使配置生效:
source ~/.bashrc
现在,您可以在OpenEuler上使用Exosip开发SIP应用程序了。

总结
在OpenEuler上编译Exosip可以让开发人员更方便地构建SIP 应用程序。

本文介绍了在OpenEuler上编译Exosip的步骤,希望对您有所帮助。

oSIP协议栈(及eXoSIP、Ortp等)使用入门

oSIP协议栈(及eXoSIP、Ortp等)使用入门

一直没空仔细研究下oSIP,最近看到其版本已经到了3.x版本,看到网上的许多帮助说明手册都过于陈旧,且很多文档内容有点误人子弟的嫌疑~~Linux下oSIP的编译使用应该是很简单的,其Install说明文档里也介绍的比较清楚,本文主要就oSIP在Windows平台下VC6.0开发环境下的使用作出描述。

虽然oSIP的开发人员也说明了,oSIP只使用了标准C开发库,但许多人在Windows下使用oSIP时,第一步就被卡住了,得不到oSIP的LIB库和DLL库,也就没有办法将oSIP使用到自己的程序中去,所以第一步,我们将学习如何得到oSIP的静态和动态链接库,以便我们自己的程序能够使用它们来成功编译和执行我们的程序。

第一阶段:------------------------------------------------------先创建新工程,网上许多文档都介绍创建一个Win32动态链接库工程,我们这里也一样,创建一个空白的工程保存。

同样,将oSIP2版本3.0.1 src目录下的Osipparser2目录下的所有文件都拷到我们刚创建的工程的根目录下,在VC6上操作:Project-AddToProject-Files将所有的源程序和头文件都加入到工程内,保存工程。

这时,我们可以尝试编译一下工程,你会得到许多错误提示信息,其内容无非是找不到osipparser2/xxxxx.h头文件之类。

处理:在Linux下,我们一般是将头文件,lib库都拷到/usr/inclue;/usr/lib之类的目录下,c源程序里直接写#include <xxx.h>时,能直接去找到它们,在VC里,同样的,最简单的方法就是将oSIP2源码包中的Include目录下的 osipparser2目录直接拷到我们的Windows下默认包含目录即可,这个目录在VC6的Tool-Options-Directories里设置,(当然,如果你知道这一步,也可以不用拷贝文件,直接在这里把oSIP源码包所在目录加进来就可以了),默认如果装在C盘,目录则为 C:/Program Files/Microsoft Visual Studio/VC98/Include。

exosip2协议栈原理分析以及总结-图文

exosip2协议栈原理分析以及总结-图文

exosip2协议栈原理分析以及总结-图文exosip2协议栈学习总结1、exosip2协议栈介绍eXosip是Osip2的一个扩展协议集,它部分封装了Osip2协议栈,使得它更容易被使用。

使用 sip 协议建立多媒体会话是一个复杂的过程,exosip 库开发的目的在于隐藏这种复杂性。

正如它的名称所表示的,eXosip2 - the eXtended osip Library,它扩展了osip 库,实现了一个简单的高层API。

通过使用exosip,我们可以避免直接使用osip 带来的困难。

需要注意,exosip 并不是对osip 的简单封装包裹,而是扩展。

Osip 专注于sip 消息的解析,事务状态机的实现,而exosip 则基于osip 实现了call、options、register、publish 等更倾向于功能性的接口。

当然,这些实现都是依赖于底层osip 库已有的功能的。

2、exosip的模块构成2.1 底层连接管理extl.c、extl_udp.c、extl_tcp.c、extl_dtls.c、extl_tls.c 是与网络连接有关的文件。

实现了连接的建立,数据的接收以及发送等相关的接口。

其中,extl_udp.c 为使用UDP 连接的实现,extl_tcp.c 为使用TCP 连接的实现。

Extl_dtls.c 以及extl_tls.c 都是使用安全socket 连接的实现。

2.2 内部功能模块实现 Jauth.c、jcall.c、jdialog.c、jevents.c、jnotify.c、jpublish.c、jreg.c、jrequest.c、jresponse.c、jsubscribe.c 等文件实现了内部对一些模块的管理,这些模块正如其文件名所表示的,jauth.c主要是认证,jcall.c 则是通话等等。

2.3 上层API 封装实现Excall_api.c、exinsubsription_api.c、exmessag_api.c、exoptions_api.c、expublish_api.c、exrefer_api.c、exregister_api.c、exsubsribtion_api.c 这几个以api 为后缀的文件,实现各个子模块的管理。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

exoSip 开发者手册
1 扩展的eXosip协议栈
1.1 如何初始化libeXosip2
当使用eXosip时,你的首要任务是初始化eXosip上下文和libosip库(语法分析器和状态机)。

这是在使用libeXosip2之前一定要完成的。

include <eXosip2/eXosip.h>
int i;
TRACE_INITIALIZE (6, stdout);
i=eXosip_init();
if (i!=0)
return -1;
//在特定的socket上监听
i = eXosip_listen_addr (IPPROTO_UDP, NULL, port, AF_INET, 0);
if (i!=0)
{
eXosip_quit();
fprintf (stderr, "could not initialize transport layer\n");
return -1;
}
…初始化之后就可以发送消息或者等待eXosip事件的到来…
在前面的代码中,您学习了如何:
初始化osip trace(用- DENABLE_TRACE编译此代码)
初始化eXosip(和osip)堆栈
为信号打开一个套接字(只有UDP要初始eXosip2)
现在你要处理eXosip事件。

下面是一些来获得eXosip_event从
在eXosip2堆栈的代码。

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);
你将为每个SIP消息的发送收到一个事件,每个事件包含。

相关文档
最新文档