亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? chapterexample.cxx

?? Vovida 社區開源的 SIP 協議源碼
?? CXX
字號:
#include "Data.hxx"#include "InviteMsg.hxx"#include "SipSdp.hxx"#include "SipVia.hxx"using namespace Vocal;using namespace Vocal::SDP;char* example = "INVITE sip:6713@192.168.26.180:6060;user=phone SIP/2.0\r\n\Via: SIP/2.0/UDP 192.168.22.36:6060\r\n\From: UserAgent<sip:6710@192.168.22.36:6060;user=phone>\r\n\To: 6713<sip:6713@192.168.26.180:6060;user=phone>\r\n\Call-ID: 96561418925909@192.168.22.36\r\n\CSeq: 1 INVITE\r\n\Subject: VovidaINVITE\r\n\Contact: <sip:6710@192.168.22.36:6060;user=phone>\r\n\Content-Type: application/sdp\r\n\Content-Length: 168\r\n\\r\n\v=0\r\n\o=- 238540244 238540244 IN IP4 192.168.22.36\r\n\s=VOVIDA Session\r\n\c=IN IP4 192.168.22.36\r\n\t=3174844751 0\r\n\m=audio 23456 RTP/AVP 0\r\n\a=rtpmap:0 PCMU/8000\r\n\a=ptime:20\r\n\\r\n";/* the following code is an example of how to create a SIP message   using the VOCAL SIP API.  The message created will closely resemble   the example message, above.  Not all of the code below is strictly   necessary -- specifically, a number of the headers, such as the Via   list, the Subject, and the like are filled out with reasonable   default values for user agents.   in a real example, you would probably call   SipTransciever::sendAsync() to send off the message via the network   instead of encode()ing it and printing it out.*/Data exampleEncode(){    Sptr<SipUrl> toUrl 	= new SipUrl(Data("sip:6713@192.168.26.180:6060;user=phone"));    Sptr<SipUrl> myUrl 	= new SipUrl(Data("sip:6710@192.168.26.180:6060;user=phone"));    // this sets the To: URL and the Request-URI to toUrl.    // in addition, the constructor sets default values for many of the    // headers    InviteMsg msg(toUrl, 6060);    // set the From: to myUrl with display name "UserAgent"    SipFrom myFrom;    myFrom.setDisplayName("UserAgent");    myFrom.setUrl(myUrl);    msg.setFrom(myFrom);    // set the Call ID -- normally, you should let the InviteMsg    // constructor create the call id for you    SipCallId myId;    myId.setHost("192.168.22.36");    myId.setLocalId("96561418925909");    msg.setCallId(myId);    // set the Contact    SipContact myContact;    myContact.setUrl(myUrl);    msg.setNumContact(0);    msg.setContact(myContact);    // set the Via    SipVia myVia;    myVia.setHost("192.168.22.36");    myVia.setPort(6060);    msg.setNumVia(0);    msg.setVia(myVia);    // set the SDP information    SdpSession mySession;    mySession.setUserName("-");    mySession.setAddress("192.168.22.36");    mySession.setSessionId(238540244);    mySession.setVersion(238540244);    mySession.setSessionName("VOVIDA Session");    SdpConnection myConnection;    myConnection.setUnicast("192.168.22.36");    mySession.setConnection(myConnection);    SdpMedia* myMedia = new SdpMedia;    myMedia->setPort(23456);    myMedia->setMediaType(MediaTypeAudio);    myMedia->setTransportType(TransportTypeRTP);    ValueAttribute* myValue = new ValueAttribute();    myValue->setAttribute( "ptime" );    myValue->setValue( "20" );    SdpRtpMapAttribute* myRtpAttrib = new SdpRtpMapAttribute();    myRtpAttrib->setPayloadType( 0 );    myRtpAttrib->setEncodingName( "PCMU" );    myRtpAttrib->setClockRate( 8000 );    MediaAttributes* myAttrib = new MediaAttributes();    myAttrib->addValueAttribute(myValue);    myAttrib->addmap(myRtpAttrib);    myMedia->setMediaAttributes(myAttrib);    mySession.addMedia(myMedia);    Sptr<SipSdp> mySdp;    mySdp.dynamicCast(msg.getContentData(0));    if(mySdp != 0)    {	mySdp->setSdpDescriptor(mySession);    }    else    {	// no good!	cout << "no good!\n";    }    return msg.encode();}/* here is a simple SIP URL output function */void outputSipUrl(Sptr<BaseUrl> url){    if(url->getType() == SIP_URL)    {	// this code assumes that the URL is a SIP URL.  Again, we	// must dynamicCast to get at the SipUrl specific methods.	Sptr<SipUrl> sipUrl;	sipUrl.dynamicCast(url);		cout	    << "    User: " << sipUrl->getUserValue() << "\n"	    << "    Host: " << sipUrl->getHost() << "\n"	    << "    Port: " << sipUrl->getPort() << "\n";    }}/* the following code shows how to decode the above example message.   Normally, the message would be what you would get returned to you via   SipTransciever::receive() .  */void exampleDecode(){    Sptr<SipMsg> msg = SipMsg::decode(Data(example));    // at this point, msg is of type Sptr<SipMsg>, so we don't know if    // it's an INVITE or not.    if(msg->getType() == SIP_INVITE)    {	// if the message is an INVITE, this code gets run:	Sptr<InviteMsg> invite;	invite.dynamicCast(msg);	// now, invite is a sptr to msg but of type InviteMsg.	Sptr<BaseUrl> url = invite->getRequestLine().getUrl();	if(url->getType() == SIP_URL)	{	    // this code assumes that the URL is a SIP URL.  Again, we	    // must dynamicCast to get at the SipUrl specific methods.	    Sptr<SipUrl> sipUrl;	    sipUrl.dynamicCast(url);	    cout << "Request-URI\n"		 << "    User: " << sipUrl->getUserValue() << "\n"		 << "    Host: " << sipUrl->getHost() << "\n"		 << "    Port: " << sipUrl->getPort() << "\n";	}	// now, get the From: line	SipFrom from = invite->getFrom();	cout << "From\n"	     << "    Display Name: " << from.getDisplayName() << "\n";	outputSipUrl(from.getUrl());	// same thing for the To: line	SipTo to = invite->getTo();	cout << "To\n"	     << "    Display Name: " << to.getDisplayName() << "\n";	outputSipUrl(to.getUrl());	// get the 0th via	SipVia via = invite->getVia(0);	cout << "Via\n"	     << "    Host: " << via.getHost() << "\n"	     << "    Port: " << via.getPort() << "\n";	// get the Contact	SipContact contact = invite->getContact(0);	cout << "Contact\n";	outputSipUrl(contact.getUrl());	// now, for the SDP	Sptr<SipSdp> remoteSdp;	remoteSdp.dynamicCast (invite->getContentData(0));	if(remoteSdp != 0)	{	    // we hope this SDP is the remote one	    	    // we can use the simplified SDP interface to get useful	    // information	    	    cout << "SDP\n"		 << "    Remote Address: " 		 << remoteSdp->getConnAddress() << "\n"		 << "    Remote RTP Port: " << remoteSdp->getRtpPort() << "\n"		 << endl;	    // to get more detailed information, we need to get an	    // SdpSession and look there.  Here is one example of	    // doing that:	    SdpSession session = remoteSdp->getSdpDescriptor();	    SdpMedia* media = session.getMediaList().front(); // get the 0th element	    if(media != 0)	    {		MediaAttributes* attrib = media->getMediaAttributes();		if(attrib != 0)		{		    vector < ValueAttribute* > *valueVector =			attrib->getValueAttributes();		    if(valueVector != 0)		    {			cout << "  Attribute: " 			     << ((*valueVector)[0])->getAttribute() 			     << " Value: "			     << ((*valueVector)[0])->getValue()			     << "\n";		    }		}	    }	}    }}int main(){    cout << exampleEncode() << endl;    cout << endl;    exampleDecode();    return 0;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91亚洲精品久久久蜜桃网站| 激情欧美一区二区三区在线观看| 91看片淫黄大片一级| 中文字幕亚洲不卡| 一本大道久久a久久综合| 亚洲私人黄色宅男| 在线观看免费亚洲| 日本欧美在线看| 久久久久久久性| av网站免费线看精品| 尤物视频一区二区| 91精品国产欧美一区二区18| 激情欧美一区二区| 1024国产精品| 正在播放一区二区| 国产成人免费在线| 亚洲午夜日本在线观看| 日韩视频一区二区三区在线播放| 激情五月激情综合网| 成人免费在线播放视频| 欧美另类一区二区三区| 国产精品18久久久久久久久| 亚洲综合在线免费观看| 日韩一区和二区| 成人av在线看| 另类小说欧美激情| 中文字幕一区二区三区精华液| 欧美日韩一卡二卡三卡| 国产成人av资源| 亚洲成人精品在线观看| 国产亚洲一区二区三区在线观看| 欧美性一级生活| 国产一区二区电影| 性感美女极品91精品| 国产女人水真多18毛片18精品视频 | 99精品欧美一区二区蜜桃免费 | 中文字幕佐山爱一区二区免费| 欧美三级电影精品| 国产成人免费视频精品含羞草妖精| 亚洲黄色av一区| 久久精品夜色噜噜亚洲aⅴ| 欧美日本乱大交xxxxx| 成人精品电影在线观看| 蜜臀av一区二区在线观看| 成人欧美一区二区三区黑人麻豆 | 欧美在线一区二区| 国产精品18久久久| 免费观看在线综合色| 亚洲激情网站免费观看| 欧美国产精品久久| 日韩一区二区在线看| 色狠狠av一区二区三区| 国产高清久久久| 老司机精品视频线观看86| 午夜国产精品一区| 亚洲激情男女视频| 亚洲欧洲日韩在线| 国产精品欧美一级免费| 久久久久久久综合日本| 欧美tickling网站挠脚心| 欧美日韩国产免费| 91官网在线观看| 色综合视频在线观看| 99久久精品国产一区| 国产成人精品免费| 国产美女av一区二区三区| 美女脱光内衣内裤视频久久网站 | 久久国产生活片100| 日韩精品乱码免费| 五月激情综合色| 亚洲不卡在线观看| 香蕉av福利精品导航| 亚洲高清免费视频| 日韩综合小视频| 日本在线不卡视频| 蜜臀精品久久久久久蜜臀| 日本少妇一区二区| 九九国产精品视频| 狠狠色丁香婷婷综合| 国产美女在线精品| 不卡视频一二三四| 色综合 综合色| 欧美中文字幕一区二区三区| 欧美性生活大片视频| 在线观看日韩精品| 91精品久久久久久蜜臀| 欧美一二区视频| 国产日韩欧美电影| 亚洲视频狠狠干| 亚洲韩国一区二区三区| 亚洲大片免费看| 日韩av一级片| 国产乱妇无码大片在线观看| 国产成人精品网址| 91色乱码一区二区三区| 欧美另类高清zo欧美| 欧美高清激情brazzers| 久久亚洲综合色一区二区三区| 久久久av毛片精品| 亚洲色图都市小说| 日韩国产在线一| 国产成人自拍网| 91亚洲精华国产精华精华液| 欧美日韩一区成人| 久久久亚洲高清| 夜色激情一区二区| 久久国产福利国产秒拍| eeuss国产一区二区三区| 欧美日韩一区二区在线视频| 91精品欧美综合在线观看最新| 国产女主播一区| 偷偷要91色婷婷| 波多野结衣亚洲| 51精品国自产在线| 国产精品女主播在线观看| 首页国产丝袜综合| 国产成人av一区二区三区在线| 日本高清不卡aⅴ免费网站| 欧美xfplay| 一片黄亚洲嫩模| 国产福利精品一区二区| 欧美日韩一区视频| 国产精品女同互慰在线看| 奇米一区二区三区| 91啪在线观看| 国产亚洲1区2区3区| 一区二区三区欧美| 国产成人av电影免费在线观看| 欧美三级视频在线| 中文在线资源观看网站视频免费不卡 | 色老汉一区二区三区| 久久品道一品道久久精品| 亚洲成人av一区| 成人av电影免费在线播放| 欧美电影免费观看完整版| 亚洲精品久久久蜜桃| 国产麻豆精品视频| 欧美一区二区三区影视| 亚洲与欧洲av电影| 成人av资源站| 国产日本一区二区| 捆绑调教美女网站视频一区| 欧美日本在线视频| 亚洲影院在线观看| 91香蕉视频在线| 国产精品素人视频| 国产一区二区三区精品视频| 欧美一级夜夜爽| 五月天欧美精品| 欧美日韩一级大片网址| 亚洲免费在线观看| 99精品视频在线观看| 国产蜜臀97一区二区三区| 国产在线播放一区| 精品福利二区三区| 久久se精品一区二区| 欧美一区二区三区日韩| 日韩精品一级中文字幕精品视频免费观看| 不卡的av在线播放| 中文字幕av一区二区三区免费看| 精品一区二区久久久| 日韩精品中文字幕一区二区三区| 午夜激情久久久| 欧美一三区三区四区免费在线看 | 欧美视频一区二区三区四区| 亚洲欧美日韩在线| 一本大道久久a久久综合| 一区二区三区中文免费| 日本久久精品电影| 亚洲国产精品尤物yw在线观看| 欧美日韩一本到| 日韩av在线播放中文字幕| 日韩免费电影一区| 国产一区二区久久| 国产精品盗摄一区二区三区| av成人老司机| 成人免费的视频| 中文字幕高清一区| 91在线国产福利| 亚洲激情在线播放| 日韩电影在线观看网站| 欧美乱熟臀69xxxxxx| 日日夜夜一区二区| 日韩一卡二卡三卡| 亚洲欧美色图小说| 26uuu亚洲婷婷狠狠天堂| 欧美婷婷六月丁香综合色| 亚洲视频一区在线观看| 日韩三级在线免费观看| 91网页版在线| 精品一区二区在线看| 曰韩精品一区二区| 久久精品无码一区二区三区| 精品视频一区二区不卡| 成人中文字幕合集| 蜜臂av日日欢夜夜爽一区| 亚洲午夜久久久久久久久电影网| 国产欧美日产一区| 日韩欧美国产一区在线观看| 欧美偷拍一区二区|