使用SIPp进行SIP压力测试_第1页
使用SIPp进行SIP压力测试_第2页
使用SIPp进行SIP压力测试_第3页
使用SIPp进行SIP压力测试_第4页
使用SIPp进行SIP压力测试_第5页
已阅读5页,还剩12页未读, 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

使用SIPp进行SIP压力测试使用SIPp进行SIP压力测试/使用SIPp进行SIP压力测试使用SIPp进行SIP压力测试2008-03-26目录简介SIPp是一个测试SIP协议性能的工具软件。这是一个GPL的开放源码软件。它包含了一些基本的用户代理工作流程(UAC和UAS),并可使用INVITE和BYE建立和释放多个呼叫。它也可以读XML的场景文件,即描述任何性能测试的配置文件。它能动向显示测试运行的统计数据(呼叫速率、信号来回的延缓,以及信息统计)。周期性地把CSV统计数据转储,在多个套接字上的TCP和UDP,利用重新传输管理的多路复用。在场景定义文件中可以使用正规表达式,动向调整呼叫速率。SIPp可以用来测试好多真实的SIP设备,如SIP代理,B2BUAs,SIP媒体服务器,SIP/x网关,SIPPBX,等等,它也可以模拟上千个SIP代理呼叫你的SIP系统。安装四种安装方法(本文使用第四种安装):没有TLS支持与密码考据支持cdsipp-xxxmakeMake出来的sipp文件就是一个可执行的文件,只需要搭配场景xml文件与csv文件即可进行SIP测试2.拥有TLS支持与密码考据支持,但是不支PCAP语音播放#cdsipp-xxx#makeossl这样编译出来的文件就加入了TLS至于与密码考据支持功能sipp软件了。3.支持PCAPPlay,但是没有密码考据支持:(PCAPPlay即为可以进行RTP语音,但是没有407AUTH考据)#cdsipp-xxx#makepcapplay4.支持PCAP声音文件播放,而且支持密码考据支持:(支持407auth考据支持)tar-xvfsipp-xxx.tarcdsipp-xxx#makepcapplay_ossl使用方法./sipp-sfreg.xml-infreg.csv-p6077-i<local-ip>-m4<ipaddressofregistrar>:5060-sf读取场景文件-inf读取csv文件-p本机采用端口-i本机IP-m要进行压力测试的次数Ipaddressofregistrar要进行压力测试的IP地址情况Uac(192.216.2.224)Asterisk(192.216.224.183)Uas4.1注册发送

模拟若干个注册包到asterisk,asterisk回100tring和401authenticationinvite带auth考据信息到asterisk,asterisk回100tring和200ok。

