Test RTP UDP Messages
Introduction
The Test RTP UDP Application (TestRtpUdpApp) 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 TestRtpUdpApp.
TestRtpUdpLuaAgent
(handles audio comparisons and telephone event injection)
The internal RTP messages are:
TEST-RTP-UDP-REGISTER
TEST-RTP-UDP-REGISTERED
TEST-RTP-UDP-CONNECT
TEST-RTP-UDP-START-TE
TEST-RTP-UDP-AMR-CMR
TEST-RTP-UDP-FETCH
TEST-RTP-UDP-FETCHED
TEST-RTP-UDP-DEREGISTER
TEST-RTP-UDP-REGISTER
The TEST-RTP-UDP-REGISTER
message is sent to the TestRtpUdpApp by another application to
request that an RTP endpoint be created. Note that endpoints are managed by TestRtpUdpApp instances.
The attributes of the TEST-RTP-REGISTER
message are:
Field | Type | Description |
---|---|---|
rtp
|
Object | Container for RTP parameters. |
timeout
|
Positive Integer |
Maximum amount of time in seconds to wait for incoming RTP packets before shutting down the endpoint. (Default = 300 ).
|
TEST-RTP-UDP-REGISTERED
The TEST-RTP-UDP-REGISTERED
message is sent by the TestRtpUdpApp in response to a TEST-RTP-UDP-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-UDP-CONNECT
The TEST-RTP-UDP-CONNECT
message is sent to a TestRtpUdpApp 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 connect to. |
remote_port
|
1 - 65535
|
[Required] Remote IPv4 UDP Port Number to connect to. |
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-UDP-START-TE
The TEST-RTP-UDP-START-TE
message is sent to a TestRtpUdpApp instance by another application to
request that a telephone event be sent to the connected remote RTP endpoint.
The attributes of the TEST-RTP-UDP-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-UDP-AMR-CMR
The TEST-RTP-UDP-AMR-CMR
message is sent to a TestRtpUdpApp 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-UDP-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. |
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. |
TEST-RTP-UDP-FETCH
The TEST-RTP-UDP-FETCH
message is sent to a TestRtpUdpApp instance by another application to request that
it send any received RTP packets to that application. Note that the TestRtpUdpApp instance clears its RTP packet buffer
on reception of this message.
The TEST-RTP-UDP-FETCH
does not have any attributes.
TEST-RTP-UDP-FETCHED
The TEST-RTP-UDP-FETCHED
message is sent by a TestRtpUdpApp instance in response to a TEST-RTP-UDP-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 packet. |
.timestamp
|
Positive Integer | [Required] Timestamp from the RTP packet header. |
.media
|
String | [Required] The RTP media body containing the audio bytes. |
TEST-RTP-UDP-DEREGISTER
The TEST-RTP-UDP-DEREGISTER
message is sent to a TestRtpUdpApp instance by another application to request that
the RTP endpoint be disconnected and disposed.
The TEST-RTP-UDP-DEREGISTER
message does not have any attributes.
No response message is sent for this request.