Test RTP Messages
Introduction
The Test RTP Application (TestRtpApp) enables validation of the RTP streams associated with SIP calls. Each instance establishes an RTP endpoint. That endpoint captures all inbound audio packets to enable comparison against expectations. The endpoint can also be instructed to send telephone events to simulate interactions.
The following LuaApp agents from the n2sip
module use TestRtpApp.
TestRtpLuaAgent
(handles audio comparisons and telephone event injection)
The internal RTP messages are:
TEST-RTP-REGISTER
TEST-RTP-REGISTERED
TEST-RTP-DEREGISTER
TEST-RTP-CONNECT
TEST-RTP-START-TE
TEST-RTP-AMR-CMR
TEST-RTP-FETCH
TEST-RTP-FETCHED
TEST-RTP-REGISTER
The TestRtpLuaAgent
sends TEST-RTP-REGISTER
to the TestRtpApp
to request that a local RTP UDP
port number be assigned from the configured pool available for testing purposes.
- That UDP port will accept incoming RTP media packets.
- That UDP port can be requested to send RTP telephony-event packets.
- That UDP port can be requested to send RTP AMR Wideband setup packets.
At this time the port cannot send RTP media packets, that is a future testing feature.
The attributes of the TEST-RTP-REGISTER
message are:
Field | Type | Description |
---|---|---|
rtp
|
Object | Container for RTP parameters. |
timeout_secs
|
Positive Integer |
The requested inactivity timeout (in seconds) for this interaction. This is a guard timer which ensures that the RTP Test resources will eventually be freed up in the case of unexpected call loss. (Default = 300 ).
|
TEST-RTP-REGISTERED
The TEST-RTP-REGISTERED
message is sent by the TestRtpApp in response to a TEST-RTP-REGISTER
message
with the result of the registration.
The attributes of the TEST-RTP-REGISTERED
message are:
Field | Type | Description |
---|---|---|
success
|
0 / 1
|
[Required] Indicates whether the instance and associated RTP endpoint were created successfully or not. |
error
|
String |
Indicates why RTP endpoint creation failed.
(Only present if success is 0 .)
|
rtp
|
Object |
Container for RTP parameters. (Only present if success is 1 .)
|
local_port
|
1 - 65535
|
[Required] Local IPv4 UDP Port Number assigned from our configured port range to the created RTP endpoint. |
TEST-RTP-DEREGISTER
The TEST-RTP-DEREGISTER
message is sent to a TestRtpApp instance by another application to request that
the RTP endpoint be disconnected, and that the associated socket and other resources be made free for use by other
future streams.
The TEST-RTP-DEREGISTER
message does not have any attributes.
No response message is sent for this request.
TEST-RTP-CONNECT
The TEST-RTP-CONNECT
message is sent to a TestRtpApp instance by another application to
request that the local RTP endpoint connect to a remote RTP endpoint.
Note that if the local RTP endpoint is currently connected, the existing connection will be disconnected.
The attributes of the TEST-RTP-CONNECT
message are:
Field | Type | Description |
---|---|---|
rtp
|
Object | [Required] Container for RTP attributes. |
remote_host
|
String | [Required] Remote host name or IP address to which outbound RTP packets will be sent. |
remote_port
|
1 - 65535
|
[Required] Remote IPv4 UDP Port Number to which outbound RTP packets will be sent. |
clock_rate
|
Positive Integer |
An optional indication of the clock rate of the RTP stream from the remote endpoint. This enables telephone events to be sent with correct durations. (Default = 8000). |
TEST-RTP-START-TE
The TEST-RTP-START-TE
message is sent to a TestRtpApp instance by another application to
request that a telephone event be sent to the connected remote RTP endpoint.
The attributes of the TEST-RTP-START-TE
message are:
Field | Type | Description |
---|---|---|
rtp
|
Object | [Required] Container for RTP attributes. |
payload_type
|
0 - 127
|
[Required] RTP Payload Type to use for the outbound telephone event packets. |
event_code
|
0 - 255
|
[Required] Telephone Event code as defined in RFC 4733 Section 3.2. |
duration
|
10 - 5000
|
[Required] Duration of the telephone event in milliseconds. |
volume
|
0 - 63
|
Volume of the telephone event as defined in RFC 4733 Section 2.3.4. (Default = 20). |
interval
|
10 - 1000
|
Interval between telephone event RTP packets. (Default = 50). |
end_count
|
1 - 10
|
Number of telephone event RTP packets sent with the E bit (as defined in RFC 4733 Section 2.3.2) set. (Default = 3). |
TEST-RTP-AMR-CMR
The TEST-RTP-AMR-CMR
message is sent to a TestRtpApp instance by another application to
request that an adaptive multi-rate codec mode request be sent to the connected remote RTP endpoint.
The attributes of the TEST-RTP-AMR-CMR
message are:
Field | Type | Description |
---|---|---|
rtp
|
Object | [Required] Container for RTP attributes. |
payload_type
|
0 - 127
|
[Required] RTP Payload Type to use for the outbound codec mode request packet. |
codec_mode
|
0 - 8
|
[Required] AMR mode as defined in 3GPP TS 26.101 / ETSI TS 126 101 table 1a and/or 3GPP TS 26.201 / ETSI TS 126 201 table 1a. |
octet_align
|
Boolean |
Specifies whether to use octet-aligned framing.False to use bandwidth-efficient framing instead of octet-aligned.(Default = true to use octet-aligned framing)
|
TEST-RTP-FETCH
The TEST-RTP-FETCH
message is sent to a TestRtpApp instance by another application to request that
it send any received RTP media stream packets to that application. Note that the TestRtpApp instance clears its RTP
media stream packet buffer on reception of this message.
The TEST-RTP-FETCH
does not have any attributes.
TEST-RTP-FETCHED
The TEST-RTP-FETCHED
message is sent by a TestRtpApp instance in response to a TEST-RTP-FETCH
message
with the requested RTP packets.
The attributes of the TEST-RTP-FETCHED
message are:
Field | Type | Description |
---|---|---|
rtp
|
Object | [Required] Container for RTP attributes. |
.packets
|
Array of Object | [Required] Array of Objects, each representing an inbound RTP media stream packet. |
.timestamp
|
Positive Integer | [Required] Timestamp from the RTP packet header. |
.media
|
String | [Required] The RTP media body containing the audio bytes. |