,SIPp测试<?xmlversion="1.0"encoding="ISO-8859-1"?><!DOCTYPEscenarioSYSTEM"sipp.dtd"><!--Thisprogramisfreesoftware;youcanredistributeitand/or--><!--modifyitunderthetermsoftheGNUGeneralPublicLicenseas--><!--publishedbytheFreeSoftwareFoundation;eitherversion2ofthe--><!--License,or(atyouroption)anylaterversion.--><!><!--Thisprogramisdistributedinthehopethatitwillbeuseful,--><!--butWITHOUTANYWARRANTY;withouteventheimpliedwarrantyof--><!--MERCHANTABILITYorFITNESSFORAPARTICULARPURPOSE.Seethe--><!--GNUGeneralPublicLicenseformoredetails.--><!><!--YoushouldhavereceivedacopyoftheGNUGeneralPublicLicense--><!--alongwiththisprogram;ifnot,writetothe--><!--FreeSoftwareFoundation,Inc.,--><!--59TemplePlace,Suite330,Boston,MA02111-1307USA--><!><!--Sippdefault'branchc'scenario.--><!><!--第一发送SIP注册信息,Register。里面的From与To是注册的号码--><scenarioname="branch_client">sendretrans="500"><![CDATA[REGISTERsip:[remote_ip]SIP/2.0Via:SIP/2.0/[transport][local_ip]:[local_port];branch=[branch]From:[field0]<sip:[field0]@[local_ip]:[local_port]>;tag=[call_number]To:[field0]<sip:[field0]@[remote_ip]:[remote_port]>Call-ID:[call_id]CSeq:1REGISTERContact:sip:[field0]@[local_ip]:[local_port]Content-Length:0Expires:300]]></send><recvresponse="100"optional="true"></recv><!--SIPp会收到来自AST要求考据的401信息体,Recv意思为Receive,接收到来自AST的401要求考据的信息,Next为若是收到401,那么转至Label为1的地方进行操作--><recvresponse="401"auth="true"next="1"></recv><!--sendinvitewithauthenticationmessages--><!--开始发送Register信息,里面将把考据的密码信息发送给对方,在信息体里面是抓不到密码信息的,而且已经被md5方式加密过。--><labelid="1"/>sendretrans="500"><![CDATA[REGISTERsip:[field0]@[remote_ip]:[remote_port]SIP/2.0Via:SIP/2.0/[transport][local_ip]:[local_port]From:[field0]<sip:[field0]@[local_ip]:[local_port]>;tag=[call_number]To:[field0]<sip:[field0]@[remote_ip]:[remote_port]>Call-ID:[call_id]CSeq:2REGISTERContact:sip:[field0]@[local_ip]:[local_port][field1]Content-Length:[len]Expires:3600]]></send><recvresponse="100"optional="true"></recv><!--收到来自AST的200ACK信息后,系统转至等待1000ms,也许可以直接去掉该设置--><recvresponse="200"next="2"></recv><labelid="2"/><pausemilliseconds="1000"/><!--Keepthecallopenforawhileincasethe200islosttobe--><!--abletoretransmititifwereceivetheBYEagain.--><pausemilliseconds="4000"/><!--definitionoftheresponsetimerepartitiontable(unitisms)--><ResponseTimeRepartitionvalue="10,20,30,40,50,100,150,200"/><!--

definitionofthecalllengthrepartitiontable(unitisms)

--><CallLengthRepartition

value="10,50,100,500,1000,5000,10000

"/></scenario>SEQUENTIAL6666609;[authenticationusername=6666609password=6666609]4.2呼叫SIPp发送Invite信息到asterisk,AST回407要求密码考据,SIPp返回200ok,并发送invite带密码信息到asterisk,asterisk返回200OK,接着返回180,SIPp此时开始传输RTP到asterisk,延缓5000ms发送DTMF=1的号码,今后SIPp发送Bye信息到asterisk,asterisk返回200ok给SIPp。测试<?xmlversion="1.0"encoding="ISO-8859-1"?><!DOCTYPEscenarioSYSTEM"sipp.dtd"><!--Thisprogramisfreesoftware;youcanredistributeitand/or--><!--modifyitunderthetermsoftheGNUGeneralPublicLicenseas--><!--publishedbytheFreeSoftwareFoundation;eitherversion2ofthe--><!--License,or(atyouroption)anylaterversion.--><!><!--Thisprogramisdistributedinthehopethatitwillbeuseful,--><!--butWITHOUTANYWARRANTY;withouteventheimpliedwarrantyof--><!--MERCHANTABILITYorFITNESSFORAPARTICULARPURPOSE.Seethe--><!--GNUGeneralPublicLicenseformoredetails.--><!><!--YoushouldhavereceivedacopyoftheGNUGeneralPublicLicense--><!--alongwiththisprogram;ifnot,writetothe--><!--FreeSoftwareFoundation,Inc.,--><!--59TemplePlace,Suite330,Boston,MA02111-1307USA--><!><!--Sipp'uac'scenariowithpcap(rtp)play--><!><scenarioname="UACwithmedia"><!--Inclientmode(sippplacingcalls),theCall-IDMUSTbe--><!--generatedbysipp.Todoso,use[call_id]keyword.-->sendretrans="500"><![CDATA[INVITEsip:[field1]@[remote_ip]:[remote_port]SIP/2.0Via:SIP/2.0/[transport][local_ip]:[local_port];branch=[branch]From:[field0]<sip:[field0]@[local_ip]:[local_port]>;tag=[call_number]To:[field1]<sip:[field1]@[remote_ip]:[remote_port]>Call-ID:[call_id]CSeq:1INVITEContact:sip:[field0]@[local_ip]:[local_port]Max-Forwards:70Subject:PerformanceTestContent-Type:application/sdpContent-Length:[len]v=0s=-c=INIP[local_ip_type][local_ip]t=00m=audio[auto_media_port]RTP/AVP8a=rtpmap:8PCMA/8000a=rtpmap:101telephone-event/8000a=fmtp:1010-11,16]]></send><recvresponse="407"auth="true"></recv><!--Byaddingrrs="true"(RecordRouteSets),theroutesets

