-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DRAFT PR - demonstrate appropriate handling of non 8K 2833 digit sdp offers. Four categories of tests Test that Asterisk offers the correct sdp for opus and ulaw when 2833 is enabled Test that Asterisk creates the correct responses for opus and ulaw when 2833 is enabled Test that Asterisk is able to read 2833 digits embedded in both an opus stream and ulaw stream. Test that Asterisk generates the correct payload type for the dtmf digits in the rtp stream
- Loading branch information
Showing
80 changed files
with
6,063 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
...jsip/dtmf_sdp/dtmf_sdp_generation/dtmf_sdp_48k_priority_diff/configs/ast1/extensions.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[general] | ||
static=yes | ||
writeprotect=yes | ||
autofallthrough=yes | ||
clearglobalvars=no | ||
priorityjumping=yes | ||
|
||
[globals] | ||
|
||
[default] | ||
exten => 555,1,noOp() | ||
same => n,Answer() | ||
same => n,SendDTMF(1) | ||
same => n,SendDTMF(2) | ||
same => n,SendDTMF(3) | ||
same => n,SendDTMF(4) | ||
same => n,SendDTMF(5) | ||
same => n,SendDTMF(6) | ||
same => n,SendDTMF(7) | ||
same => n,SendDTMF(8) | ||
same => n,SendDTMF(9) | ||
same => n,SendDTMF(0) | ||
same => n,Hangup() |
21 changes: 21 additions & 0 deletions
21
...els/pjsip/dtmf_sdp/dtmf_sdp_generation/dtmf_sdp_48k_priority_diff/configs/ast1/pjsip.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[global] | ||
type = global | ||
debug = yes | ||
|
||
[transport-udp] | ||
type = transport | ||
protocol = udp | ||
bind = 0.0.0.0:5060 | ||
|
||
[endpoint](!) | ||
type = endpoint | ||
dtmf_mode = auto_info | ||
allow = !all,ulaw,alaw,opus | ||
direct_media = no | ||
|
||
[alicepriorityopus](endpoint) | ||
allow = !all,opus,ulaw | ||
|
||
[alicepriorityopus] | ||
type=aor | ||
max_contacts = 10 |
125 changes: 125 additions & 0 deletions
125
...p/dtmf_sdp_generation/dtmf_sdp_48k_priority_diff/sipp/alice_ulaw-amr16-opus_opus-ulaw.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
<?xml version="1.0" encoding="ISO-8859-1"?> | ||
|
||
<scenario name="DTMF_SDP_NEGOTIATON_ALICE"> | ||
<!-- Multiple offers, ulaw prioritized with opus and Alaw as options. Asterisk accepts opus with ulaw. --> | ||
|
||
<send retrans="500"> | ||
<![CDATA[ | ||
INVITE sip:555@[remote_ip] SIP/2.0 | ||
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] | ||
From: [service] <sip:[service]@[local_ip]>;tag=[call_number] | ||
To: 555 <sip:555@[remote_ip]:[remote_port]> | ||
Call-ID: [call_id] | ||
CSeq: 1 INVITE | ||
Contact: sip:[service]@[local_ip]:[local_port] | ||
Max-Forwards: 70 | ||
Subject: Performance Test | ||
Content-Type: application/sdp | ||
Content-Length: [len] | ||
v=0 | ||
o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] | ||
s=- | ||
c=IN IP[local_ip_type] [local_ip] | ||
t=0 0 | ||
m=audio 9000 RTP/AVP 0 96 97 101 102 103 | ||
a=sendrecv | ||
a=rtpmap:0 PCMU/8000 | ||
a=rtpmap:96 AMR-WB/16000 | ||
a=fmtp:96 octet-align=1 | ||
a=rtpmap:97 opus/48000/2 | ||
a=fmtp:97 maxplaybackrate=24000;sprop-maxcapturerate=24000;maxaveragebitrate=96000;useinbandfec=1 | ||
a=rtpmap:101 telephone-event/8000 | ||
a=fmtp:101 0-16 | ||
a=rtpmap:102 telephone-event/16000 | ||
a=fmtp:102 0-16 | ||
a=rtpmap:103 telephone-event/48000 | ||
a=fmtp:103 0-16 | ||
]]> | ||
</send> | ||
|
||
<recv response="100" optional="true"/> | ||
|
||
<recv response="180" optional="true"/> | ||
|
||
<recv response="200" crlf="true"> | ||
<action> | ||
<ereg regexp="RTP/AVP 97 0 103 101" search_in="body" check_it="true" assign_to = "1" /> | ||
<ereg regexp="a=rtpmap:97 opus/48000/2" search_in="body" check_it="true" assign_to = "2" /> | ||
<ereg regexp="a=fmtp:97 maxplaybackrate=24000;sprop-maxcapturerate=24000;maxaveragebitrate=96000" search_in="body" check_it="true" assign_to = "3" /> | ||
<ereg regexp="a=rtpmap:103 telephone-event/48000" search_in="body" check_it="true" assign_to = "4" /> | ||
<ereg regexp="a=fmtp:103 0-16" search_in="body" check_it="true" assign_to = "5" /> | ||
<ereg regexp="a=rtpmap:101 telephone-event/8000" search_in="body" check_it="true" assign_to = "6" /> | ||
<ereg regexp="a=fmtp:101 0-16" search_in="body" check_it="true" assign_to = "7" /> | ||
<ereg regexp="a=rtpmap:0 PCMU/8000" search_in="body" check_it="true" assign_to = "8" /> | ||
</action> | ||
</recv> | ||
|
||
<send> | ||
<![CDATA[ | ||
ACK sip:[service]@[remote_ip] SIP/2.0 | ||
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] | ||
From: [service] <sip:[service]@[local_ip]:[local_port]>;tag=[call_number] | ||
To: 555 <sip:555@[remote_ip]>[peer_tag_param] | ||
Call-ID: [call_id] | ||
CSeq: 1 ACK | ||
Contact: sip:[service]@[local_ip]:[local_port] | ||
Max-Forwards: 70 | ||
Subject: Performance Test | ||
Content-Length: 0 | ||
]]> | ||
</send> | ||
|
||
|
||
<recv request="BYE" timeout="15000" ontimeout="sendbye" next="respond"> | ||
</recv> | ||
|
||
<label id="sendbye"/> | ||
|
||
<send retrans="500"> | ||
<![CDATA[ | ||
BYE sip:[service]@[remote_ip] SIP/2.0 | ||
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] | ||
From: sipp <sip:test@[local_ip]:[local_port]>;tag=[call_number] | ||
To: sut <sip:[service]@[remote_ip]>[peer_tag_param] | ||
Call-ID: [call_id] | ||
CSeq: 2 BYE | ||
Contact: sip:[service]@[local_ip]:[local_port] | ||
Max-Forwards: 70 | ||
Subject: Performance Test | ||
Content-Length: 0 | ||
]]> | ||
</send> | ||
|
||
<recv response="200" crlf="true" next="end"/> | ||
|
||
<label id="respond"/> | ||
|
||
<send> | ||
<![CDATA[ | ||
SIP/2.0 200 OK | ||
[last_Via:] | ||
[last_From:] | ||
[last_To:] | ||
[last_Call-ID:] | ||
[last_CSeq:] | ||
Contact: <sip:[local_ip]:[local_port];transport=[transport]> | ||
Content-Length: 0 | ||
]]> | ||
</send> | ||
|
||
<label id="end"/> | ||
|
||
<Reference variables="1,2,3,4,5,6,7,8"/> | ||
|
||
</scenario> |
133 changes: 133 additions & 0 deletions
133
...s/channels/pjsip/dtmf_sdp/dtmf_sdp_generation/dtmf_sdp_48k_priority_diff/test-config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
testinfo: | ||
summary: 'This test case verifies the use of 2833 digits with multiple bitrate codecs' | ||
description: | | ||
'This test case verifies the use of 2833 digits with multiple bitrate codecs in different combinations' | ||
properties: | ||
dependencies: | ||
- app : 'sipp' | ||
- asterisk : 'res_pjsip' | ||
- asterisk : 'app_dial' | ||
tags: | ||
- pjsip | ||
|
||
test-modules: | ||
test-object: | ||
typename: sipp.SIPpTestCase | ||
config-section: sipp-config | ||
modules: | ||
- | ||
config-section: ami-events | ||
typename: 'ami.AMIEventModule' | ||
|
||
sipp-config: | ||
connect-ami: True | ||
reactor-timeout: 90 | ||
fail-on-any: False | ||
test-iterations: | ||
- | ||
scenarios: | ||
- { 'key-args': {'scenario': 'alice_ulaw-amr16-opus_opus-ulaw.xml', '-p': '5061', '-s': 'alicepriorityopus'} } | ||
|
||
ami-events: | ||
- | ||
type: 'headermatch' | ||
conditions: | ||
match: | ||
Event: 'TestEvent' | ||
state: 'DTMF_BEGIN' | ||
Digit: '1' | ||
Payload: '103' | ||
rate: '48000' | ||
count: 1 | ||
- | ||
type: 'headermatch' | ||
conditions: | ||
match: | ||
Event: 'TestEvent' | ||
state: 'DTMF_BEGIN' | ||
Digit: '2' | ||
Payload: '103' | ||
rate: '48000' | ||
count: 1 | ||
- | ||
type: 'headermatch' | ||
conditions: | ||
match: | ||
Event: 'TestEvent' | ||
state: 'DTMF_BEGIN' | ||
Digit: '3' | ||
Payload: '103' | ||
rate: '48000' | ||
count: 1 | ||
- | ||
type: 'headermatch' | ||
conditions: | ||
match: | ||
Event: 'TestEvent' | ||
state: 'DTMF_BEGIN' | ||
Digit: '4' | ||
Payload: '103' | ||
rate: '48000' | ||
count: 1 | ||
- | ||
type: 'headermatch' | ||
conditions: | ||
match: | ||
Event: 'TestEvent' | ||
state: 'DTMF_BEGIN' | ||
Digit: '5' | ||
Payload: '103' | ||
rate: '48000' | ||
count: 1 | ||
- | ||
type: 'headermatch' | ||
conditions: | ||
match: | ||
Event: 'TestEvent' | ||
state: 'DTMF_BEGIN' | ||
Digit: '6' | ||
Payload: '103' | ||
rate: '48000' | ||
count: 1 | ||
- | ||
type: 'headermatch' | ||
conditions: | ||
match: | ||
Event: 'TestEvent' | ||
state: 'DTMF_BEGIN' | ||
Digit: '7' | ||
Payload: '103' | ||
rate: '48000' | ||
count: 1 | ||
- | ||
type: 'headermatch' | ||
conditions: | ||
match: | ||
Event: 'TestEvent' | ||
state: 'DTMF_BEGIN' | ||
Digit: '8' | ||
Payload: '103' | ||
rate: '48000' | ||
count: 1 | ||
- | ||
type: 'headermatch' | ||
conditions: | ||
match: | ||
Event: 'TestEvent' | ||
state: 'DTMF_BEGIN' | ||
Digit: '9' | ||
Payload: '103' | ||
rate: '48000' | ||
count: 1 | ||
- | ||
type: 'headermatch' | ||
conditions: | ||
match: | ||
Event: 'TestEvent' | ||
state: 'DTMF_BEGIN' | ||
Digit: '0' | ||
Payload: '103' | ||
rate: '48000' | ||
count: 1 | ||
|
23 changes: 23 additions & 0 deletions
23
...sip/dtmf_sdp/dtmf_sdp_generation/dtmf_sdp_48k_priority_match/configs/ast1/extensions.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[general] | ||
static=yes | ||
writeprotect=yes | ||
autofallthrough=yes | ||
clearglobalvars=no | ||
priorityjumping=yes | ||
|
||
[globals] | ||
|
||
[default] | ||
exten => 555,1,noOp() | ||
same => n,Answer() | ||
same => n,SendDTMF(1) | ||
same => n,SendDTMF(2) | ||
same => n,SendDTMF(3) | ||
same => n,SendDTMF(4) | ||
same => n,SendDTMF(5) | ||
same => n,SendDTMF(6) | ||
same => n,SendDTMF(7) | ||
same => n,SendDTMF(8) | ||
same => n,SendDTMF(9) | ||
same => n,SendDTMF(0) | ||
same => n,Hangup() |
21 changes: 21 additions & 0 deletions
21
...ls/pjsip/dtmf_sdp/dtmf_sdp_generation/dtmf_sdp_48k_priority_match/configs/ast1/pjsip.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[global] | ||
type = global | ||
debug = yes | ||
|
||
[transport-udp] | ||
type = transport | ||
protocol = udp | ||
bind = 0.0.0.0:5060 | ||
|
||
[endpoint](!) | ||
type = endpoint | ||
dtmf_mode = auto_info | ||
allow = !all,ulaw,alaw,opus | ||
direct_media = no | ||
|
||
[alicepriorityopus](endpoint) | ||
allow = !all,opus,ulaw | ||
|
||
[alicepriorityopus] | ||
type=aor | ||
max_contacts = 10 |
Oops, something went wrong.