<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/5878">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Joshua Colp: Looks good to me, but someone else must approve; Verified
  Matthew Fredrickson: Looks good to me, approved
  Jenkins2: Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res/pjsip  Add test for 'auto_info'<br><br>test to validate new dtmf mode 'auto_info'<br><br>ASTERISK-27066 #close<br><br>Change-Id: I674d3a6dc678f275bb39738505ee032dd86dbb37<br>---<br>A tests/channels/pjsip/dtmf_info_fallback/configs/ast1/extensions.conf<br>A tests/channels/pjsip/dtmf_info_fallback/configs/ast1/pjsip.conf<br>A tests/channels/pjsip/dtmf_info_fallback/sipp/alice.xml<br>A tests/channels/pjsip/dtmf_info_fallback/sipp/bob.xml<br>A tests/channels/pjsip/dtmf_info_fallback/sipp/dtmf_2833_4.pcap<br>A tests/channels/pjsip/dtmf_info_fallback/test-config.yaml<br>M tests/channels/pjsip/tests.yaml<br>7 files changed, 263 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/tests/channels/pjsip/dtmf_info_fallback/configs/ast1/extensions.conf b/tests/channels/pjsip/dtmf_info_fallback/configs/ast1/extensions.conf<br>new file mode 100644<br>index 0000000..fc7e597<br>--- /dev/null<br>+++ b/tests/channels/pjsip/dtmf_info_fallback/configs/ast1/extensions.conf<br>@@ -0,0 +1,12 @@<br>+[general]<br>+static=yes<br>+writeprotect=yes<br>+autofallthrough=yes<br>+clearglobalvars=no<br>+priorityjumping=yes<br>+<br>+[globals]<br>+<br>+[default]<br>+exten => bob,1,Dial(pjsip/bob,180)<br>+<br>diff --git a/tests/channels/pjsip/dtmf_info_fallback/configs/ast1/pjsip.conf b/tests/channels/pjsip/dtmf_info_fallback/configs/ast1/pjsip.conf<br>new file mode 100644<br>index 0000000..74719a5<br>--- /dev/null<br>+++ b/tests/channels/pjsip/dtmf_info_fallback/configs/ast1/pjsip.conf<br>@@ -0,0 +1,47 @@<br>+[global]<br>+type = global<br>+debug = yes<br>+<br>+[transport-udp]<br>+type = transport<br>+protocol = udp<br>+bind = 0.0.0.0:5060<br>+<br>+[alice]<br>+type = endpoint<br>+context = default<br>+dtmf_mode = auto_info<br>+disallow = all<br>+allow = alaw<br>+allow = ulaw<br>+allow = g729<br>+allow = h263p<br>+allow = h264<br>+direct_media = no<br>+send_rpid = yes<br>+sdp_session = session<br>+t38_udptl = yes<br>+t38_udptl_ec = redundancy<br>+<br>+[bob]<br>+type = aor<br>+max_contacts=1<br>+contact = sip:127.0.0.1:5062<br>+<br>+[bob]<br>+type = endpoint<br>+context = default<br>+dtmf_mode = auto_info<br>+disallow = all<br>+allow = alaw<br>+allow = ulaw<br>+allow = g729<br>+allow = h263p<br>+allow = h264<br>+direct_media = no<br>+send_rpid = yes<br>+sdp_session = session<br>+aors = bob<br>+t38_udptl = yes<br>+t38_udptl_ec = redundancy<br>+<br>diff --git a/tests/channels/pjsip/dtmf_info_fallback/sipp/alice.xml b/tests/channels/pjsip/dtmf_info_fallback/sipp/alice.xml<br>new file mode 100644<br>index 0000000..bf3801f<br>--- /dev/null<br>+++ b/tests/channels/pjsip/dtmf_info_fallback/sipp/alice.xml<br>@@ -0,0 +1,83 @@<br>+<?xml version="1.0" encoding="ISO-8859-1"?><br>+<br>+<scenario name="DTMF_INFO_FALLBACK"><br>+<br>+<send retrans="500"><br>+ <![CDATA[<br>+<br>+      INVITE sip:bob@[remote_ip] SIP/2.0<br>+   Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]<br>+     From: sipp <sip:[service]@[local_ip]>;tag=[call_number]<br>+        To: bob <sip:bob@[remote_ip]:[remote_port]><br>+    Call-ID: [call_id]<br>+   CSeq: 1 INVITE<br>+       Contact: sip:[service]@[local_ip]:[local_port]<br>+       Max-Forwards: 70<br>+     Subject: Performance Test<br>+    Content-Type: application/sdp<br>+        Content-Length: [len]<br>+<br>+     v=0<br>+  o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]<br>+  s=-<br>+  c=IN IP[local_ip_type] [local_ip]<br>+    t=0 0<br>+        m=audio 9000 RTP/AVP 0 101<br>+   a=rtpmap:0 PCMU/8000<br>+ a=rtpmap:101 telephone-event/8000<br>+    a=fmtp:101 0-15<br>+      ]]><br>+</send><br>+<br>+<recv response="100" optional="true"/><br>+<br>+<recv response="180" optional="true"/><br>+<br>+<recv response="200" crlf="true"/><br>+<br>+<send><br>+       <![CDATA[<br>+<br>+      ACK sip:[service]@[remote_ip] SIP/2.0<br>+        Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]<br>+     From: sipp <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]<br>+   To: bob <sip:bob@[remote_ip]>[peer_tag_param]<br>+  Call-ID: [call_id]<br>+   CSeq: 1 ACK<br>+  Contact: sip:sipp@[local_ip]:[local_port]<br>+    Max-Forwards: 70<br>+     Subject: Performance Test<br>+    Content-Length: 0<br>+<br>+ ]]><br>+</send><br>+<br>+<!-- Play a PCAP which sends the RTPEVENT packet containing DTMF 4 --><br>+<nop><br>+       <action><br>+               <exec play_pcap_audio="./tests/channels/pjsip/dtmf_info_fallback/sipp/dtmf_2833_4.pcap"/><br>+    </action><br>+</nop><br>+<br>+<pause milliseconds="5000"/><br>+<br>+<send retrans="500"><br>+   <![CDATA[<br>+<br>+      BYE sip:[service]@[remote_ip] SIP/2.0<br>+        Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]<br>+     From: sipp <sip:test@[local_ip]:[local_port]>;tag=[call_number]<br>+        To: sut <sip:[service]@[remote_ip]>[peer_tag_param]<br>+    Call-ID: [call_id]<br>+   CSeq: 2 BYE<br>+  Contact: sip:[service]@[local_ip]:[local_port]<br>+       Max-Forwards: 70<br>+     Subject: Performance Test<br>+    Content-Length: 0<br>+<br>+ ]]><br>+</send><br>+<br>+<recv response="200" crlf="true"/><br>+<br>+</scenario><br>diff --git a/tests/channels/pjsip/dtmf_info_fallback/sipp/bob.xml b/tests/channels/pjsip/dtmf_info_fallback/sipp/bob.xml<br>new file mode 100644<br>index 0000000..9de8006<br>--- /dev/null<br>+++ b/tests/channels/pjsip/dtmf_info_fallback/sipp/bob.xml<br>@@ -0,0 +1,91 @@<br>+<?xml version="1.0" encoding="ISO-8859-1" ?><br>+<br>+<scenario name="DTMF Handling"><br>+<br>+<recv request="INVITE" crlf="true"/><br>+<br>+<send><br>+     <![CDATA[<br>+<br>+      SIP/2.0 100 Trying<br>+   [last_Via:]<br>+  [last_Call-ID:]<br>+      [last_From:]<br>+ [last_To:]<br>+   [last_CSeq:]<br>+ Content-Length: 0<br>+<br>+ ]]><br>+</send><br>+<br>+<send retrans="500"><br>+     <![CDATA[<br>+<br>+      SIP/2.0 200 OK<br>+       [last_Via:]<br>+  [last_Call-ID:]<br>+      [last_From:]<br>+ [last_To:];tag=[call_number]<br>+ [last_CSeq:]<br>+ Contact: <sip:[service]@[local_ip]:[local_port];user=phone><br>+    Content-Type: application/sdp<br>+        Content-Length: [len]<br>+<br>+     v=0<br>+  o=HuaweiSoftX3000 6644052 6644052 IN IP[local_ip_type] [local_ip]<br>+    s=Sip Call<br>+   c=IN IP[local_ip_type] [local_ip]<br>+    t=0 0<br>+        m=audio 8000 RTP/AVP 0<br>+       a=rtpmap:0 PCMU/8000<br>+<br>+      ]]><br>+</send><br>+<br>+<recv request="ACK" rtd="true" crlf="true"/><br>+<br>+<!-- Receive the DIGIT 4--><br>+<recv request="INFO"> <br>+ <action><br>+               <ereg regexp="(Signal=4)" search_in="body" check_it="true" assign_to = "1" /><br>+  </action><br>+</recv> <br>+ <br>+<send> <br>+ <![CDATA[ <br>+<br>+     SIP/2.0 200 OK <br>+      [last_Via:] <br>+ [last_From:] <br>+        [last_To:] <br>+  [last_Call-ID:] <br>+     [last_CSeq:] <br>+        Content-Length: 0 <br>+<br>+        ]]> <br>+</send> <br>+<br>+<recv request="BYE"/> <br>+ <br>+<send> <br>+     <![CDATA[ <br>+<br>+     SIP/2.0 200 OK <br>+      [last_Via:] <br>+ [last_From:] <br>+        [last_To:] <br>+  [last_Call-ID:] <br>+     [last_CSeq:] <br>+        Content-Length: 0 <br>+<br>+        ]]> <br>+</send> <br>+<br>+<!-- Keep the call open for a while in case the 200 is lost to be     --><br>+<!-- able to retransmit it if we receive the BYE again.               --><br>+<pause milliseconds="3000"/><br>+<br>+<Reference variables="1"/><br>+<br>+</scenario><br>+<br>diff --git a/tests/channels/pjsip/dtmf_info_fallback/sipp/dtmf_2833_4.pcap b/tests/channels/pjsip/dtmf_info_fallback/sipp/dtmf_2833_4.pcap<br>new file mode 100644<br>index 0000000..b3bd1ef<br>--- /dev/null<br>+++ b/tests/channels/pjsip/dtmf_info_fallback/sipp/dtmf_2833_4.pcap<br>Binary files differ<br>diff --git a/tests/channels/pjsip/dtmf_info_fallback/test-config.yaml b/tests/channels/pjsip/dtmf_info_fallback/test-config.yaml<br>new file mode 100644<br>index 0000000..138eec3<br>--- /dev/null<br>+++ b/tests/channels/pjsip/dtmf_info_fallback/test-config.yaml<br>@@ -0,0 +1,29 @@<br>+testinfo:<br>+    summary: 'This test case verifies the DTMF INFO FALLBACK i.e fallback tO INFO instead of INBAND'<br>+    description: |<br>+        'This test case verifies the DTMF INFO FALLBACK i.e fallback tO INFO instead of INBAND'<br>+<br>+properties:<br>+    minversion: [ '13.17.0', '14.6.0' ]<br>+    dependencies:<br>+        - app : 'sipp'<br>+        - asterisk : 'res_pjsip'<br>+    tags:<br>+        - pjsip<br>+<br>+test-modules:<br>+    test-object:<br>+        typename: sipp.SIPpTestCase<br>+        config-section: sipp-config<br>+<br>+sipp-config:<br>+    connect-ami: True<br>+    reactor-timeout: 15<br>+    fail-on-any: True<br>+    stop-after-scenarios: True<br>+    test-iterations:<br>+        -<br>+            scenarios:<br>+                - { 'key-args': {'scenario': 'bob.xml', '-p': '5062', '-s': 'bob'} }<br>+                - { 'key-args': {'scenario': 'alice.xml', '-p': '5061', '-s': 'alice'} }<br>+<br>diff --git a/tests/channels/pjsip/tests.yaml b/tests/channels/pjsip/tests.yaml<br>index 59f5f1c..54ff285 100644<br>--- a/tests/channels/pjsip/tests.yaml<br>+++ b/tests/channels/pjsip/tests.yaml<br>@@ -53,3 +53,4 @@<br>     - test: 'user_eq_phone'<br>     - test: 'cseq_method'<br>     - test: 'multipart_empty_part'<br>+    - test: 'dtmf_info_fallback'<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/5878">change 5878</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/5878"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: testsuite </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I674d3a6dc678f275bb39738505ee032dd86dbb37 </div>
<div style="display:none"> Gerrit-Change-Number: 5878 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: Torrey Searle <tsearle@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Matthew Fredrickson <creslin@digium.com> </div>