--><!--aresavedandusedforfollowingmessagessent.Usefultotest

--><!--againststatefulSIPproxies/B2BUAs.

--><!--Packetlostcanbesimulatedinanysend/recvmessageby

--><!--byaddingthe'lost="10"'.Valuecanbe[1-100]percent.

-->send><![CDATA[ACKsip:[field1]@[remote_ip]:[remote_port]SIP/2.0Via:SIP/2.0/[transport][local_ip]:[local_port];branch=[branch]From:[field0]<sip:[field0]@[local_ip]:[local_port]>;tag=[call_number]To:[field1]<sip:[field1]@[remote_ip]:[remote_port]>[peer_tag_param]Call-ID:[call_id]CSeq:1ACKContact:sip:[field0]@[local_ip]:[local_port]Max-Forwards:70Subject:PerformanceTestContent-Length:0]]></send>sendretrans="500"><![CDATA[INVITEsip:[field1]@[remote_ip]:[remote_port]SIP/2.0Via:SIP/2.0/[transport][local_ip]:[local_port]From:[field0]<sip:[field0]@[local_ip]:[local_port]>;tag=[call_number]To:[field1]<sip:[field1]@[remote_ip]:[remote_port]>Call-ID:[call_id]CSeq:2INVITEContact:sip:[field0]@[local_ip]:[local_port][field2]Max-Forwards:70Subject:PerformanceTestContent-Type:application/sdpContent-Length:[len]v=0s=-t=00c=INIP[media_ip_type][media_ip]m=audio[auto_media_port]RTP/AVP0a=rtpmap:0PCMU/8000]]></send><recvresponse="100"optional="true"></recv><recvresponse="183"optional="true"></recv><recvresponse="180"optional="true"></recv><recvresponse="200"rtd="true"></recv><!--Packetlostcanbesimulatedinanysend/recvmessageby--><!--byaddingthe'lost="10"'.Valuecanbe[1-100]percent.-->send><![CDATA[ACKsip:[field1]@[remote_ip]:[remote_port]SIP/2.0Via:SIP/2.0/[transport][local_ip]:[local_port];branch=[branch]From:[field0]<sip:[field0]@[local_ip]:[local_port]>;tag=[call_number]To:[field1]<sip:[field1]@[remote_ip]:[remote_port]>[peer_tag_param]Call-ID:[call_id]CSeq:2ACKContact:sip:[field0]@[local_ip]:[local_port]Max-Forwards:70Subject:PerformanceTestContent-Length:0]]></send><!--Playapre-recordedPCAPfile(RTPstream)-->nop>action><execplay_pcap_audio="pcap/g711a.pcap"/></action></nop><!--Pause8seconds,whichisapproximatelythedurationofthe--><!--PCAPfile--><pausemilliseconds="5000"/><!--PlayanoutofbandDTMF'1'-->nop>action><execplay_pcap_audio="pcap/dtmf_2833_1.pcap

"/></action></nop><pausemilliseconds

="1000"/><!--The'crlf'optioninsertsablanklineinthestatisticsreport.

-->sendretrans="500"><![CDATA[BYEsip:[field1]@[remote_ip]:[remote_port]SIP/2.0Via:SIP/2.0/[transport][local_ip]:[local_port];branch=[branch]From:[field0]<sip:[field0]@[local_ip]:[local_port]>;tag=[call_number]To:[field1]<sip:[field1]@[remote_ip]:[remote_port]>[peer_tag_param]Call-ID:[call_id]CSeq:2BYEContact:sip:[field0]@[local_ip]:[local_port]Max-Forwards:70Subject:PerformanceTestContent-Length:0]]></send><recvresponse="200"crlf="true"></recv><pause

