[asterisk-commits] mjordan: testsuite/asterisk/trunk r4425 - in /asterisk/trunk/tests/channels/p...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Dec 11 07:19:56 CST 2013
Author: mjordan
Date: Wed Dec 11 07:19:53 2013
New Revision: 4425
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4425
Log:
channels/pjsip/dialplan_functions: Add tests for PJSIP_ENDPOINT/CHANNEL
This patch adds tests for both PJSIP_ENDPOINT and CHANNEL (for chan_pjsip).
The tests query options through the functions and verify that the expected
values are obtained.
Review: https://reviewboard.asterisk.org/r/3034/
Review: https://reviewboard.asterisk.org/r/3037/
Added:
asterisk/trunk/tests/channels/pjsip/dialplan_functions/
asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/
asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/configs/
asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/configs/ast1/
asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/configs/ast1/pjsip.conf (with props)
asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/sipp/
asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/sipp/uac-no-hangup.xml (with props)
asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/test-config.yaml (with props)
asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_endpoint/
asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_endpoint/configs/
asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_endpoint/configs/ast1/
asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_endpoint/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_endpoint/configs/ast1/pjsip.conf (with props)
asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_endpoint/test-config.yaml (with props)
asterisk/trunk/tests/channels/pjsip/dialplan_functions/tests.yaml (with props)
Modified:
asterisk/trunk/tests/channels/pjsip/tests.yaml
Added: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/configs/ast1/extensions.conf?view=auto&rev=4425
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/configs/ast1/extensions.conf Wed Dec 11 07:19:53 2013
@@ -1,0 +1,99 @@
+
+[default]
+
+exten => test_variable,1,NoOp()
+same => n,Set(item=${LOCAL(ARG1)})
+same => n,Set(type=${LOCAL(ARG2)})
+same => n,Set(specifier=${LOCAL(ARG3)})
+same => n,Set(op=${LOCAL(ARG4)})
+same => n,Set(expected=${LOCAL(ARG5)})
+same => n,Verbose(1, Calling CHANNEL(${item},${type},${specifier}))
+same => n,GotoIf($["${CHANNEL(${item},${type},${specifier})}"${op}${expected}]?pass)
+same => n,UserEvent(Result, Status: failed, Message: CHANNEL(${item},${type},${specifier}) did not match expected value ${expected} - actual ${CHANNEL(${item},${type},${specifier})})
+same => n,Return()
+same => n(pass),NoOp()
+same => n,Verbose(1, CHANNEL(${item},${type},${specifier}) passed (${CHANNEL(${item},${type},${specifier})}))
+same => n,Return()
+
+exten => alice,1,NoOp()
+same => n,Answer()
+
+; ---- RTP ----
+
+; Source will often be various things; just make sure we get something back
+same => n,GoSub(default,test_variable,1(rtp,src,audio,!=,""))
+same => n,GoSub(default,test_variable,1(rtp,dest,audio,=,"127.0.0.1:6000"))
+same => n,GoSub(default,test_variable,1(rtp,hold,audio,=,"0"))
+same => n,GoSub(default,test_variable,1(rtp,secure,audio,=,"0"))
+same => n,GoSub(default,test_variable,1(rtp,direct,audio,=,"(null)"))
+
+; Verify audio is set by default
+same => n,GoSub(default,test_variable,1(rtp,dest,,=,"127.0.0.1:6000"))
+
+; No video stream, these should be empty
+same => n,GoSub(default,test_variable,1(rtp,src,video,=,""))
+same => n,GoSub(default,test_variable,1(rtp,dest,video,=,""))
+
+; ---- RTCP ----
+
+; Can't predict SSRC, make sure we get something back
+same => n,GoSub(default,test_variable,1(rtcp,all,audio,!=,""))
+same => n,GoSub(default,test_variable,1(rtcp,local_ssrc,audio,!=,""))
+same => n,GoSub(default,test_variable,1(rtcp,remote_ssrc,audio,!=,""))
+
+; Check the other summaries
+same => n,GoSub(default,test_variable,1(rtcp,all_jitter,audio,=,"minrxjitter=0.000000;maxrxjitter=0.000000;avgrxjitter=0.000000;stdevrxjitter=0.000000;reported_minjitter=0.000000;reported_maxjitter=0.000000;reported_avgjitter=0.000000;reported_stdevjitter=0.000000;"))
+same => n,GoSub(default,test_variable,1(rtcp,all_rtt,audio,=,"minrtt=0.000000;maxrtt=0.000000;avgrtt=0.000000;stdevrtt=0.000000;"))
+same => n,GoSub(default,test_variable,1(rtcp,all_loss,audio,=,"minrxlost=0.000000;maxrxlost=0.000000;avgrxlost=0.000000;stdevrxlost=0.000000;reported_minlost=0.000000;reported_maxlost=0.000000;reported_avglost=0.000000;reported_stdevlost=0.000000;"))
+
+; Individual values
+same => n,GoSub(default,test_variable,1(rtcp,txcount,audio,=,"0"))
+same => n,GoSub(default,test_variable,1(rtcp,rxcount,audio,=,"0"))
+same => n,GoSub(default,test_variable,1(rtcp,txjitter,audio,=,"0.000000"))
+same => n,GoSub(default,test_variable,1(rtcp,rxjitter,audio,=,"0.000000"))
+same => n,GoSub(default,test_variable,1(rtcp,remote_maxjitter,audio,=,"0.000000"))
+same => n,GoSub(default,test_variable,1(rtcp,remote_minjitter,audio,=,"0.000000"))
+same => n,GoSub(default,test_variable,1(rtcp,remote_normdevjitter,audio,=,"0.000000"))
+same => n,GoSub(default,test_variable,1(rtcp,remote_stdevjitter,audio,=,"0.000000"))
+same => n,GoSub(default,test_variable,1(rtcp,local_maxjitter,audio,=,"0.000000"))
+same => n,GoSub(default,test_variable,1(rtcp,local_minjitter,audio,=,"0.000000"))
+same => n,GoSub(default,test_variable,1(rtcp,local_normdevjitter,audio,=,"0.000000"))
+same => n,GoSub(default,test_variable,1(rtcp,local_stdevjitter,audio,=,"0.000000"))
+same => n,GoSub(default,test_variable,1(rtcp,txploss,audio,=,"0"))
+same => n,GoSub(default,test_variable,1(rtcp,rxploss,audio,=,"0"))
+same => n,GoSub(default,test_variable,1(rtcp,remote_maxrxploss,audio,=,"0.000000"))
+same => n,GoSub(default,test_variable,1(rtcp,remote_minrxploss,audio,=,"0.000000"))
+same => n,GoSub(default,test_variable,1(rtcp,remote_normdevrxploss,audio,=,"0.000000"))
+same => n,GoSub(default,test_variable,1(rtcp,remote_stdevrxploss,audio,=,"0.000000"))
+same => n,GoSub(default,test_variable,1(rtcp,local_maxrxploss,audio,=,"0.000000"))
+same => n,GoSub(default,test_variable,1(rtcp,local_minrxploss,audio,=,"0.000000"))
+same => n,GoSub(default,test_variable,1(rtcp,local_normdevrxploss,audio,=,"0.000000"))
+same => n,GoSub(default,test_variable,1(rtcp,local_stdevrxploss,audio,=,"0.000000"))
+same => n,GoSub(default,test_variable,1(rtcp,rtt,audio,=,"0.000000"))
+same => n,GoSub(default,test_variable,1(rtcp,maxrtt,audio,=,"0.000000"))
+same => n,GoSub(default,test_variable,1(rtcp,minrtt,audio,=,"0.000000"))
+same => n,GoSub(default,test_variable,1(rtcp,normdevrtt,audio,=,"0.000000"))
+same => n,GoSub(default,test_variable,1(rtcp,stdevrtt,audio,=,"0.000000"))
+
+; Audio should be default
+same => n,GoSub(default,test_variable,1(rtcp,txcount,,=,"0"))
+same => n,GoSub(default,test_variable,1(rtcp,rxcount,,=,"0"))
+
+; Video should be empty
+same => n,GoSub(default,test_variable,1(rtcp,all,video,=,""))
+
+; ---- Endpoint ----
+
+same => n,GoSub(default,test_variable,1(endpoint,,,=,"alice"))
+
+; ---- PJSIP/Signalling ----
+same => n,GoSub(default,test_variable,1(pjsip,secure,,=,"0"))
+same => n,GoSub(default,test_variable,1(pjsip,target_uri,,=,"sip:alice at 127.0.0.1:5062"))
+same => n,GoSub(default,test_variable,1(pjsip,local_uri,,=,"\"sut\" <sip:alice at 127.0.0.1>"))
+same => n,GoSub(default,test_variable,1(pjsip,remote_uri,,=,"\"alice\" <sip:alice at 127.0.0.1:5062>"))
+same => n,GoSub(default,test_variable,1(pjsip,t38state,,=,"DISABLED"))
+same => n,GoSub(default,test_variable,1(pjsip,local_addr,,=,"127.0.0.1:5061"))
+same => n,GoSub(default,test_variable,1(pjsip,remote_addr,,=,"127.0.0.1:5062"))
+
+same => n,UserEvent(Result, Status: passed)
+same => n,Hangup()
Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/configs/ast1/pjsip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/configs/ast1/pjsip.conf?view=auto&rev=4425
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/configs/ast1/pjsip.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/configs/ast1/pjsip.conf Wed Dec 11 07:19:53 2013
@@ -1,0 +1,29 @@
+[local-transport-template](!)
+type=transport
+bind=127.0.0.1:5061
+
+[local-transport-udp](local-transport-template)
+protocol=udp
+
+[endpoint-template](!)
+type=endpoint
+context=default
+allow=!all,ulaw,alaw
+
+[aors-template](!)
+type=aor
+
+[identify-template](!)
+type=identify
+
+[alice-identify-ipv4](identify-template)
+endpoint=alice
+match=127.0.0.1:5062
+
+[alice](aors-template)
+contact=sip:127.0.0.1:5062
+
+; alice is the caller
+[alice](endpoint-template)
+aors=alice
+from_user=Alice
Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/sipp/uac-no-hangup.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/sipp/uac-no-hangup.xml?view=auto&rev=4425
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/sipp/uac-no-hangup.xml (added)
+++ asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/sipp/uac-no-hangup.xml Wed Dec 11 07:19:53 2013
@@ -1,0 +1,90 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Basic Sipstone UAC">
+ <send retrans="500">
+ <![CDATA[
+
+ INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: alice <sip:alice@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
+ To: sut <sip:[service]@[remote_ip]:[remote_port]>
+ Call-ID: [call_id]
+ CSeq: 1 INVITE
+ Contact: sip:alice@[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[media_ip_type] [media_ip]
+ t=0 0
+ m=audio [media_port] RTP/AVP 0
+ a=rtpmap:0 PCMU/8000
+
+ ]]>
+ </send>
+
+ <recv response="100"
+ optional="true">
+ </recv>
+
+ <recv response="181"
+ optional="true">
+ </recv>
+
+ <recv response="180" optional="true">
+ </recv>
+
+ <recv response="183" optional="true">
+ </recv>
+
+ <recv response="200" rtd="true">
+ </recv>
+
+ <send>
+ <![CDATA[
+
+ ACK sip:[service]@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
+ To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
+ Call-ID: [call_id]
+ CSeq: 1 ACK
+ Contact: sip:sipp@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Subject: Performance Test
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <recv request="BYE">
+ </recv>
+
+ <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>
+
+ <timewait milliseconds="4000"/>
+
+ <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
+
+ <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
+
+</scenario>
+
Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/sipp/uac-no-hangup.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/sipp/uac-no-hangup.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/sipp/uac-no-hangup.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/test-config.yaml?view=auto&rev=4425
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/test-config.yaml (added)
+++ asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/test-config.yaml Wed Dec 11 07:19:53 2013
@@ -1,0 +1,54 @@
+testinfo:
+ summary: 'Tests the CHANNEL function for PJSIP'
+ description: |
+ 'Extract values from a PJSIP channel using the CHANNEL
+ function. This checks all of the supported channel technology
+ specific values that the CHANNEL function exposes.'
+
+test-modules:
+ test-object:
+ config-section: test-object-config
+ typename: 'sipp.SIPpTestCase'
+ modules:
+ -
+ config-section: ami-config
+ typename: 'ami.AMIEventModule'
+
+
+test-object-config:
+ test-iterations:
+ -
+ scenarios:
+ - { 'key-args': { 'scenario': 'uac-no-hangup.xml', '-p': '5062', '-i': '127.0.0.1', '-s': 'alice', '-rsa': '127.0.0.1:5061', '-s': 'alice'} }
+
+
+ami-config:
+ -
+ id: '0'
+ type: 'headermatch'
+ count: '1'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ requirements:
+ match:
+ Status: 'passed'
+ -
+ id: '0'
+ type: 'headermatch'
+ count: '0'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ Status: 'failed'
+
+properties:
+ minversion: '12.0.0'
+ dependencies:
+ - python : 'twisted'
+ - python : 'starpy'
+ - asterisk : 'res_pjsip'
+ - asterisk : 'res_pjsip_session'
+ - asterisk : 'chan_pjsip'
+ tags:
+ - pjsip
Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/test-config.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/test-config.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_channel/test-config.yaml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_endpoint/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_endpoint/configs/ast1/extensions.conf?view=auto&rev=4425
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_endpoint/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_endpoint/configs/ast1/extensions.conf Wed Dec 11 07:19:53 2013
@@ -1,0 +1,105 @@
+
+[default]
+
+exten => test_variable,1,NoOp()
+same => n,Set(endpoint=${LOCAL(ARG1)})
+same => n,Set(field=${LOCAL(ARG2)})
+same => n,Set(expected=${LOCAL(ARG3)})
+same => n,Verbose(1, Calling PJSIP_ENDPOINT for endpoint ${endpoint}, field ${field})
+same => n,GotoIf($["${PJSIP_ENDPOINT(${endpoint},${field})}"="${expected}"]?pass)
+same => n,UserEvent(Result, Status: failed, Message: ${endpoint}, ${field} did not match expected value ${expected} - actual ${PJSIP_ENDPOINT(${endpoint},${field})})
+same => n(pass),NoOp()
+same => n,Return()
+
+exten => s,1,NoOp()
+same => n,Answer()
+
+; Test Alice's properties
+same => n,GoSub(default,test_variable,1(alice,srtp_tag_32,false))
+same => n,GoSub(default,test_variable,1(alice,dtls_setup,active))
+same => n,GoSub(default,test_variable,1(alice,dtls_ca_path,))
+same => n,GoSub(default,test_variable,1(alice,dtls_ca_file,))
+same => n,GoSub(default,test_variable,1(alice,dtls_cipher,))
+same => n,GoSub(default,test_variable,1(alice,dtls_private_key,))
+same => n,GoSub(default,test_variable,1(alice,dtls_cert_file,))
+same => n,GoSub(default,test_variable,1(alice,dtls_rekey,0))
+same => n,GoSub(default,test_variable,1(alice,dtls_verify,No))
+same => n,GoSub(default,test_variable,1(alice,rtp_engine,asterisk))
+same => n,GoSub(default,test_variable,1(alice,mwi_from_user,))
+same => n,GoSub(default,test_variable,1(alice,from_domain,))
+same => n,GoSub(default,test_variable,1(alice,from_user,Alice))
+same => n,GoSub(default,test_variable,1(alice,sub_min_expiry,0))
+same => n,GoSub(default,test_variable,1(alice,allow_subscribe,true))
+same => n,GoSub(default,test_variable,1(alice,cos_video,0))
+same => n,GoSub(default,test_variable,1(alice,cos_audio,0))
+same => n,GoSub(default,test_variable,1(alice,tos_video,0))
+same => n,GoSub(default,test_variable,1(alice,tos_audio,0))
+same => n,GoSub(default,test_variable,1(alice,sdp_session,Asterisk))
+same => n,GoSub(default,test_variable,1(alice,sdp_owner,-))
+same => n,GoSub(default,test_variable,1(alice,allow_transfer,true))
+same => n,GoSub(default,test_variable,1(alice,record_off_feature,automixmon))
+same => n,GoSub(default,test_variable,1(alice,record_on_feature,automixmon))
+same => n,GoSub(default,test_variable,1(alice,language,))
+same => n,GoSub(default,test_variable,1(alice,tone_zone,))
+same => n,GoSub(default,test_variable,1(alice,t38_udptl_ipv6,false))
+same => n,GoSub(default,test_variable,1(alice,t38_udptl_nat,false))
+same => n,GoSub(default,test_variable,1(alice,fax_detect,false))
+same => n,GoSub(default,test_variable,1(alice,t38_udptl_maxdatagram,0))
+same => n,GoSub(default,test_variable,1(alice,t38_udptl_ec,none))
+same => n,GoSub(default,test_variable,1(alice,t38_udptl,false))
+same => n,GoSub(default,test_variable,1(alice,device_state_busy_at,0))
+same => n,GoSub(default,test_variable,1(alice,named_pickup_group,))
+same => n,GoSub(default,test_variable,1(alice,named_call_group,))
+same => n,GoSub(default,test_variable,1(alice,pickup_group,))
+same => n,GoSub(default,test_variable,1(alice,call_group,))
+same => n,GoSub(default,test_variable,1(alice,inband_progress,false))
+same => n,GoSub(default,test_variable,1(alice,one_touch_recording,false))
+same => n,GoSub(default,test_variable,1(alice,use_avpf,false))
+same => n,GoSub(default,test_variable,1(alice,media_encryption,none))
+same => n,GoSub(default,test_variable,1(alice,aggregate_mwi,true))
+same => n,GoSub(default,test_variable,1(alice,mailboxes,))
+same => n,GoSub(default,test_variable,1(alice,send_diversion,true))
+same => n,GoSub(default,test_variable,1(alice,send_rpid,false))
+same => n,GoSub(default,test_variable,1(alice,send_pai,false))
+same => n,GoSub(default,test_variable,1(alice,trust_id_outbound,false))
+same => n,GoSub(default,test_variable,1(alice,trust_id_inbound,false))
+same => n,GoSub(default,test_variable,1(alice,callerid_tag,))
+same => n,GoSub(default,test_variable,1(alice,callerid_privacy,allowed_not_screened))
+same => n,GoSub(default,test_variable,1(alice,callerid,<unknown>))
+same => n,GoSub(default,test_variable,1(alice,disable_direct_media_on_nat,false))
+same => n,GoSub(default,test_variable,1(alice,disable_direct_media_glare_mitigation,))
+same => n,GoSub(default,test_variable,1(alice,connected_line_method,invite))
+same => n,GoSub(default,test_variable,1(alice,direct_media_method,invite))
+same => n,GoSub(default,test_variable,1(alice,direct_media,true))
+same => n,GoSub(default,test_variable,1(alice,identify_by,username))
+same => n,GoSub(default,test_variable,1(alice,media_address,))
+same => n,GoSub(default,test_variable,1(alice,aors,alice))
+same => n,GoSub(default,test_variable,1(alice,outbound_auth,))
+same => n,GoSub(default,test_variable,1(alice,auth,))
+same => n,GoSub(default,test_variable,1(alice,timers_sess_expires,1800))
+same => n,GoSub(default,test_variable,1(alice,timers_min_se,90))
+same => n,GoSub(default,test_variable,1(alice,timers,yes))
+same => n,GoSub(default,test_variable,1(alice,100rel,yes))
+same => n,GoSub(default,test_variable,1(alice,moh_suggest,default))
+same => n,GoSub(default,test_variable,1(alice,outbound_proxy,))
+same => n,GoSub(default,test_variable,1(alice,transport,))
+same => n,GoSub(default,test_variable,1(alice,rewrite_contact,false))
+same => n,GoSub(default,test_variable,1(alice,force_rport,true))
+same => n,GoSub(default,test_variable,1(alice,use_ptime,false))
+same => n,GoSub(default,test_variable,1(alice,ice_support,false))
+same => n,GoSub(default,test_variable,1(alice,rtp_symmetric,false))
+same => n,GoSub(default,test_variable,1(alice,rtp_ipv6,false))
+same => n,GoSub(default,test_variable,1(alice,dtmf_mode,rfc4733))
+same => n,GoSub(default,test_variable,1(alice,allow,(ulaw|alaw)))
+same => n,GoSub(default,test_variable,1(alice,disallow,!(ulaw|alaw)))
+same => n,GoSub(default,test_variable,1(alice,context,default))
+
+; Check that Bob gives us a different value for something it defined
+same => n,GoSub(default,test_variable,1(bob,from_user,Bob))
+
+; Check unknown endpoint/field
+same => n,GoSub(default,test_variable,1,(foo,from_user,))
+same => n,GoSub(default,test_variable,1,(bob,foo,))
+
+same => n,UserEvent(Result, Status: passed)
+same => n,Hangup()
Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_endpoint/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_endpoint/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_endpoint/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_endpoint/configs/ast1/pjsip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_endpoint/configs/ast1/pjsip.conf?view=auto&rev=4425
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_endpoint/configs/ast1/pjsip.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_endpoint/configs/ast1/pjsip.conf Wed Dec 11 07:19:53 2013
@@ -1,0 +1,32 @@
+[local-transport-template](!)
+type=transport
+bind=127.0.0.1:5061
+
+[local-transport-udp](local-transport-template)
+protocol=udp
+
+[endpoint-template](!)
+type=endpoint
+context=default
+allow=!all,ulaw,alaw
+
+[aors-template](!)
+type=aor
+
+[alice](aors-template)
+contact=sip:127.0.0.1:5062
+
+[bob](aors-template)
+contact=sip:127.0.0.1:5063
+
+; alice is the caller
+[alice](endpoint-template)
+aors=alice
+from_user=Alice
+
+; bob is the recipient of outbound calls
+[bob](endpoint-template)
+aors=bob
+from_user=Bob
+
+
Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_endpoint/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_endpoint/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_endpoint/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_endpoint/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_endpoint/test-config.yaml?view=auto&rev=4425
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_endpoint/test-config.yaml (added)
+++ asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_endpoint/test-config.yaml Wed Dec 11 07:19:53 2013
@@ -1,0 +1,56 @@
+testinfo:
+ summary: 'Tests the PJSIP_ENDPOINT function'
+ description: |
+ 'Extract values from pjsip endpoint configuration using the
+ PJSIP_ENDPOINT function. This tests all values for a single
+ endpoint (alice), and verifies that checking a different
+ endpoint (bob) also works. Off nominal endpoints/fields
+ are checked by verifying that the function handles such
+ calls gracefully.'
+
+test-modules:
+ test-object:
+ config-section: test-object-config
+ typename: 'SimpleTestCase.SimpleTestCase'
+ modules:
+ -
+ config-section: ami-config
+ typename: 'ami.AMIEventModule'
+
+
+test-object-config:
+ spawn-after-hangup: True
+ test-iterations:
+ -
+ channel: 'Local/s at default'
+ application: 'Echo'
+
+ami-config:
+ -
+ id: '0'
+ type: 'headermatch'
+ count: '1'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ requirements:
+ match:
+ Status: 'passed'
+ -
+ id: '0'
+ type: 'headermatch'
+ count: '0'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ Status: 'failed'
+
+properties:
+ minversion: '12.0.0'
+ dependencies:
+ - python : 'twisted'
+ - python : 'starpy'
+ - asterisk : 'res_pjsip'
+ - asterisk : 'func_pjsip_endpoint'
+ tags:
+ - pjsip
Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_endpoint/test-config.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_endpoint/test-config.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/pjsip_endpoint/test-config.yaml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/pjsip/dialplan_functions/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/dialplan_functions/tests.yaml?view=auto&rev=4425
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/dialplan_functions/tests.yaml (added)
+++ asterisk/trunk/tests/channels/pjsip/dialplan_functions/tests.yaml Wed Dec 11 07:19:53 2013
@@ -1,0 +1,4 @@
+# Enter tests here in the order they should be considered for execution:
+tests:
+ - test: 'pjsip_channel'
+ - test: 'pjsip_endpoint'
Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/tests.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/tests.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/pjsip/dialplan_functions/tests.yaml
------------------------------------------------------------------------------
svn:mime-type = text/plain
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=4425&r1=4424&r2=4425
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/tests.yaml (original)
+++ asterisk/trunk/tests/channels/pjsip/tests.yaml Wed Dec 11 07:19:53 2013
@@ -9,4 +9,5 @@
- dir: 'registration'
- dir: 'diversion'
- dir: 'message'
+ - dir: 'dialplan_functions'
- dir: 'ami'
More information about the asterisk-commits
mailing list