-
Notifications
You must be signed in to change notification settings - Fork 40
SIP User Documentation Chapter 6
PREVIOUS CHAPTER | TOC | NEXT CHAPTER
Add SIPCommandSampler elements to your Test Plan as you add other sampler elements in Apache JMeter. After defining the sampler name, SIP node name, and command direction, specify a request method or response code and the SIP message parameters that you want to send or check (depending on command direction).
To add a SIPCommandSampler, right-click a Thread Group and select Add → Sampler → SIPCommandSampler.
Depending on the fact whether a command is sent or received by the SIP node, SIPCommandSampler behavior is different:
- For a command to be sent, each GUI defined header is added in the SIP message and sent along with the GUI defined body part.
- For a command to be received, the HPE SIMULAP SIP Plugin checks that this command is received. Besides, for the SIP body part and for each SIP message header filled in the GUI, a comparison is done to check if what is received in the message is the same as what is filled in the GUI.
See Samplers, Listeners, and Assertions page.
SIPCommandSampler is a samplers that can be added to Thread Groups in Apache JMeter. Sampler results can be displayed through Apache JMeter native elements, for example, through Listener elements.
See Timers page.
Timers, like Constant Timer, are native JMeter elements that are used to delay the time when a specific sampler is processed. Timers are processed before the sampler they are added to.
See Dialog management and transaction identification page.
This plug-in allows you to handle dialog IDs and transaction IDs locally in a logical manner. Logical IDs are mapped to the real IDs that are created by the stack.
Start Apache JMeter in GUI mode, then add and configure a SIP node element in your Test Plan.
- Add a SIPCommandSampler element to a Thread Group in your Test Plan.
- In the _Nam_e field, add the label that you want to appear in the Test Plan tree structure and in the result tree, for example,
Node1 sends Invite
. - In the Sip Node Name field, specify the reference name of the SIP node that is responsible for sending the request. If you are unsure, check the Node name parameter of the appropriate SIP node config element.
- Select
Send
. - If you are sending an
INVITE
, and you want to reuse the same dialog for another call later in the scenario, selectResetCall
.
Use this option, for example, if you want to simulate an error case, where:
- In the first
INVITE
, theTo
header is not correct and the message is sent to a wrong destination. - In the second
INVITE
, the appropriate destination is specified.
- Select
Request
. - Select a SIP_ method from the first drop-down menu, for example,
INVITE
.
NOTE: The drop-down list contains the SIP methods defined in the SIP specifications. You cannot specify other SIP methods than what is included in the list.
The following SIP methods are related to a new dialog:
INVITE
REGISTER
NOTIFY
SUBSCRIBE
REFER
PUBLISH
-
Select a logical dialog ID from the second drop-down menu, for example,
Dial1
.
The local logical dialog ID is mapped to the real dialog identifiers that are sent through the network. Use the same logical dialog ID throughout the SIP dialog while managing outgoing and incoming messages. -
Select a logical transaction ID from the third drop-down menu, for example,
trans1
.
The logical transaction ID is mapped to the branch parameter value created by the SIP stack when sending the message. Use this logical transaction ID when checking the reception of the response to this specific request later in the dialog. -
Fill the SIP message headers for the request. a) Select a header from the drop-down list, and click Add. The drop-down list contains the header field-names defined in the SIP specifications. If nothing is selected from the drop-down list, when you click Add, an empty line is added to the list of headers, and you must double-click the Header name field to specify the header name. For example, Request-URI must be added with this method.
NOTE: You can add multiple headers.
b) Double-click the Header value field for the headers that you do not want to leave empty, and specify a value for each of them. c) Use the Up and Down buttons to change the location of a selected header. The following headers are mandatory to fill for new dialogs:
Request-URI
From
To
There are no mandatory headers for the following SIP Methods:
Re INVITE
PRACK
ACK
INFO
UPDATE
OPTIONS
MESSAGE
CANCEL
BYE
If the request belongs to an existing dialog, parameters are reused from the initial INVITE
message based on the dialog ID and transaction ID selected in the preceding steps.
11. Scroll down to the Sip Body part field, and specify media information in SDP or another appropriate protocol format.
12. Start the scenario.
See Adding and configuring SIP nodes page.
Add the SIP node element to your Test Plan as you add other Config Elements in JMeter. Define the SIP Node name, SIP Node context parameters, and SIP Stack endpoint parameters.
Start Apache JMeter in GUI mode, then add and configure a SIP node element in your Test Plan.
- Add a SIPCommandSampler element to a Thread Group in your Test Plan.
- In the Name field, add the label that you want to appear in the [Test Plan](AJTP] tree structure and in the result tree, for example,
Node1 receives 100 Trying
. - In the Sip Node Name field, specify the reference name of the SIP node that is expected to receive the response.
If you are unsure, check the Node name parameter of the appropriate SIP node config element. 4. Select Receive. 5. If the reception of this response is optional, select Optional.
For example, you can use this option if you expect a 100
or a 180
provisional response.
The reception timeout field allows you to specify a reception timeout in milliseconds for this specific sampler. If the sampler cannot find the message immediately in the reception queue, it waits until this timeout period before reporting that the message was not received.
IMPORTANT: This parameter overwrites the global SIP message reception timeout parameter of the [SIP node](SSNE] that is associated with the sampler. For example, you can specify a shorter reception timeout for
100
and180
provisional responses.
-
Select Response.
-
Specify a SIP Status-Code in the Which response code field.
Do not specify the Reason-Phrase in this field. You can indicate the Reason-Phrase in the Name field to give a clear overview of the purpose of the sampler within the Test Plan. -
Select a logical dialog ID from the second drop-down menu, for example,
Dial1
.
The local logical dialog ID is mapped to the real dialog identifiers that are sent through the network. Use the same logical dialog ID throughout the SIP dialog while managing outgoing and incoming messages. -
Select a logical transaction ID from the third drop-down menu, for example,
trans1
.
The logical transaction ID is mapped to the branch parameter value created by the SIP stack when sending the message.
Use the same logical transaction ID that was selected for the corresponding SIPCommandSampler request sent earlier in the dialog. -
Fill the SIP message headers that you want to check in the incoming response. a) Select a header from the drop-down list, and click Add.
The drop-down list contains the header field-names defined in the SIP specifications. If nothing is selected from the drop-down list, when you click Add, an empty line is added to the list of headers, and you must double-click the Header name field to specify the header name. For example, Request-URI must be added with this method.
NOTE: You can add multiple headers.
b) Double-click the Header value field for the headers that you do not want to leave empty, and specify a value for each of them. c) Use the Up and Down buttons to change the location of a selected header.
Check the Header name parameter of the corresponding SIP node config element, and make sure you fill the appropriate one from the following headers:
To
From
Call-ID
NOTE__: No other headers are mandatory to fill when checking the reception of SIP responses. If no other headers are filled, parameters are reused from the initial
INVITE
message based on the dialog ID and transaction ID selected in the preceding steps.
- If you want to validate the body part of the received SIP message, scroll down and specify media information in SDP or another appropriate protocol format in the Sip Body part field.
NOTE: The SIPCommandSampler element cannot be used to validate only certain parts of the body of a received SIP message. The sampler compares what is filled in the GUI with the complete body part of the received message, and if they are not identical, the sampler reports an error.
- Start the scenario.
See Adding and configuring SIP nodes page.
Add the SIP node element to your Test Plan as you add other Config Elements in Apache JMeter. Define the SIP Node name, SIP Node context parameters, and SIP Stack endpoint parameters.
Start Apache JMeter in GUI mode, then add and configure a SIP node element in your Test Plan.
- Add a SIPCommandSampler element to a Thread Group in your Test Plan.
- In the Name field, add the label that you want to appear in the Test Plan tree structure and in the result tree, for example,
Node1 receives Invite
. - In the Sip Node Name field, specify the reference name of the SIP node that is expected to receive the request.
If you are unsure, check the Node name parameter of the appropriate SIP node config element.
4. Select Receive
.
5. If the reception of this request is optional, select Optional
.
The reception timeout field allows you to specify a reception timeout in milliseconds for this specific sampler. If the sampler cannot find the message immediately in the reception queue, it waits until this timeout period before reporting that the message was not received.
NOTE: This parameter overwrites the global SIP message reception timeout parameter of the SIP node that is associated with the sampler.
- Select Request.
- Select a SIP method from the first drop-down menu, for example,
INVITE
.
NOTE: The drop-down list contains the SIP methods defined in the SIP specifications. You cannot specify other SIP methods than what is included in the list.
- Select a logical dialog ID from the second drop-down menu, for example,
Dial1
.
The local logical dialog ID is mapped to the real dialog identifiers that are sent through the network. Use the same logical dialog ID throughout the SIP dialog while managing outgoing and incoming messages.
9. Select a logical transaction ID from the third drop-down menu, for example, trans1
.
The logical transaction ID is mapped to the branch parameter value created by the SIP stack when sending the message.
Use the same logical transaction ID when sending a response to this specific request later in the dialog. 10. Fill the SIP message headers that you want to check in the incoming request.
- Select a header from the drop-down list, and click Add.
The drop-down list contains the header field-names defined in the SIP specifications. If nothing is selected from the drop-down list, when you click Add, an empty line is added to the list of headers, and you must double-click the Header name field to specify the header name. For example, Request-URI must be added with this method.
NOTE: You can add multiple headers.
- Double-click the Header value field for the headers that you do not want to leave empty, and specify a value for each of them.
- Use the Up and Down buttons to change the location of a selected header.
Check the Header name parameter of the corresponding SIP node config element, and make sure you fill the appropriate one from the following headers:
* To
* From
* Call-ID
NOTE: No other headers are mandatory to fill when checking the reception of SIP request. If the expected request belongs to an existing dialog, parameters are reused from the initial INVITE message based on the dialog ID and transaction ID selected in the preceding steps.
- If you want to validate the body part of the received SIP message, scroll down and specify media information in SDP or another appropriate protocol format in the Sip Body part field.
NOTE: The SIPCommandSampler element cannot be used to validate only certain parts of the body of a received SIP message. The sampler compares what is filled in the GUI with the complete body part of the received message, and if they are not identical, the sampler reports an error.
- Start the scenario.
See Adding and configuring SIP nodes page.
Add the SIP node element to your Test Plan as you add other Config Elements in Apache JMeter. Define the SIP Node name, SIP Node context parameters, and SIP Stack endpoint parameters.
Start Apache JMeter in GUI mode, then add and configure a SIP node element in your Test Plan.
NOTE: You can send an answer only if you received a request before.
- Add a SIPCommandSampler element to a Thread Group in your Test Plan.
- In the Name field, add the label that you want to appear in the Test Plan tree structure and in the result tree, for example,
Node1 sends 100 Trying
. - In the Sip Node Name field, specify the reference name of the SIP node that is responsible for sending the response.
If you are unsure, check the Node name parameter of the appropriate SIP node config element.
4. Select Send
.
5. Select Response
.
6. Specify a SIP Status-Code in the Which response code field.
Do not specify the Reason-Phrase in this field. You can indicate the _Reason-Phrase _in the Name field to give a clear overview of the purpose of the sampler within the Test Plan.
-
Select a logical dialog ID from the second drop-down menu, for example,
Dial1
.
The local logical dialog ID is mapped to the real dialog identifiers that are sent through the network. Use the same logical dialog ID throughout the SIP dialog while managing outgoing and incoming messages. -
Select a logical transaction ID from the third drop-down menu, for example,
trans1
.
The logical transaction ID is mapped to the branch parameter value created by the SIP stack when sending the message.
Use the same logical transaction ID that was selected for the corresponding request received earlier in the dialog. -
Fill the SIP message headers for the request.
- Select a header from the drop-down list, and click Add.
The drop-down list contains the header field-names defined in the SIP specifications. If nothing is selected from the drop-down list, when you click Add, an empty line is added to the list of headers, and you must double-click the Header name field to specify the header name. For example, Request-URI must be added with this method.
NOTE: You can add multiple headers.
- Double-click the Header value field for the headers that you do not want to leave empty, and specify a value for each of them.
- Use the Up and Down buttons to change the location of a selected header.
NOTE: No headers are mandatory in SIP responses. However, if the local port is not the default SIP
5060
, you must specify a destination for theACK
in the Contact header. If no headers are filled, parameters are reused from the initialINVITE
message based on the dialog ID and transaction ID selected in the preceding steps.
- Scroll down to the SIP Body part field, and specify media information in SDP or another appropriate protocol format.
- Start the scenario.
See Adding and configuring SIP nodes page.
Add the SIP node element to your Test Plan as you add other Config Elements in Apache JMeter. Define the SIP Node name, SIP Node context parameters, and SIP Stack endpoint parameters.
© Copyright 2019-2020 Hewlett Packard Enterprise Development LP
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations under the License.
- Chapter 1: Introduction
- Chapter 2: SIP JMeter elements
- Chapter 3: Interaction between SIP nodes, samplers and peer nodes
- Chapter 4: Dialog management and transaction identification
- Chapter 5: Adding and configuring SIP nodes
- Chapter 6: Adding and configuring SIP samplers
- Chapter 7: Result structure produced by SIP specific samplers
- Appendix A: Logs and Traces
- Appendix B: Statistics