milliseconds

="2000"/><!--definitionoftheresponsetimerepartitiontable(unitisms)

--><ResponseTimeRepartitionvalue="10,20,30,40,50,100,150,200

"/><!--definitionofthecalllengthrepartitiontable(unitisms)

--><CallLengthRepartitionvalue="10,50,100,500,1000,5000,10000

"/></scenario

>SEQUENTIAL6666608;6666609;[authenticationusername=6666608password=6666608]6666608;6666610;[authenticationusername=6666608password=6666608]4.3会议50个人同时呼叫555会议接入号,进入后输入密码5#,进入会议室,今后打招呼,30秒后同时退出聊天室,15秒后再次进入会议室,不停地循环。测试<?xmlversion="1.0"encoding="ISO-8859-1"?><!DOCTYPEscenarioSYSTEM"sipp.dtd"><!--Thisprogramisfreesoftware;youcanredistributeitand/or--><!--modifyitunderthetermsoftheGNUGeneralPublicLicenseas--><!--publishedbytheFreeSoftwareFoundation;eitherversion2ofthe--><!--License,or(atyouroption)anylaterversion.--><!><!--Thisprogramisdistributedinthehopethatitwillbeuseful,--><!--butWITHOUTANYWARRANTY;withouteventheimpliedwarrantyof--><!--MERCHANTABILITYorFITNESSFORAPARTICULARPURPOSE.Seethe--><!--GNUGeneralPublicLicenseformoredetails.--><!><!--YoushouldhavereceivedacopyoftheGNUGeneralPublicLicense--><!--alongwiththisprogram;ifnot,writetothe--><!--FreeSoftwareFoundation,Inc.,--><!--59TemplePlace,Suite330,Boston,MA02111-1307USA--><!><!--Sipp'uac'scenariowithpcap(rtp)play--><!--

--><scenarioname="UACwithmedia"><!--Inclientmode(sippplacingcalls),theCall-IDMUSTbe<!--generatedbysipp.Todoso,use[call_id]keyword.

-->--><sendretrans="500"><![CDATA[INVITEsip:[field1]@[remote_ip]:[remote_port]SIP/2.0Via:SIP/2.0/[transport][local_ip]:[local_port];branch=[branch]From:[field0]<sip:[field0]@[local_ip]:[local_port]>;tag=[call_number]To:[field1]<sip:[field1]@[remote_ip]:[remote_port]>Call-ID:[call_id]CSeq:1INVITEContact:sip:[field0]@[local_ip]:[local_port]Max-Forwards:70Subject:PerformanceTestContent-Type:application/sdpContent-Length:[len]v=0s=-c=INIP[local_ip_type][local_ip]t=00m=audio[auto_media_port]RTP/AVP8a=rtpmap:8PCMA/8000a=rtpmap:101telephone-event/8000a=fmtp:1010-11,16]]></send><recvresponse="407"auth="true"></recv><!--Byaddingrrs="true"(RecordRouteSets),theroutesets--><!--aresavedandusedforfollowingmessagessent.Usefultotest--><!--againststatefulSIPproxies/B2BUAs.--><!--Packetlostcanbesimulatedinanysend/recvmessageby--><!--byaddingthe'lost="10"'.Valuecanbe[1-100]percent.--><send><![CDATA[ACKsip:[field1]@[remote_ip]:[remote_port]SIP/2.0Via:SIP/2.0/[transport][local_ip]:[local_port];branch=[branch]From:[field0]<sip:[field0]@[local_ip]:[local_port]>;tag=[call_number]To:[field1]<sip:[field1]@[remote_ip]:[remote_port]>[peer_tag_param]Call-ID:[call_id]CSeq:1ACKContact:sip:[field0]@[local_ip]:[local_port]Max-Forwards:70Subject:PerformanceTestContent-Length:0]]></send><sendretrans="500"><![CDATA[INVITEsip:[field1]@[remote_ip]:[remote_port]SIP/2.0Via:SIP/2.0/[transport][local_ip]:[local_port]From:[field0]<sip:[field0]@[local_ip]:[local_port]>;tag=[call_number]To:[field1]<sip:[field1]@[remote_ip]:[remote_port]>Call-ID:[call_id]CSeq:2INVITEContact:sip:[field0]@[local_ip]:[local_port][field2]Max-Forwards:70Subject:PerformanceTestContent-Type:application/sdpContent-Length:[len]v=0s=-t=00c=INIP[media_ip_type][media_ip]m=audio[auto_media_port]RTP/AVP0a=rtpmap:0PCMU/8000]]></send><recvresponse="100"optional="true"></recv><recvresponse="180"optional="true"></recv><recvresponse="183"optional="true"></recv><recvresponse="200"rtd="true"crlf="true"></recv>send><![CDATA[ACKsip:[field1]@[remote_ip]:[remote_port]SIP/2.0Via:SIP/2.0/[transport][local_ip]:[local_port];branch=[branch]From:[field0]<sip:[field0]@[local_ip]:[local_port]>;tag=[call_number]To:[field1]<sip:[field1]@[remote_ip]:[remote_port]>[peer_tag_param]Call-ID:[call_id]CSeq:2ACKContact:sip:[field0]@[local_ip]:[local_port]Max-Forwards:70Subject:PerformanceTestContent-Length:0]]></send><!--Playapre-recordedPCAPfile(RTPstream)<!--Pause8seconds,whichisapproximatelythedurationofthe<!--PCAPfile<pausemilliseconds="3000"/><!--PlayanoutofbandDTMF'5''#'

