📄 scenario.cpp
字号:
"<!-- Free Software Foundation, Inc., -->\n""<!-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -->\n""<!-- -->\n""<!-- 3PCC - A side emulator -->\n""<!-- -->\n""<!-- A Controller B -->\n""<!-- |(1) INVITE no SDP | | -->\n""<!-- |<==================| | -->\n""<!-- |(2) 200 offer1 | | -->\n""<!-- |==================>| | -->\n""<!-- | |(3) INVITE offer1 | -->\n""<!-- | |==================>| -->\n""<!-- | |(4) 200 OK answer1 | -->\n""<!-- | |<==================| -->\n""<!-- | |(5) ACK | -->\n""<!-- | |==================>| -->\n""<!-- |(6) ACK answer1 | | -->\n""<!-- |<==================| | -->\n""<!-- |(7) RTP | | -->\n""<!-- |.......................................| -->\n""<!-- -->\n""\n""\n""<scenario name=\"3PCC A side\">\n"" <recv request=\"INVITE\" crlf=\"true\">\n"" </recv>\n""\n"" <send>\n"" <![CDATA[\n""\n"" SIP/2.0 200 OK\n"" [last_Via:]\n"" [last_From:]\n"" [last_To:];tag=[call_number]\n"" [last_Call-ID:]\n"" [last_CSeq:]\n"" Contact: <sip:[local_ip]:[local_port];transport=[transport]>\n"" Content-Type: application/sdp\n"" Content-Length: [len]\n""\n"" v=0\n"" o=user1 53655765 2353687637 IN IP4 127.0.0.1\n"" s=-\n"" t=0 0\n"" c=IN IP4 [media_ip]\n"" m=audio [media_port] RTP/AVP 0\n"" a=rtpmap:0 PCMU/8000\n""\n"" ]]>\n"" </send>\n""\n"" <recv request=\"ACK\" rtd=\"true\" crlf=\"true\"> </recv>\n""\n"" <!-- RTP flow starts from here! -->\n""\n"" <recv request=\"BYE\" crlf=\"true\"> </recv>\n""\n"" <send>\n"" <![CDATA[\n""\n"" SIP/2.0 200 OK\n"" [last_Via:]\n"" [last_From:]\n"" [last_To:];tag=[call_number]\n"" [last_Call-ID:]\n"" [last_CSeq:]\n"" Contact: <sip:[local_ip]:[local_port];transport=[transport]>\n"" Content-Length: 0\n""\n"" ]]>\n"" </send>\n""\n"" <!-- Keep the call open for a while in case the 200 is lost to be -->\n"" <!-- able to retransmit it if we receive the BYE again. -->\n"" <pause milliseconds=\"2000\"/>\n""\n""</scenario>\n""\n",/************* Default_scenario[6] ***************/(char*) "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n""<!DOCTYPE scenario SYSTEM \"sipp.dtd\">\n""\n""<!-- This program is free software; you can redistribute it and/or -->\n""<!-- modify it under the terms of the GNU General Public License as -->\n""<!-- published by the Free Software Foundation; either version 2 of the -->\n""<!-- License, or (at your option) any later version. -->\n""<!-- -->\n""<!-- This program is distributed in the hope that it will be useful, -->\n""<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->\n""<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->\n""<!-- GNU General Public License for more details. -->\n""<!-- -->\n""<!-- You should have received a copy of the GNU General Public License -->\n""<!-- along with this program; if not, write to the -->\n""<!-- Free Software Foundation, Inc., -->\n""<!-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -->\n""<!-- -->\n""<!-- 3PCC - B side emulator -->\n""<!-- -->\n""<!-- A Controller B -->\n""<!-- |(1) INVITE no SDP | | -->\n""<!-- |<==================| | -->\n""<!-- |(2) 200 offer1 | | -->\n""<!-- |==================>| | -->\n""<!-- | |(3) INVITE offer1 | -->\n""<!-- | |==================>| -->\n""<!-- | |(4) 200 OK answer1 | -->\n""<!-- | |<==================| -->\n""<!-- | |(5) ACK | -->\n""<!-- | |==================>| -->\n""<!-- |(6) ACK answer1 | | -->\n""<!-- |<==================| | -->\n""<!-- |(7) RTP | | -->\n""<!-- |.......................................| -->\n""<!-- -->\n""\n""\n""\n""<scenario name=\"3PCC B side\">\n"" <recv request=\"INVITE\" crlf=\"true\"> </recv>\n""\n"" <send>\n"" <![CDATA[\n""\n"" SIP/2.0 200 OK\n"" [last_Via:]\n"" [last_From:]\n"" [last_To:];tag=[call_number]\n"" [last_Call-ID:]\n"" [last_CSeq:]\n"" Contact: <sip:[local_ip]:[local_port];transport=[transport]>\n"" Content-Type: application/sdp\n"" Content-Length: [len]\n""\n"" v=0\n"" o=user1 53655765 2353687637 IN IP4 127.0.0.1\n"" s=-\n"" t=0 0\n"" c=IN IP4 [media_ip]\n"" m=audio [media_port] RTP/AVP 0\n"" a=rtpmap:0 PCMU/8000\n""\n"" ]]>\n"" </send>\n""\n"" <recv request=\"ACK\" rtd=\"true\" crlf=\"true\"> </recv>\n""\n"" <!-- RTP flow starts from here! -->\n""\n"" <recv request=\"BYE\"> </recv>\n""\n"" <send>\n"" <![CDATA[\n""\n"" SIP/2.0 200 OK\n"" [last_Via:]\n"" [last_From:]\n"" [last_To:];tag=[call_number]\n"" [last_Call-ID:]\n"" [last_CSeq:]\n"" Contact: <sip:[local_ip]:[local_port];transport=[transport]>\n"" Content-Length: 0\n""\n"" ]]>\n"" </send>\n""\n"" <!-- Keep the call open for a while in case the 200 is lost to be -->\n"" <!-- able to retransmit it if we receive the BYE again. -->\n"" <pause milliseconds=\"2000\"/>\n""\n""</scenario>\n",/************* Default_scenario[7] ***************/(char*)"<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n""<!DOCTYPE scenario SYSTEM \"sipp.dtd\">\n""\n""<!-- This program is free software; you can redistribute it and/or -->\n""<!-- modify it under the terms of the GNU General Public License as -->\n""<!-- published by the Free Software Foundation; either version 2 of the -->\n""<!-- License, or (at your option) any later version. -->\n""<!-- -->\n""<!-- This program is distributed in the hope that it will be useful, -->\n""<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->\n""<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->\n""<!-- GNU General Public License for more details. -->\n""<!-- -->\n""<!-- You should have received a copy of the GNU General Public License -->\n""<!-- along with this program; if not, write to the -->\n""<!-- Free Software Foundation, Inc., -->\n""<!-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -->\n""<!-- -->\n""<!-- Sipp default 'branchc' scenario. -->\n""<!-- -->\n""\n""<scenario name=\"branch_client\">\n"" <send retrans=\"500\">\n"" <![CDATA[\n""\n"" REGISTER sip:CA.cym.com SIP/2.0\n"" Via: SIP/2.0/[transport] [local_ip]:[local_port]\n"" From: ua1 <sip:ua1@nnl.cym:[local_port]>;tag=[call_number]\n"" To: ua1 <sip:ua1@nnl.cym:[local_port]>\n"" Call-ID: [call_id]\n"" CSeq: 1 REGISTER\n"" Contact: sip:ua1@[local_ip]:[local_port]\n"" Content-Length: 0\n"" Expires: 300\n""\n"" ]]>\n"" </send>\n""\n"" <!-- simple case - just jump over a line -->\n"" <recv response=\"200\" rtd=\"true\" next=\"5\">\n"" </recv>\n""\n"" <recv response=\"200\">\n"" </recv>\n""\n"" <label id=\"5\"/>\n""\n"" <send retrans=\"500\">\n"" <![CDATA[\n""\n"" INVITE sip:ua2@CA.cym.com SIP/2.0\n"" Via: SIP/2.0/[transport] [local_ip]:[local_port]\n"" From: ua[call_number] <sip:ua1@nnl.cym:[local_port]>;tag=[call_number]\n"" To: ua2 <sip:ua2@nnl.cym:[remote_port]>\n"" Call-ID: [call_id]\n"" CSeq: 1 INVITE\n"" Contact: sip:ua1@[local_ip]:[local_port]\n"" Max-Forwards: 70\n"" Subject: Performance Test\n"" Content-Type: application/sdp\n"" Content-Length: [len]\n""\n"" v=0\n"" o=user1 53655765 2353687637 IN IP4 127.0.0.1\n"" s=-\n"" t=0 0\n"" c=IN IP4 [media_ip]\n"" m=audio [media_port] RTP/AVP 0\n"" a=rtpmap:0 PCMU/8000\n""\n"" ]]>\n"" </send>\n""\n"" <recv response=\"100\" optional=\"true\">\n"" </recv>\n""\n"" <recv response=\"180\" optional=\"true\">\n"" </recv>\n""\n"" <!-- Do something different on an optional receive -->\n"" <recv response=\"403\" optional=\"true\" next=\"1\">\n"" </recv>\n""\n"" <recv response=\"200\">\n"" <action>\n"" <ereg regexp=\"ua25\"\n"" search_in=\"hdr\"\n"" header=\"From: \"\n"" assign_to=\"8\"/>\n"" </action>\n"" </recv>\n""\n"" <!-- set variable 8 above on 25th call, send the ACK but skip the pause for it -->\n"" <send next=\"1\" test=\"8\">\n"" <![CDATA[\n""\n"" ACK sip:ua2@CA.cym.com SIP/2.0\n"" Via: SIP/2.0/[transport] [local_ip]:[local_port]\n"" From: ua1 <sip:ua1@nnl.cym:[local_port]>;tag=[call_number]\n"" To: ua2 <sip:ua2@nnl.cym:[remote_port]>[peer_tag_param]\n"" Call-ID: [call_id]\n"" CSeq: 1 ACK\n"" Contact: sip:ua1@[local_ip]:[local_port]\n"" Max-Forwards: 70\n"" Subject: Performance Test\n"" Content-Length: 0\n""\n"" ]]>\n"" </send>\n""\n"" <pause milliseconds=\"5000\"/>\n""\n"" <label id=\"1\"/>\n""\n"" <send retrans=\"500\">\n"" <![CDATA[\n""\n"" BYE sip:ua2@CA.cym.com SIP/2.0\n"" Via: SIP/2.0/[transport] [local_ip]:[local_port]\n"" From: ua1 <sip:ua1@nnl.cym:[local_port]>;tag=[call_number]\n"" To: ua2 <sip:ua2@nnl.cym:[remote_port]>[peer_tag_param]\n"" Call-ID: [call_id]\n"" CSeq: 2 BYE\n"" Contact: sip:ua1@[local_ip]:[local_port]\n"" Max-Forwards: 70\n"" Subject: Performance Test\n"" Content-Length: 0\n""\n"" ]]>\n"" </send>\n""\n"" <recv response=\"200\" crlf=\"true\">\n"" </recv>\n""\n"" <pause milliseconds=\"4000\"/>\n""\n"" <!-- definition of the response time repartition table (unit is ms) -->\n"" <ResponseTimeRepartition value=\"10, 20, 30, 40, 50, 100, 150, 200\"/>\n""\n"" <!-- definition of the call length repartition table (unit is ms) -->\n"" <CallLengthRepartition value=\"10, 50, 100, 500, 1000, 5000, 10000\"/>\n""\n""</scenario>\n""\n",/************* Default_scenario[8] ***************/(char*)"<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n""<!DOCTYPE scenario SYSTEM \"sipp.dtd\">\n""\n""<!-- This program is free software; you can redistribute it and/or -->\n""<!-- modify it under the terms of the GNU General Public License as -->\n""<!-- published by the Free Software Foundation; either version 2 of the -->\n""<!-- License, or (at your option) any later version. -->\n""<!-- -->\n""<!-- This program is distributed in the hope that it will be useful, -->\n""<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->\n""<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->\n""<!-- GNU General Public License for more details. -->\n""<!-- -->\n""<!-- You should have received a copy of the GNU General Public License -->\n""<!-- along with this program; if not, write to the -->\n""<!-- Free Software Foundation, Inc., -->\n""<!-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -->\n""<!-- -->\n""<!-- Sipp default 'branchs' scenario. -->\n""<!-- -->\n""\n""<scenario name=\"branch_server\">\n"" <recv request=\"REGISTER\">\n"" </recv>\n""\n"" <send>\n"" <![
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -