Author: kmoore Date: Fri Jan 9 09:00:57 2015 New Revision: 6213 URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=6213 Log: Testsuite: Test T.38 negotiation timeout
This test exercises the T.38 negotiation timeout and the options used to configure it. Review: https://reviewboard.asterisk.org/r/4321/ Added: asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/ asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/configs/ asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/configs/ast1/ asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/configs/ast1/extensions.conf (with props) asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/configs/ast1/res_fax.conf (with props) asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/configs/ast1/sip.conf (with props) asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/sipp/ asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/sipp/t38timeout.xml (with props) asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/test-config.yaml (with props) Modified: asterisk/trunk/tests/fax/sip/tests.yaml Added: asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/configs/ast1/extensions.conf URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/configs/ast1/extensions.conf?view=auto&rev=6213 ============================================================================== --- asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/configs/ast1/extensions.conf (added) +++ asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/configs/ast1/extensions.conf Fri Jan 9 09:00:57 2015 @@ -1,0 +1,11 @@ +[default] +exten => fax,1,NoOp() +; set minrate so that the details structure is available for reading +; and takes on the global defaults + same => n,Set(FAXOPT(minrate)=9600) + same => n,UserEvent(TestStatus, t38timeout: ${FAXOPT(t38timeout)}) + same => n,Set(FAXOPT(t38timeout)=5) + same => n,UserEvent(TestStatus, t38timeout: ${FAXOPT(t38timeout)}) + same => n,ReceiveFAX(/tmp/fax.tiff,f) + same => n,Hangup() + Propchange: asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/configs/ast1/extensions.conf ------------------------------------------------------------------------------ svn:eol-style = native Propchange: asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/configs/ast1/extensions.conf ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/configs/ast1/extensions.conf ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/configs/ast1/res_fax.conf URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/configs/ast1/res_fax.conf?view=auto&rev=6213 ============================================================================== --- asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/configs/ast1/res_fax.conf (added) +++ asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/configs/ast1/res_fax.conf Fri Jan 9 09:00:57 2015 @@ -1,0 +1,2 @@ +[general] +t38timeout=10 Propchange: asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/configs/ast1/res_fax.conf ------------------------------------------------------------------------------ svn:eol-style = native Propchange: asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/configs/ast1/res_fax.conf ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/configs/ast1/res_fax.conf ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/configs/ast1/sip.conf URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/configs/ast1/sip.conf?view=auto&rev=6213 ============================================================================== --- asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/configs/ast1/sip.conf (added) +++ asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/configs/ast1/sip.conf Fri Jan 9 09:00:57 2015 @@ -1,0 +1,14 @@ +[general] +allowguest=no +bindaddr=127.0.0.1 +sipdebug=yes +context=default + +[endpoint_A] +type=friend +host=127.0.0.2 +qualify=no +disallow=all +allow=ulaw +insecure=invite +t38pt_udptl=yes Propchange: asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/configs/ast1/sip.conf ------------------------------------------------------------------------------ svn:eol-style = native Propchange: asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/configs/ast1/sip.conf ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/configs/ast1/sip.conf ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/sipp/t38timeout.xml URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/sipp/t38timeout.xml?view=auto&rev=6213 ============================================================================== --- asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/sipp/t38timeout.xml (added) +++ asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/sipp/t38timeout.xml Fri Jan 9 09:00:57 2015 @@ -1,0 +1,140 @@ +<?xml version="1.0" encoding="ISO-8859-1" ?> +<!DOCTYPE scenario SYSTEM "sipp.dtd"> + +<scenario name="T.38 Negotiation Timeout Test"> + <send retrans="500"> + <![CDATA[ + + INVITE sip:fax@[remote_ip]:[remote_port] SIP/2.0 + Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] + Max-Forwards: 70 + From: "Anonymous" <sip:[email protected]>;tag=[call_number] + To: <sip:fax@[remote_ip]:[remote_port]> + Contact: <sip:anonymous@[local_ip]:[local_port]> + Call-ID: [call_id] + CSeq: 102 INVITE + User-Agent: Asterisk PBX SVN-branch-13-r430181 + Date: Tue, 06 Jan 2015 17:41:13 GMT + Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE + Supported: replaces, timer + Content-Type: application/sdp + Content-Length: [len] + + v=0 + o=root 742505990 742505990 IN IP4 10.24.20.65 + s=Asterisk PBX SVN-branch-13-r430181 + c=IN IP4 10.24.20.65 + t=0 0 + m=audio 19484 RTP/AVP 0 101 + a=rtpmap:0 PCMU/8000 + a=rtpmap:101 telephone-event/8000 + a=fmtp:101 0-16 + a=maxptime:150 + a=sendrecv + + ]]> + </send> + + <recv response="100"/> + <recv response="200"/> + + <send> + <![CDATA[ + + ACK sip:fax@[remote_ip]:[remote_port] SIP/2.0 + Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] + Max-Forwards: 70 + From: "Anonymous" <sip:[email protected]>;tag=[call_number] + To: <sip:fax@[remote_ip]:[remote_port]>[peer_tag_param] + Contact: <sip:anonymous@[local_ip]:[local_port]> + Call-ID: [call_id] + CSeq: 102 ACK + User-Agent: Asterisk PBX SVN-branch-13-r430181 + Content-Length: 0 + + ]]> + </send> + + <recv request="INVITE"/> + + <send> + <![CDATA[ + + SIP/2.0 100 Trying + Via: SIP/2.0/[transport] [remote_ip]:[remote_port];branch=[branch];received=[remote_ip];rport=[remote_port] + From: <sip:fax@[remote_ip]:[remote_port]>[peer_tag_param] + To: "Anonymous" <sip:[email protected]>;tag=[call_number] + Call-ID: [call_id] + CSeq: 102 INVITE + Server: Asterisk PBX SVN-branch-13-r430181 + Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE + Supported: replaces, timer + Contact: <sip:anonymous@[local_ip]:[local_port]> + Content-Length: 0 + + ]]> + </send> + <pause milliseconds="5000"/> + + <send> + <![CDATA[ + + SIP/2.0 200 OK + Via: SIP/2.0/[transport] [remote_ip]:[remote_port];branch=[branch];received=[remote_ip];rport=[remote_port] + From: <sip:fax@[remote_ip]:[remote_port]>[peer_tag_param] + To: "Anonymous" <sip:[email protected]>;tag=[call_number] + Call-ID: [call_id] + CSeq: 102 INVITE + Server: Asterisk PBX SVN-branch-13-r430181 + Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE + Supported: replaces, timer + Contact: <sip:anonymous@[local_ip]:[local_port]> + Content-Type: application/sdp + Content-Length: [len] + + v=0 + o=root 742505990 742505991 IN IP4 10.24.20.65 + s=Asterisk PBX SVN-branch-13-r430181 + c=IN IP4 10.24.20.65 + t=0 0 + m=image 4730 udptl t38 + c=IN IP4 10.24.20.65 + a=T38FaxVersion:0 + a=T38MaxBitRate:14400 + a=T38FaxRateManagement:transferredTCF + a=T38FaxMaxDatagram:1400 + a=T38FaxUdpEC:t38[transport]Redundancy + + ]]> + </send> + + <recv request="ACK"/> + + <send> + <![CDATA[ + + BYE sip:fax@[remote_ip]:[remote_port] SIP/2.0 + Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch];rport + Max-Forwards: 70 + From: "Anonymous" <sip:[email protected]>;tag=[call_number] + To: <sip:fax@[remote_ip]:[remote_port]>[peer_tag_param] + Call-ID: [call_id] + CSeq: 104 BYE + User-Agent: Asterisk PBX SVN-branch-13-r430181 + X-Asterisk-HangupCause: Normal Clearing + X-Asterisk-HangupCauseCode: 16 + Content-Length: 0 + + ]]> + </send> + + <recv response="200"/> + + <!-- 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> + Propchange: asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/sipp/t38timeout.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/sipp/t38timeout.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/sipp/t38timeout.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/test-config.yaml URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/test-config.yaml?view=auto&rev=6213 ============================================================================== --- asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/test-config.yaml (added) +++ asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/test-config.yaml Fri Jan 9 09:00:57 2015 @@ -1,0 +1,70 @@ +testinfo: + summary: 'Test T.38 Negotiation Timeout' + description: | + "This test exercises the T.38 negotiation timeout and the ability to + set this timeout via res_fax.conf and via FAXOPT(t38timeout). + + This test initiates a call via a SIPp scenario which establishes a call + and then waits longer than the T.38 negotiation timeout before sending + a response to the T.38 negotiation attempt. The SIPp scenario then + hangs up the call. + + When Asterisk receives a call, it provides the current config-option + T.38 timeout to be checked by the test, modifies the timeout using + FAXOPT(), and again provides the T.38 timeout to be checked by the + test. Asterisk then attempts to receive a fax using the modified T.38 + negotiation timeout. Once the negotiation timeout passes and the + delayed negotiation response is received, Asterisk receives a BYE and + hangs up the channel. + " + +test-modules: + add-test-to-search-path: 'True' + test-object: + config-section: test-object-config + typename: 'sipp.SIPpTestCase' + modules: + - + config-section: ami-config + typename: 'ami.AMIEventModule' + + +test-object-config: + fail-on-any: False + test-iterations: + - + scenarios: + - { 'key-args': {'scenario': 't38timeout.xml', '-i': '127.0.0.2', '-p': '5060'} } + +ami-config: + - + type: 'headermatch' + conditions: + match: + Event: 'UserEvent' + UserEvent: 'TestStatus' + t38timeout: '10' + count: '1' + - + type: 'headermatch' + conditions: + match: + Event: 'UserEvent' + UserEvent: 'TestStatus' + t38timeout: '5' + count: '1' + - + type: 'headermatch' + conditions: + match: + Event: 'Hangup' + count: '1' + +properties: + minversion: '11.16.0' + dependencies: + - sipp : + version : 'v3.0' + tags: + - SIP + - fax Propchange: asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/test-config.yaml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/test-config.yaml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: asterisk/trunk/tests/fax/sip/t38_negotiation_timeout/test-config.yaml ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: asterisk/trunk/tests/fax/sip/tests.yaml URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/fax/sip/tests.yaml?view=diff&rev=6213&r1=6212&r2=6213 ============================================================================== --- asterisk/trunk/tests/fax/sip/tests.yaml (original) +++ asterisk/trunk/tests/fax/sip/tests.yaml Fri Jan 9 09:00:57 2015 @@ -17,3 +17,4 @@ - test: 'gateway_timeout4' - test: 'gateway_timeout5' - test: 'voxfax_g711' + - test: 't38_negotiation_timeout' -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- svn-commits mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/svn-commits
