Skip to content

Commit

Permalink
Add T38<->RTP test
Browse files Browse the repository at this point in the history
  • Loading branch information
smititelu committed Jun 27, 2023
1 parent ebb5231 commit 99bf178
Show file tree
Hide file tree
Showing 6 changed files with 413 additions and 8 deletions.
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ sudo apt-get install ngcp-rtpengine
│   ├── long.pcap
│   ├── uac.xml
│   └── uas.xml
├── p2p_rtp_reinvite_t38_rtp -> INVITE test with RTP and RE-INVITE with T38<->RTP
│   ├── long.pcap
│   ├── t38.pcap
│   ├── uac.xml
│   └── uas.xml
├── p2p_srtp -> INVITE test with SRTP
│   ├── uac.xml
│   └── uas.xml
Expand Down Expand Up @@ -156,13 +161,22 @@ Same as 2. but with SRTP instead of Pause

##### 5. RE-INVITE test with RTP media
```
Same as 2. but with RTP instead of Pause and Re-INVITE updates UAC RTP port.
Same as 2. but with RTP instead of Pause and RE-INVITE updates UAC RTP port.
RTP media continues to be sent after RE-INVITE on new UAC port
```

<br />

##### 6. SUBSCRIBE/NOTIFY test
##### 6. RE-INVITE test with T38<->RTP media
```
Same as 2. but with RTP instead of Pause and RE-INVITE updates UAC RTP port.
After RE-INVITE, media will flow:
UAC <---T38---> RPI RTP SERVER <---RTP---> UAS
```

<br />

