📄 scenario.cpp
字号:
" <!-- : hdr (try to match against a specific SIP header -->\n"" <!-- (passed in the header tag) -->\n"" <!-- OPTIONAL - default value : msg -->\n"" <!-- header : Header to try to match against. -->\n"" <!-- Only used when the search_in tag is set to hdr -->\n"" <!-- MANDATORY IF search_in is equal to hdr -->\n"" <!-- check_it : if set to true, the call is marked as failed if -->\n"" <!-- the regexp doesn't match. -->\n"" <!-- OPTIONAL - default value : false -->\n"" <!-- assign_to : contain the variable id (integer) or a list of -->\n"" <!-- variable id which will be used to store the -->\n"" <!-- result of the matching process between the regexp -->\n"" <!-- and the message. This variable can be re-used at -->\n"" <!-- a later time in the scenario using '[$n]' syntax -->\n"" <!-- where n is the variable id. -->\n"" <!-- MANDATORY -->\n"" <action>\n"" <ereg regexp=\"[0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[:][0-9]{1,5}\" \n"" search_in=\"msg\" \n"" check_it=\"true\" \n"" assign_to=\"1\"/>\n"" <ereg regexp=\".*\" \n"" search_in=\"hdr\" \n"" header=\"Contact:\" \n"" check_it=\"true\" \n"" assign_to=\"6\"/>\n"" </action>\n"" </recv>\n""\n"" <send>\n"" <![CDATA[\n"" ACK sip:[service]@[remote_ip]:[remote_port] SIP/2.0\n"" Via: SIP/2.0/[transport] [local_ip]:[local_port]\n"" From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]\n"" To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]\n"" Call-ID: [call_id]\n"" CSeq: 1 ACK\n"" retrievedIp: [$1]\n"" retrievedContact:[$6]\n"" Contact: sip:sipp@[local_ip]:[local_port]\n"" Max-Forwards: 70\n"" Subject: Performance Test\n"" Content-Length: 0\n"" ]]>\n"" </send>\n""\n"" <!-- This delay can be customized by the -d command-line option -->\n"" <!-- or by adding a 'milliseconds = \"value\"' option here. -->\n"" <pause milliseconds = \"1000\"/>\n""\n"" <!-- The 'crlf' option inserts a blank line in the statistics report. -->\n"" <send retrans=\"500\">\n"" <![CDATA[\n""\n"" BYE sip:[service]@[remote_ip]:[remote_port] SIP/2.0\n"" Via: SIP/2.0/[transport] [local_ip]:[local_port]\n"" From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]\n"" To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]\n"" Call-ID: [call_id]\n"" CSeq: 2 BYE\n"" Contact: sip:sipp@[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\" rtd=\"true\">\n"" </recv>\n""\n"" <!-- definition of the response time repartition table (unit is ms) -->\n"" <ResponseTimeRepartition value=\"1000, 1040, 1080, 1120, 1160, 1200\"/>\n""\n"" <!-- definition of the call length repartition table (unit is ms) -->\n"" <CallLengthRepartition value=\"1000, 1100, 1200, 1300, 1400\"/>\n""\n""</scenario>\n""\n",/************* Default_scenario[3] ***************/(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 - Controller - A side -->\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""<scenario name=\"3PCC Controller - A side\">\n"" <send retrans=\"500\">\n"" <![CDATA[\n""\n"" INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.0\n"" Via: SIP/2.0/[transport] [local_ip]:[local_port]\n"" From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]\n"" To: sut <sip:[service]@[remote_ip]:[remote_port]>\n"" Call-ID: [call_id]\n"" CSeq: 1 INVITE\n"" Contact: sip:sipp@[local_ip]:[local_port]\n"" Max-Forwards: 70\n"" Subject: Performance Test\n"" Content-Length: 0\n""\n"" ]]>\n"" </send>\n""\n"" <recv response=\"100\" optional=\"true\"> </recv>\n"" <recv response=\"180\" optional=\"true\"> </recv>\n"" <recv response=\"200\" crlf=\"true\" start_rtd=\"true\">\n"" <action>\n"" <ereg regexp=\"Content-Type:.*\" \n"" search_in=\"msg\" \n"" assign_to=\"1\"/> \n"" </action>\n"" </recv>\n""\n"" <sendCmd>\n"" <![CDATA[\n"" Call-ID: [call_id]\n"" [$1]\n""\n"" ]]>\n"" </sendCmd>\n"" \n"" <recvCmd>\n"" <action>\n"" <ereg regexp=\"Content-Type:.*\" \n"" search_in=\"msg\" \n"" assign_to=\"2\"/>\n"" </action>\n"" \n"" </recvCmd>\n"" \n"" <send rtd=\"true\">\n"" <![CDATA[\n""\n"" ACK sip:[service]@[remote_ip]:[remote_port] SIP/2.0\n"" Via: SIP/2.0/[transport] [local_ip]:[local_port]\n"" From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]\n"" To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]\n"" Call-ID: [call_id]\n"" CSeq: 1 ACK\n"" Contact: sip:sipp@[local_ip]:[local_port]\n"" Max-Forwards: 70\n"" Subject: Performance Test\n"" [$2]\n""\n"" ]]>\n"" </send>\n""\n"" <pause milliseconds=\"1000\"/>\n""\n"" <!-- The 'crlf' option inserts a blank line in the statistics report. -->\n"" <send retrans=\"500\">\n"" <![CDATA[\n""\n"" BYE sip:[service]@[remote_ip]:[remote_port] SIP/2.0\n"" Via: SIP/2.0/[transport] [local_ip]:[local_port]\n"" From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]\n"" To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]\n"" Call-ID: [call_id]\n"" CSeq: 2 BYE\n"" Contact: sip:sipp@[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\"> </recv>\n""\n""</scenario>\n""\n",/************* Default_scenario[4] ***************/(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 - Controller - B side -->\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 Controller - B side\">\n""\n""<recvCmd>\n"" <action>\n"" <ereg regexp=\"Content-Type:.*\" \n"" search_in=\"msg\" \n"" assign_to=\"1\"/>\n"" </action>\n""</recvCmd>\n""\n"" <send retrans=\"500\">\n"" <![CDATA[\n""\n"" INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.0\n"" Via: SIP/2.0/[transport] [local_ip]:[local_port]\n"" From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]\n"" To: sut <sip:[service]@[remote_ip]:[remote_port]>\n"" Call-ID: [call_id]\n"" CSeq: 1 INVITE\n"" Contact: sip:sipp@[local_ip]:[local_port]\n"" Max-Forwards: 70\n"" Subject: Performance Test\n"" [$1]\n""\n"" ]]>\n"" </send>\n""\n"" <recv response=\"100\" optional=\"true\"> </recv>\n"" <recv response=\"180\" optional=\"true\"> </recv>\n"" <recv response=\"200\" crlf=\"true\">\n"" <action>\n"" <ereg regexp=\"Content-Type:.*\" \n"" search_in=\"msg\" \n"" assign_to=\"2\"/>\n"" </action>\n"" </recv>\n"" \n"" \n"" <send start_rtd=\"true\">\n"" <![CDATA[\n""\n"" ACK sip:[service]@[remote_ip]:[remote_port] SIP/2.0\n"" Via: SIP/2.0/[transport] [local_ip]:[local_port]\n"" From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]\n"" To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]\n"" Call-ID: [call_id]\n"" CSeq: 1 ACK\n"" Contact: sip:sipp@[local_ip]:[local_port]\n"" Max-Forwards: 70\n"" Subject: Performance Test\n"" Content-Length: 0\n""\n"" ]]>\n"" </send>\n""\n"" <sendCmd>\n"" <![CDATA[\n"" Call-ID: [call_id]\n"" [$2]\n""\n"" ]]>\n"" </sendCmd>\n"" \n"" <pause milliseconds=\"1000\"/>\n""\n""\n"" <!-- The 'crlf' option inserts a blank line in the statistics report. -->\n"" <send retrans=\"500\" rtd=\"true\">\n"" <![CDATA[\n""\n"" BYE sip:[service]@[remote_ip]:[remote_port] SIP/2.0\n"" Via: SIP/2.0/[transport] [local_ip]:[local_port]\n"" From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]\n"" To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]\n"" Call-ID: [call_id]\n"" CSeq: 2 BYE\n"" Contact: sip:sipp@[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""\n""</scenario>\n""\n",/************* Default_scenario[5] ***************/(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"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -