[asterisk-commits] mjordan: testsuite/asterisk/trunk r6135 - in /asterisk/trunk/tests/channels/p...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Dec 24 06:55:15 CST 2014
Author: mjordan
Date: Wed Dec 24 06:55:11 2014
New Revision: 6135
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=6135
Log:
Add a test for user_eq_phone setting in PJSIP
This patch adds a test for the user_eq_phone endpoint setting in PJSIP.
The test verifies that when the user_eq_phone setting is enabled on a PJSIP
endpoint, a request sent from Asterisk to that endpoint that contains a
telephone number in the request URI has a 'user=phone' specified appended to
it. The test originates a Local channel that causes an outbound dial to number
12568675309 at endpoint 'jenny'. The SIPp scenario verifies that a 'user=phone'
tag is found in the INVITE request received from Asterisk.
Review: https://reviewboard.asterisk.org/r/4294/
Added:
asterisk/trunk/tests/channels/pjsip/user_eq_phone/
asterisk/trunk/tests/channels/pjsip/user_eq_phone/configs/
asterisk/trunk/tests/channels/pjsip/user_eq_phone/configs/ast1/
asterisk/trunk/tests/channels/pjsip/user_eq_phone/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/channels/pjsip/user_eq_phone/configs/ast1/pjsip.conf (with props)
asterisk/trunk/tests/channels/pjsip/user_eq_phone/sipp/
asterisk/trunk/tests/channels/pjsip/user_eq_phone/sipp/uas.xml (with props)
asterisk/trunk/tests/channels/pjsip/user_eq_phone/test-config.yaml (with props)
Modified:
asterisk/trunk/tests/channels/pjsip/tests.yaml
Modified: asterisk/trunk/tests/channels/pjsip/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/tests.yaml?view=diff&rev=6135&r1=6134&r2=6135
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/tests.yaml (original)
+++ asterisk/trunk/tests/channels/pjsip/tests.yaml Wed Dec 24 06:55:11 2014
@@ -30,4 +30,5 @@
- dir: 'optimistic_srtp'
- test: 'in_dialog_invite_replaces'
- test: 'dtmf_incompatible'
+ - test: 'user_eq_phone'
- test: 'keep_alive'
Added: asterisk/trunk/tests/channels/pjsip/user_eq_phone/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/user_eq_phone/configs/ast1/extensions.conf?view=auto&rev=6135
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/user_eq_phone/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/user_eq_phone/configs/ast1/extensions.conf Wed Dec 24 06:55:11 2014
@@ -1,0 +1,5 @@
+[default]
+
+exten => s,1,NoOp()
+ same => n,Dial(PJSIP/+12568675309 at jenny)
+ same => n,Hangup()
Propchange: asterisk/trunk/tests/channels/pjsip/user_eq_phone/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/pjsip/user_eq_phone/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/pjsip/user_eq_phone/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/pjsip/user_eq_phone/configs/ast1/pjsip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/user_eq_phone/configs/ast1/pjsip.conf?view=auto&rev=6135
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/user_eq_phone/configs/ast1/pjsip.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/user_eq_phone/configs/ast1/pjsip.conf Wed Dec 24 06:55:11 2014
@@ -1,0 +1,16 @@
+
+[transport-udp]
+type=transport
+protocol=udp
+bind=0.0.0.0:5060
+
+[jenny]
+type=endpoint
+context=default
+allow=!all,ulaw,alaw,g722
+user_eq_phone=True
+aors=jenny
+
+[jenny]
+type=aor
+contact=sip:127.0.0.1:5061
Propchange: asterisk/trunk/tests/channels/pjsip/user_eq_phone/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/pjsip/user_eq_phone/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/pjsip/user_eq_phone/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/pjsip/user_eq_phone/sipp/uas.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/user_eq_phone/sipp/uas.xml?view=auto&rev=6135
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/user_eq_phone/sipp/uas.xml (added)
+++ asterisk/trunk/tests/channels/pjsip/user_eq_phone/sipp/uas.xml Wed Dec 24 06:55:11 2014
@@ -1,0 +1,70 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Receive INVITE with video">
+ <Global variables="remote_tag" />
+ <recv request="INVITE" crlf="true">
+ <action>
+ <!-- Save the from tag. We'll need it when we send our BYE -->
+ <ereg regexp=".*(;tag=.*)"
+ header="From:"
+ search_in="hdr"
+ check_it="true"
+ assign_to="remote_tag"/>
+ <ereg regexp=".*;user=phone.*"
+ search_in="msg"
+ check_it="true"
+ assign_to="1"/>
+ </action>
+ </recv>
+ <Reference variables="1" />
+
+ <send retrans="500">
+ <![CDATA[
+
+ SIP/2.0 200 OK
+ [last_Via:]
+ [last_From:]
+ [last_To:];tag=[call_number]
+ [last_Call-ID:]
+ [last_CSeq:]
+ Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+ Content-Type: application/sdp
+ Content-Length: [len]
+
+ v=0
+ o=- 1324901698 1324901698 IN IP4 [local_ip]
+ s=-
+ c=IN IP4 [local_ip]
+ t=0 0
+ m=audio 2226 RTP/AVP 0 101
+ a=sendrecv
+ a=rtpmap:0 PCMU/8000
+ a=rtpmap:101 telephone-event/8000
+
+ ]]>
+ </send>
+
+ <recv request="ACK" rtd="true" crlf="true">
+ </recv>
+
+ <send retrans="500">
+ <![CDATA[
+
+ BYE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: ua1 <sip:ua1@[local_ip]:[local_port]>;tag=[call_number]
+ To: [$remote_tag]
+ [last_Call-ID:]
+ CSeq: [cseq] BYE
+ Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+ Max-Forwards: 70
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <recv response="200">
+ </recv>
+
+</scenario>
Propchange: asterisk/trunk/tests/channels/pjsip/user_eq_phone/sipp/uas.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/pjsip/user_eq_phone/sipp/uas.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/pjsip/user_eq_phone/sipp/uas.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/pjsip/user_eq_phone/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/user_eq_phone/test-config.yaml?view=auto&rev=6135
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/user_eq_phone/test-config.yaml (added)
+++ asterisk/trunk/tests/channels/pjsip/user_eq_phone/test-config.yaml Wed Dec 24 06:55:11 2014
@@ -1,0 +1,41 @@
+testinfo:
+ summary: 'Verify the user_eq_phone setting'
+ description: |
+ This test verifies that when the user_eq_phone setting is enabled on a
+ PJSIP endpoint, a request sent from Asterisk to that endpoint that
+ contains a telephone number in the request URI has a 'user=phone'
+ specified appended to it. The test originates a Local channel that
+ causes an outbound dial to number 12568675309 at endpoint 'jenny'.
+ The SIPp scenario verifies that a 'user=phone' tag is found in the
+ INVITE request received from Asterisk.
+
+test-modules:
+ test-object:
+ config-section: test-object-config
+ typename: 'sipp.SIPpTestCase'
+ modules:
+ -
+ config-section: originator
+ typename: 'pluggable_modules.Originator'
+
+test-object-config:
+ test-iterations:
+ -
+ scenarios:
+ - { 'key-args': {'scenario': 'uas.xml', '-i': '127.0.0.1', '-p': '5061'} }
+
+originator:
+ trigger: 'ami_connect'
+ ignore-originate-failure: 'no'
+ id: '0'
+ channel: 'Local/s at default'
+ application: 'Echo'
+ async: 'True'
+
+properties:
+ minversion: '13.2.0'
+ dependencies:
+ - app : 'sipp'
+ - asterisk : 'res_pjsip'
+ tags:
+ - pjsip
Propchange: asterisk/trunk/tests/channels/pjsip/user_eq_phone/test-config.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/pjsip/user_eq_phone/test-config.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/pjsip/user_eq_phone/test-config.yaml
------------------------------------------------------------------------------
svn:mime-type = text/plain
More information about the asterisk-commits
mailing list