##### 7. SUBSCRIBE/NOTIFY test
```
SUBSCRIBE
SIPP UAC --------> RPI SIP SERVER
Expand Down
Binary file added sipp/xml/p2p_rtp_reinvite_t38_rtp/long.pcap
Binary file not shown.
Binary file added sipp/xml/p2p_rtp_reinvite_t38_rtp/t38.pcap
Binary file not shown.
253 changes: 253 additions & 0 deletions sipp/xml/p2p_rtp_reinvite_t38_rtp/uac.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,253 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">

<!-- From: uac_number, To: uas_number -->

<scenario name="UAC">

<!-- variables -->
<nop crlf="true">
<action>
<assignstr assign_to="uas_number" value="[field0 file=uas.csv]" />
<assignstr assign_to="uas_domain" value="[field2 file=uas.csv]" />

<assignstr assign_to="uac_number" value="[field0 file=uac.csv]" />
<assignstr assign_to="uac_passwd" value="[field1 file=uac.csv]" />
<assignstr assign_to="uac_domain" value="[field2 file=uac.csv]" />
</action>
</nop>




<!-- INVITE -->
<send retrans="500">
<![CDATA[
INVITE sip:[$uas_number]@[$uas_domain] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port]
From: <sip:[$uac_number]@[$uac_domain]>;tag=[pid]
To: <sip:[$uas_number]@[$uas_domain]>[peer_tag_param]
Call-ID: [call_id]
CSeq: [cseq] INVITE
Contact: <sip:[$uac_number]@[local_ip]:[local_port]>
Max-Forwards: 70
Content-Type: application/sdp
Content-Length:[len]
v=0
o=user1 53655765 2353687637 IN IP[media_ip_type] [media_ip]
s=-
c=IN IP[media_ip_type] [media_ip]
t=0 0
m=audio [media_port] RTP/AVP 0 18 9 103 8 101
a=rtcp:[media_port+1]
a=sendrecv
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=rtpmap:9 G722/16000
a=fmtp:9 bitrate=64000
a=rtpmap:103 G7221/16000
a=fmtp:103 bitrate=32000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-11,16
]]>
</send>

<recv response="407" optional="false" next="got_auth" auth="true"> </recv>




<!-- label: got auth -->
<label id="got_auth" />

<!-- INVITE auth -->
<send retrans="500">
<![CDATA[
INVITE sip:[$uas_number]@[$uas_domain] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port]
From: <sip:[$uac_number]@[$uac_domain]>;tag=[pid]
To: <sip:[$uas_number]@[$uas_domain]>
Call-ID: [call_id]
CSeq: [cseq] INVITE
Contact: <sip:[$uac_number]@[local_ip]:[local_port]>
Max-Forwards: 70
[authentication username="[$uac_number]" password="[$uac_passwd]"]
Content-Type: application/sdp
Content-Length:[len]
v=0
o=user1 53655765 2353687637 IN IP[media_ip_type] [media_ip]
s=-
c=IN IP[media_ip_type] [media_ip]
t=0 0
m=audio [media_port] RTP/AVP 0 18 9 103 8 101
a=rtcp:[media_port+1]
a=sendrecv
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=rtpmap:9 G722/16000
a=fmtp:9 bitrate=64000
a=rtpmap:103 G7221/16000
a=fmtp:103 bitrate=32000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-11,16
]]>
</send>

<recv response="100" optional="true"> </recv>
<recv response="180" optional="true"> </recv>
<recv response="200" optional="false" next="done_auth" rrs="true"> </recv>




<!-- label: done auth -->
<label id="done_auth" />

<!-- ACK -->
<send crlf="true">
<![CDATA[
ACK [next_url] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port]
From: <sip:[$uac_number]@[$uac_domain]>;tag=[pid]
To: <sip:[$uas_number]@[$uas_domain]>[peer_tag_param]
[routes]
Call-ID: [call_id]
CSeq: [cseq] ACK
Contact: <sip:[$uac_number]@[local_ip]:[local_port]>
Max-Forwards: 70
Content-Length: 0
]]>
</send>




<!-- play RTP -->
<nop>
<action>
<exec play_pcap_audio="long.pcap"/>
</action>
</nop>

<pause milliseconds="5000" crlf="true"/>




<!-- RE_INVITE -->
<send retrans="500">
<![CDATA[
INVITE sip:[$uas_number]@[$uas_domain] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port]
From: <sip:[$uac_number]@[$uac_domain]>;tag=[pid]
To: <sip:[$uas_number]@[$uas_domain]>[peer_tag_param]
Call-ID: [call_id]
CSeq: [cseq] INVITE
Contact: <sip:[$uac_number]@[local_ip]:[local_port]>
Max-Forwards: 70
Content-Type: application/sdp
Content-Length:[len]
v=0
o=user 12573426 12573427 IN IP[media_ip_type] [media_ip]
s=-
c=IN IP[media_ip_type] [media_ip]
t=0 0
m=image [media_port+2] udptl t38
a=T38FaxVersion:1
a=T38MaxBitRate:14400
a=T38FaxTranscodingMMR
a=T38FaxTranscodingJBIG
a=T38FaxRateManagement:transferredTCF
a=T38FaxUdpEC:t38UDPRedundancy
a=T38FaxUdpEC:t38UDPFEC
a=T38FaxMaxDatagram:512
a=sendrecv
]]>
</send>

<recv response="100" optional="true"> </recv>
<recv response="200" optional="false" rrs="true"> </recv>

<!-- ACK -->
<send crlf="true">
<![CDATA[
ACK [next_url] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port]
From: <sip:[$uac_number]@[$uac_domain]>;tag=[pid]
To: <sip:[$uas_number]@[$uas_domain]>[peer_tag_param]
[routes]
Call-ID: [call_id]
CSeq: [cseq] ACK
Contact: <sip:[$uac_number]@[local_ip]:[local_port]>
Max-Forwards: 70
Content-Length: 0
]]>
</send>




<!-- pause to start with clean T38 -->
<pause milliseconds="2000" crlf="true"/>

<!-- play T38 -->
<nop>
<action>
<exec play_pcap_image="t38.pcap"/>
</action>
</nop>

<pause crlf="true"/>




<!-- BYE -->
<send retrans="500">
<![CDATA[
BYE [next_url] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port]
From: <sip:[$uac_number]@[$uac_domain]>;tag=[pid]
To: <sip:[$uas_number]@[$uas_domain]>[peer_tag_param]
[routes]
Call-ID: [call_id]
CSeq: [cseq] BYE
Contact: <sip:[$uac_number]@[local_ip]:[local_port]>
Max-Forwards: 70
Subject: Performance Test
Content-Length: 0
]]>
</send>

<recv response="200" optional="false" next="done_all" crlf="true"> </recv>




<!-- label: done all-->
<label id="done_all" />

<!-- definition of the response time repartition table (unit is ms) -->
<ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>

<!-- definition of the call length repartition table (unit is ms) -->
<CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>

</scenario>
Loading

0 comments on commit 99bf178

Please sign in to comment.