Commands for Testing STIR Deployments

You can configure the SBC to generate and execute test scenarios that you use with a specific sti-server on demand. These tests verify STIR/SHAKEN functionality between the SBC and that server. These scenarios are broadly flexible, allowing you to specify the SIP message, the message direction, as well as the HTTP and JSON content before executing the test.

This feature utilizes the test-stir branch from the session-router. This branch includes all the parameters needed to configure the test. This branch also includes the command to execute the test, and parameters to specify conditions surrounding the test, including whether to execute the test in debug mode. The test-stir branch is a single-instance element.

The SBC does not have prepacked tests. You must create them from scratch, limited to the parameters available in the test-stir branch. To configure and run a test, you:

  1. Set the sti-server with which the SBC interacts;
  2. Specify the direction of the STIR message as either to-AS, to-VS, from-AS or from-VS;
  3. Create the test content as text using the message syntax of the applicable content, including SIP, HTTP and JSON;
  4. Apply any pre-configured objects as test context; the http-client is required;
  5. Configure any test conditions, such as display-message;
  6. Execute your test;
  7. Evaluate your results.

Important considerations when creating and using test-stir include:

  • When you set the load-json-content, load-http-content and load-sip-message parameters, you typically copy text and paste it after the parameter name. When done pasting, press the Ctrl-D sequence to inform the system you are done.
  • The SBC does not validate or verify strings that you paste into the HTTP content or JSON body parameters.
  • When you set the http-mapping-rule, tls-profile and http-client parameters, you use the value of the name parameter of those pre-configured objects. These settings take precedence over any global or server-specific settings.
  • The SBC does not include statistics generated by test-stir is its statistics counters.
  • The SBC does not include content generated by test-stir in CDRs.
  • Requests generated by test-stir do not trigger call rejection functionality.
  • When you enable the display-message parameter, the SBC displays the loaded message, HTTP, and JSON content.
  • When you enable the debugging-enabled parameter, the system sets logging verbosity to debug during the test, and resets the logging verbosity to its original setting after the test is complete.
  • When you enable the debugging-enabled parameter, the system captures curl and sipd events, such as http-mapping-rule events, in the corresponding log files, which include log.sipd and log.tCurld.
  • When you enable the debugging-enabled parameter, http-mode. which is the HTTP version used, is visible.

Test Direction

When you set the direction parameter, you establish whether your test sends information to an AS, to a VS or to the SBC itself. This setting defines the architecture of the test, which parameters are required, and the type of content for the test results:

  • When directing test content towards the sti-server, the SBC,
  • When directing test content towards the SBC, the system does not contact the sti-server at all. These tests display the resultant INVITE from the SBC, based on an AS or VS input.

When you set direction to to-AS:

  • Based on SIP Message from load-sip-message
  • Request generated to the configured sti-server
  • Result: The SBC makes an HTTP post request to the loaded sti-server. The SBC displays the resultant SIP Message with Identity header, or with Reason header based on the test configuration.

When you set direction to to-VS:

  • Based on SIP Message from load-sip-message
  • Request generated to the configured sti-server
  • Result: SIP Message post VS (with verstat and Reason header if needed)
  • Result: The SBC makes an HTTP post request to the loaded sti-server. The SBC displays the resultant SIP Message with Identity header, or with Reason header based on the test configuration.

When you set direction to from-AS:

  • Based on http (load-http-content) or json body (load-json-content) only
  • There is no CURL activity performed for these tests. The system only applies the test logic to generate output
  • Result: The SBC does not make an HTTP post request to the configured sti-server. The SBC displays the resultant SIP Message with Identity header, or with Reason header based on the loaded configuration to test.

When you set direction to from-VS:

  • Based on http (load-http-content) or json body (load-json-content) only
  • There is no CURL activity performed for these tests. The system only applies the test logic to generate output
  • Result: SIP Message post VS (with verstat and Reason header if needed)
  • Result: The SBC does not make an HTTP post request to the configured sti-server. The SBC displays the resultant SIP Message with Identity header, or with Reason header based on the loaded configuration to test.

