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的例子经过一段时间的学习,对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 产品使用说明应用手册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解析

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协议栈的软电话设计与实现


文 章 编 号 :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
  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消息的发送收到一个事件,每个事件包含。

相关文档
最新文档