-->-->-->-->nop>action><execplay_pcap_audio="pcap/dtmf_2833_5.pcap"/></action></nop><pausemilliseconds="1000"/>nop>action><execplay_pcap_audio="pcap/dtmf_2833_pound.pcap</action></nop>

"/><pausemilliseconds="1000"/>nop>action><execplay_pcap_audio="pcap/g711a.pcap"/></action></nop><pausemilliseconds="30000"/>sendretrans="500"><![CDATA[BYEsip:[field1]@[remote_ip]:[remote_port]SIP/2.0Via:SIP/2.0/[transport][local_ip]:[local_port];branch=[branch]From:[field0]<sip:[field0]@[local_ip]:[local_port]>;tag=[call_number]To:[field1]<sip:[field1]@[remote_ip]:[remote_port]>[peer_tag_param]Call-ID:[call_id]CSeq:2BYEContact:sip:[field0]@[local_ip]:[local_port]Max-Forwards:70Subject:PerformanceTestContent-Length:0]]></send><recvresponse="200"crlf="true"></recv><pausemilliseconds="15000"/><!--definitionoftheresponsetimerepartitiontable(unitisms)

--><ResponseTimeRepartitionvalue="10,20,30,40,50,100,150,200

"/><!--definitionofthecalllengthrepartitiontable(unitisms)

--><CallLengthRepartitionvalue="10,50,100,500,1000,5000,10000

"/></scenario>SEQUENTIAL8001;555;[authenticationusername=8001password=8001]8002;555;[authenticationusername=8002password=8002]8003;555;[authenticationusername=8003password=8003]8004;555;[authenticationusername=8004password=8004]8005;555;[authenticationusername=8005password=8005]8006;555;[authenticationusername=8006password=8006]8007;555;[authenticationusername=8007password=8007]8008;555;[authenticationusername=8008password=8008]8009;555;[authenticationusername=8009password=8009]8010;555;[authenticationusername=8010password=8010]8011;555;[authenticationusername=8011password=8011]8012;555;[authenticationusername=8012password=8012]8013;555;[authenticationusername=8013password=8013]8014;555;[authenticationusername=8014password=8014]8015;555;[authenticationusername=8015password=8015]8016;555;[authenticationusername=8016password=8016]8017;555;[authenticationusername=8017password=8017]8018;555;[authenticationusername=8018password=8018]8019;555;[authenticationusername=8019password=8019]8020;555;[authenticationusername=8020password

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论