Test Results Detail

After configuration, you enter the execute command, which executes your test. On successful execution of the test-stir command, the SBC displays:

  1. The Request Sent
  2. The <Post Request>
  3. The <Headers>
  4. The <JSON Body>

Consider the following example output, which the SBC has generated for a test.

POST /StirShakenWeb/resources/v1/verification HTTP/1.1
Host: 10.196.176.132
X-InstanceID: 00000000-0000-0000-0000-000000000f00
Content-Type: application/json
X-RequestID: a6bfa948-d529-42e1-7d68-3513da6f90ab
Accept: application/json
Content-Length: 695

{"verificationRequest":

{"identity":"eyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cDovL2xvY2
FsaG9zdDo5MDAxL1N0aXJTaGFrZW5fU1RJX0NSV2ViL3Jlc291cmNlcy92MS9jZXJ0cy9jZXJ0XzIwMjAwNDA2MTQzNzA1X0VTM
jU2LnBlbSJ9.eyJhdHRlc3QiOiJDIiwiZGVzdCI6eyJ0biI6IjE4MDAzOTIyOTk5In0sImlhdCI6MTU5NTYxMDY4Niwib3JpZy
I6eyJ0biI6IjE2MTc4Njc1MzA5In0sIm9yaWdpZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMGYwMCJ9.
7u2KnSXyyycXlol3MCVcRGiIgVHZjUX1b8dVTdPOuNZpOrL-7xDy2vs82T4tkafQNpXLEKk7MSrwGCSQ0Ywnug;
info=<<http:\/\/localhost:9001\/StirShaken_STI_CRWeb\/resources\/v1\/certs\/cert_20200406143705_ES256.pem>;
ppt=shaken>","time":1695999486,"to":{"tn":["19000100201"]},"from":{"tn":"1234567891"}}} 

The response received (if any) includes:

  1. <HTTP 200/OK (or any other status line>
  2. <Headers>
  3. <JSON Body>

For example:

HTTP/1.1 200 OK
Server: Oracle Stir Server/0.2 Python/2.7
content-type: application/json
content-length: 70

{"verificationResponse": {"verstatValue": "TN-Validation-Passed"}}

The following displays test results that generated an INVITE with verstat or Identity headers.

INVITE sip:1900010020@192.168.84.188:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.84.151:5060;branch=z9hG4bK-23178-7153-0
From: sipp <sip:1234567891@192.168.84.151:5060>;tag=23178SIPpTag007153;verstat=TN-Validation-Passed
To: 12345 <sip:19000100201@192.168.84.188:5060>
Call-ID: 7153-23178@192.168.84.151
CSeq: 1 INVITE
Contact: sip:sipp@192.168.84.151:5060
Identity: eyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cDovL2xvY2FsaG9zdDo5
MDAxL1N0aXJTaGFrZW5fU1RJX0NSV2ViL3Jlc291cmNlcy92MS9jZXJ0cy9jZXJ0XzIwMjAwNDA2MTQzNzA1X0VTMjU2LnBlbSJ9.eyJhd
HRlc3QiOiJDIiwiZGVzdCI6eyJ0biI6IjE4MDAzOTIyOTk5In0sImlhdCI6MTU5NTYxMDY4Niwib3JpZyI6eyJ0biI6IjE2MTc4Njc1
MzA5In0sIm9yaWdpZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMGYwMCJ9.7u2KnSXyyycXlol3MCVcRGiIgVHZj
UX1b8dVTdPOuNZpOrL-7xDy2vs82T4tkafQNpXLEKk7MSrwGCSQ0Ywnug;info=<<http://localhost:9001/StirShaken_STI_CR
Web/resources/v1/certs/cert_20200406143705_ES256.pem>;ppt=shaken>
Max-Forwards: 70
Subject: Performance Test
Content-Type: application/sdp
Content-Length: 139
v=0
o=user1 53655765 2353687637 IN IP4 192.168.84.151
s=-
c=IN IP4 192.168.84.151
t=0 0
m=audio 6000 RTP/AVP 0
a=rtpmap:0 PCMU/8000