[asterisk-commits] file: testsuite/asterisk/trunk r4516 - in /asterisk/trunk/tests/fax: ./ direc...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Dec 23 19:47:09 CST 2013
Author: file
Date: Mon Dec 23 19:47:06 2013
New Revision: 4516
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4516
Log:
Add tests for PJSIP T.38 fax functionality.
Review: https://reviewboard.asterisk.org/r/3048/
Added:
asterisk/trunk/tests/fax/pjsip/
asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/
asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/configs/
asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/configs/ast1/
asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/configs/ast1/pjsip.conf (with props)
asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/sipp/
asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/sipp/endpoint_A.xml (with props)
asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/sipp/endpoint_B.xml (with props)
asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/sipp/inject_bridge.csv (with props)
asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/test-config.yaml (with props)
asterisk/trunk/tests/fax/pjsip/gateway_native_t38/
asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/
asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast1/
asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast1/pjsip.conf (with props)
asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast2/
asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast2/extensions.conf (with props)
asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast2/pjsip.conf (with props)
asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast2/sip.conf (with props)
asterisk/trunk/tests/fax/pjsip/gateway_native_t38/run-test (with props)
asterisk/trunk/tests/fax/pjsip/gateway_native_t38/send.tiff (with props)
asterisk/trunk/tests/fax/pjsip/gateway_native_t38/test-config.yaml (with props)
asterisk/trunk/tests/fax/pjsip/gateway_t38_g711/
asterisk/trunk/tests/fax/pjsip/gateway_t38_g711/configs/
asterisk/trunk/tests/fax/pjsip/gateway_t38_g711/configs/ast1/
asterisk/trunk/tests/fax/pjsip/gateway_t38_g711/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/fax/pjsip/gateway_t38_g711/configs/ast1/pjsip.conf (with props)
asterisk/trunk/tests/fax/pjsip/gateway_t38_g711/configs/ast2/
asterisk/trunk/tests/fax/pjsip/gateway_t38_g711/configs/ast2/extensions.conf (with props)
asterisk/trunk/tests/fax/pjsip/gateway_t38_g711/configs/ast2/pjsip.conf (with props)
asterisk/trunk/tests/fax/pjsip/gateway_t38_g711/configs/ast2/sip.conf (with props)
asterisk/trunk/tests/fax/pjsip/gateway_t38_g711/run-test (with props)
asterisk/trunk/tests/fax/pjsip/gateway_t38_g711/send.tiff (with props)
asterisk/trunk/tests/fax/pjsip/gateway_t38_g711/test-config.yaml (with props)
asterisk/trunk/tests/fax/pjsip/t38/
asterisk/trunk/tests/fax/pjsip/t38/configs/
asterisk/trunk/tests/fax/pjsip/t38/configs/ast1/
asterisk/trunk/tests/fax/pjsip/t38/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/fax/pjsip/t38/configs/ast1/pjsip.conf (with props)
asterisk/trunk/tests/fax/pjsip/t38/configs/ast2/
asterisk/trunk/tests/fax/pjsip/t38/configs/ast2/extensions.conf (with props)
asterisk/trunk/tests/fax/pjsip/t38/configs/ast2/pjsip.conf (with props)
asterisk/trunk/tests/fax/pjsip/t38/configs/ast2/sip.conf (with props)
asterisk/trunk/tests/fax/pjsip/t38/run-test (with props)
asterisk/trunk/tests/fax/pjsip/t38/send.tiff (with props)
asterisk/trunk/tests/fax/pjsip/t38/test-config.yaml (with props)
asterisk/trunk/tests/fax/pjsip/tests.yaml (with props)
asterisk/trunk/tests/fax/sip/
asterisk/trunk/tests/fax/sip/directmedia_reinvite_t38/
- copied from r4410, asterisk/trunk/tests/fax/directmedia_reinvite_t38/
asterisk/trunk/tests/fax/sip/gateway_g711_t38/
- copied from r4410, asterisk/trunk/tests/fax/gateway_g711_t38/
asterisk/trunk/tests/fax/sip/gateway_mix1/
- copied from r4410, asterisk/trunk/tests/fax/gateway_mix1/
asterisk/trunk/tests/fax/sip/gateway_mix2/
- copied from r4410, asterisk/trunk/tests/fax/gateway_mix2/
asterisk/trunk/tests/fax/sip/gateway_mix3/
- copied from r4410, asterisk/trunk/tests/fax/gateway_mix3/
asterisk/trunk/tests/fax/sip/gateway_mix4/
- copied from r4410, asterisk/trunk/tests/fax/gateway_mix4/
asterisk/trunk/tests/fax/sip/gateway_native_t38/
- copied from r4410, asterisk/trunk/tests/fax/gateway_native_t38/
asterisk/trunk/tests/fax/sip/gateway_native_t38_ced/
- copied from r4410, asterisk/trunk/tests/fax/gateway_native_t38_ced/
asterisk/trunk/tests/fax/sip/gateway_no_t38/
- copied from r4410, asterisk/trunk/tests/fax/gateway_no_t38/
asterisk/trunk/tests/fax/sip/gateway_t38_g711/
- copied from r4410, asterisk/trunk/tests/fax/gateway_t38_g711/
asterisk/trunk/tests/fax/sip/gateway_timeout1/
- copied from r4410, asterisk/trunk/tests/fax/gateway_timeout1/
asterisk/trunk/tests/fax/sip/gateway_timeout2/
- copied from r4410, asterisk/trunk/tests/fax/gateway_timeout2/
asterisk/trunk/tests/fax/sip/gateway_timeout3/
- copied from r4410, asterisk/trunk/tests/fax/gateway_timeout3/
asterisk/trunk/tests/fax/sip/gateway_timeout4/
- copied from r4410, asterisk/trunk/tests/fax/gateway_timeout4/
asterisk/trunk/tests/fax/sip/gateway_timeout5/
- copied from r4410, asterisk/trunk/tests/fax/gateway_timeout5/
asterisk/trunk/tests/fax/sip/local_channel_t38_queryoption/
- copied from r4410, asterisk/trunk/tests/fax/local_channel_t38_queryoption/
asterisk/trunk/tests/fax/sip/tests.yaml (with props)
asterisk/trunk/tests/fax/sip/voxfax_g711/
- copied from r4410, asterisk/trunk/tests/fax/voxfax_g711/
Removed:
asterisk/trunk/tests/fax/directmedia_reinvite_t38/
asterisk/trunk/tests/fax/gateway_g711_t38/
asterisk/trunk/tests/fax/gateway_mix1/
asterisk/trunk/tests/fax/gateway_mix2/
asterisk/trunk/tests/fax/gateway_mix3/
asterisk/trunk/tests/fax/gateway_mix4/
asterisk/trunk/tests/fax/gateway_native_t38/
asterisk/trunk/tests/fax/gateway_native_t38_ced/
asterisk/trunk/tests/fax/gateway_no_t38/
asterisk/trunk/tests/fax/gateway_t38_g711/
asterisk/trunk/tests/fax/gateway_timeout1/
asterisk/trunk/tests/fax/gateway_timeout2/
asterisk/trunk/tests/fax/gateway_timeout3/
asterisk/trunk/tests/fax/gateway_timeout4/
asterisk/trunk/tests/fax/gateway_timeout5/
asterisk/trunk/tests/fax/local_channel_t38_queryoption/
asterisk/trunk/tests/fax/voxfax_g711/
Modified:
asterisk/trunk/tests/fax/tests.yaml
Added: asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/configs/ast1/extensions.conf?view=auto&rev=4516
==============================================================================
--- asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/configs/ast1/extensions.conf Mon Dec 23 19:47:06 2013
@@ -1,0 +1,14 @@
+[general]
+PHONE_TO_DIAL=PJSIP/endpoint_B/sip:127.0.0.3
+
+[default]
+exten => bypassbridge,1,NoOp()
+ same => n,Dial(PJSIP/endpoint_B/sip:127.0.0.3,,g)
+ same => n,UserEvent(TestStatus, extension: bypassbridge)
+ same => n,Hangup()
+
+; Dial with no options; use bridge set up based on peer definitions
+exten => basicdial,1,NoOp()
+ same => n,Dial(PJSIP/endpoint_B/sip:127.0.0.3,,g)
+ same => n,UserEvent(TestStatus, extension: basicdial)
+ same => n,Hangup()
Propchange: asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/configs/ast1/pjsip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/configs/ast1/pjsip.conf?view=auto&rev=4516
==============================================================================
--- asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/configs/ast1/pjsip.conf (added)
+++ asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/configs/ast1/pjsip.conf Mon Dec 23 19:47:06 2013
@@ -1,0 +1,25 @@
+[local-transport]
+type=transport
+protocol=udp
+bind=127.0.0.1
+
+[endpoint-template](!)
+type=endpoint
+context=default
+allow=!all,ulaw,alaw
+t38_udptl=yes
+
+[endpoint_A](endpoint-template)
+
+[endpoint_B](endpoint-template)
+
+[identify-template](!)
+type=identify
+
+[endpoint_A](identify-template)
+endpoint=endpoint_A
+match=127.0.0.2
+
+[endpoint_B](identify-template)
+endpoint=endpoint_B
+match=127.0.0.3
Propchange: asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/sipp/endpoint_A.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/sipp/endpoint_A.xml?view=auto&rev=4516
==============================================================================
--- asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/sipp/endpoint_A.xml (added)
+++ asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/sipp/endpoint_A.xml Mon Dec 23 19:47:06 2013
@@ -1,0 +1,218 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Phone A Hold with IP and Media Restrictions">
+
+ <!-- Initial invite - Call phone B -->
+ <send retrans="500">
+ <![CDATA[
+ INVITE sip:[field2]@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: [field0] <sip:[field0]@[local_ip]:[local_port]>;tag=[call_number]
+ To: <sip:[field2]@[remote_ip]:[remote_port];user=phone>
+ CSeq: 1 INVITE
+ Call-ID: [call_id]
+ Contact: <sip:[field0]@[local_ip]:[local_port]>
+ Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER
+ User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
+ Accept-Language: en
+ Allow-Events: talk,hold,conference
+ Max-Forwards: 70
+ Content-Type: application/sdp
+ Content-Length: [len]
+
+ v=0
+ o=- 1324901698 1324901698 IN IP4 [local_ip]
+ s=Polycom IP Phone
+ c=IN IP4 [local_ip]
+ t=0 0
+ a=sendrecv
+ m=audio 2226 RTP/AVP 0 101
+ a=sendrecv
+ a=rtpmap:0 PCMU/8000
+ a=rtpmap:101 telephone-event/8000
+ ]]>
+ </send>
+
+ <recv response="100" optional="true" />
+
+ <recv response="180" optional="true" />
+
+ <recv response="183" optional="true" />
+
+ <recv response="200" />
+
+ <send>
+ <![CDATA[
+ ACK sip:[field1]@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: [field0] <sip:[field0]@[remote_ip]>;tag=[call_number]
+ To: <sip:[field1]@[remote_ip];user=phone>[peer_tag_param]
+ CSeq: 1 ACK
+ Call-ID: [call_id]
+ Contact: <sip:[field0]@[local_ip]:[local_port]>
+ Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER
+ User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
+ Accept-Language: en
+ Max-Forwards: 70
+ Content-Length: 0
+ ]]>
+ </send>
+
+ <!-- Reinvite to establish directmedia - media flows between Phone A and Phone B -->
+ <recv request="INVITE">
+ <action>
+ <ereg regexp="c=IN IP4 127.0.0.3" search_in="body" check_it="true" assign_to="1" />
+ <log message="Side A - Contact SDP for directmedia reinvite matches expectations: [$1]." />
+ <strcmp assign_to="result" variable="1" value="c=IN IP4 127.0.0.3" />
+ <test assign_to="emptyinv1" variable="result" compare="not_equal" value="" />
+ </action>
+ </recv>
+
+ <nop condexec="emptyinv1">
+ <action>
+ <error message="Side A - Contact SDP for directmedia reinvite did not match - expected 'c=IN IP4 127.0.0.3' but got [$1]" />
+ </action>
+ </nop>
+
+ <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:[field0]@[local_ip]:[local_port];transport=[transport]>
+ Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER
+ Supported: 100rel,replaces
+ User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
+ Accept-Language: en
+ Testsuite-Track-Phone-A: 1
+ Content-Type: application/sdp
+ Content-Length: [len]
+
+ v=0
+ o=- 1324901698 1324901698 IN IP4 [local_ip]
+ s=Polycom IP Phone
+ c=IN IP4 [local_ip]
+ t=0 0
+ a=sendrecv
+ m=audio 2226 RTP/AVP 0 101
+ a=sendrecv
+ a=rtpmap:0 PCMU/8000
+ a=rtpmap:101 telephone-event/8000
+ ]]>
+ </send>
+
+ <recv request="ACK"/>
+
+ <!-- Reinvite received for T38 - media flows between Enpoint A and Asterisk -->
+ <recv request="INVITE">
+ <action>
+ <ereg regexp="c=IN IP4 127.0.0.1" search_in="body" check_it="true" assign_to="1" />
+ <log message="Side A - Contact SDP for T38 reinvite matches expectations: [$1]." />
+ <strcmp assign_to="result" variable="1" value="c=IN IP4 127.0.0.1" />
+ <test assign_to="emptyinv2" variable="result" compare="not_equal" value="" />
+ </action>
+ </recv>
+
+ <nop condexec="emptyinv2">
+ <action>
+ <error message="Side A - Contact SDP for T38 reinvite did not match - expected 'c=IN IP4 127.0.0.1' but got [$1]" />
+ </action>
+ </nop>
+
+ <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:[field0]@[local_ip]:[local_port];transport=[transport]>
+ Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER
+ Supported: 100rel,replaces
+ User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
+ Accept-Language: en
+ Testsuite-Track-Phone-A: 2
+ Content-Type: application/sdp
+ Content-Length: [len]
+
+ v=0
+ o=- 1324901698 1324901700 IN IP4 [local_ip]
+ s=Polycom IP Phone
+ c=IN IP4 [local_ip]
+ t=0 0
+ m=image 10972 udptl t38
+ a=sendrecv
+ a=T38FaxVersion:0
+ a=T38MaxBitRate:9600
+ a=T38FaxMaxBuffer:1024
+ a=T38FaxMaxDatagram:400
+ a=T38FaxRateManagement:transferredTCF
+ a=T38FaxUdpEC:t38UDPRedundancy
+ ]]>
+ </send>
+
+ <recv request="ACK"/>
+
+ <!-- Reinvite received when phone B hangs up - media flows between phone A and Asterisk -->
+ <recv request="INVITE"/>
+
+ <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:[field0]@[local_ip]:[local_port];transport=[transport]>
+ Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER
+ Supported: 100rel,replaces
+ User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
+ Accept-Language: en
+ Testsuite-Track-Phone-A: 3
+ Content-Type: application/sdp
+ Content-Length: [len]
+
+ v=0
+ o=- 1324901698 1324901700 IN IP4 [local_ip]
+ s=Polycom IP Phone
+ c=IN IP4 [local_ip]
+ t=0 0
+ m=image 10972 udptl t38
+ a=sendrecv
+ a=T38FaxVersion:0
+ a=T38MaxBitRate:9600
+ a=T38FaxUdpEC:t38UDPRedundancy
+ ]]>
+ </send>
+
+ <recv request="ACK"/>
+
+ <recv request="BYE"/>
+
+ <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:[field0]@[local_ip]:[local_port];transport=[transport]>
+ Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER
+ Supported: 100rel,replaces
+ User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
+ Accept-Language: en
+ Testsuite-Track-Phone-A: 5
+ Content-Type: application/sdp
+ Content-Length: 0
+ ]]>
+ </send>
+
+</scenario>
+
Propchange: asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/sipp/endpoint_A.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/sipp/endpoint_A.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/sipp/endpoint_A.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/sipp/endpoint_B.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/sipp/endpoint_B.xml?view=auto&rev=4516
==============================================================================
--- asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/sipp/endpoint_B.xml (added)
+++ asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/sipp/endpoint_B.xml Mon Dec 23 19:47:06 2013
@@ -1,0 +1,224 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Phone B Hold with Media Restrictions">
+ <Global variables="remote_tag"/>
+
+ <recv request="INVITE" crlf="true">
+ <action>
+ <ereg regexp=".*(;tag=.*)"
+ header="From:"
+ search_in="hdr"
+ check_it="true"
+ assign_to="remote_tag"/>
+ </action>
+ </recv>
+
+ <send>
+ <![CDATA[
+ SIP/2.0 100 Trying
+ [last_Via:]
+ [last_From:]
+ [last_To:];tag=[call_number]
+ [last_Call-ID:]
+ [last_CSeq:]
+ Contact: <sip:[field1]@[local_ip]:[local_port];transport=[transport]>
+ User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
+ Accept-Language: en
+ Content-Length: 0
+ ]]>
+ </send>
+
+ <send>
+ <![CDATA[
+ SIP/2.0 180 Ringing
+ [last_Via:]
+ [last_From:]
+ [last_To:];tag=[call_number]
+ [last_Call-ID:]
+ [last_CSeq:]
+ Contact: <sip:[field1]@[local_ip]:[local_port];transport=[transport]>
+ User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
+ Allow-Events: talk,hold,conference
+ Accept-Language: en
+ Content-Length: 0
+ ]]>
+ </send>
+
+ <pause milliseconds="200"/>
+
+ <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:[field1]@[local_ip]:[local_port];transport=[transport]>
+ Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER
+ Supported: 100rel,replaces
+ User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
+ Accept-Language: en
+ Testsuite-Track-Phone-B-Media-Restrict: 1
+ Content-Type: application/sdp
+ Content-Length: [len]
+
+ v=0
+ o=- 1324901698 1324901698 IN IP4 [local_ip]
+ s=Polycom IP Phone
+ c=IN IP4 [local_ip]
+ t=0 0
+ a=sendrecv
+ m=audio 2226 RTP/AVP 0 101
+ a=sendrecv
+ a=rtpmap:0 PCMU/8000
+ a=rtpmap:101 telephone-event/8000
+ ]]>
+ </send>
+
+ <!-- RECV ACK -->
+ <recv request="ACK"/>
+
+ <recv request="INVITE">
+ <action>
+ <ereg regexp="c=IN IP4 127.0.0.2" search_in="body" check_it="true" assign_to="1" />
+ <log message="Side B - Contact SDP for directmedia reinvite matches expectations: [$1]." />
+ <strcmp assign_to="result" variable="1" value="c=IN IP4 127.0.0.2" />
+ <test assign_to="emptyinv1" variable="result" compare="not_equal" value="" />
+ </action>
+ </recv>
+
+ <nop condexec="emptyinv1">
+ <action>
+ <error message="Side B - Contact SDP for directmedia reinvite did not match - expected 'c=IN IP4 127.0.0.2' but got [$1]" />
+ </action>
+ </nop>
+
+ <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:[field1]@[local_ip]:[local_port];transport=[transport]>
+ Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER
+ Supported: 100rel,replaces
+ User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
+ Accept-Language: en
+ Testsuite-Track-Phone-B-Media-Restrict: 2
+ Content-Type: application/sdp
+ Content-Length: [len]
+
+ v=0
+ o=- 1324901698 1324901698 IN IP4 [local_ip]
+ s=Polycom IP Phone
+ c=IN IP4 [local_ip]
+ t=0 0
+ a=sendrecv
+ m=audio 2226 RTP/AVP 0 101
+ a=sendrecv
+ a=rtpmap:0 PCMU/8000
+ a=rtpmap:101 telephone-event/8000
+ ]]>
+ </send>
+
+ <recv request="ACK"/>
+
+ <!-- Wait some period of time -->
+ <pause milliseconds="1500"/>
+
+ <!-- Reinvite to set up T38 Fax session -->
+ <send retrans="500">
+ <![CDATA[
+ INVITE sip:[field0]@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: [field1] <sip:[field1]@[local_ip]:[local_port]>;tag=[call_number]
+ To: [field0] <sip:[field1]@[remote_ip]>
+ CSeq: [cseq] INVITE
+ [last_Call-ID:]
+ Contact: <sip:[field1]@[local_ip]:[local_port]>
+ Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER
+ User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
+ Accept-Language: en
+ Supported: 100rel,replaces
+ Allow-Events: talk,hold,conference
+ Max-Forwards: 70
+ Content-Type: application/sdp
+ Content-Length: [len]
+
+ v=0
+ o=- 1324901698 1324901700 IN IP4 [local_ip]
+ s=Polycom IP Phone
+ c=IN IP4 [local_ip]
+ t=0 0
+ m=image 30002 udptl t38
+ a=sendrecv
+ a=T38FaxVersion:0
+ a=T38MaxBitRate:9600
+ a=T38FaxMaxBuffer:1024
+ a=T38FaxMaxDatagram:400
+ a=T38FaxRateManagement:transferredTCF
+ a=T38FaxUdpEC:t38UDPRedundancy
+ ]]>
+ </send>
+
+ <recv response="100" optional="true" />
+
+ <recv response="200">
+ <action>
+ <ereg regexp="c=IN IP4 127.0.0.1" search_in="body" check_it="true" assign_to="1" />
+ <log message="Side B - Contact SDP for T38 reinvite 200 OK matches expectations: [$1]." />
+ <strcmp assign_to="result" variable="1" value="c=IN IP4 127.0.0.1" />
+ <test assign_to="empty200" variable="result" compare="not_equal" value="" />
+ </action>
+ </recv>
+
+ <nop condexec="empty200">
+ <action>
+ <error message="Side B - Contact SDP for T38 reinvite 200 OK did not match - expected 'c=IN IP4 127.0.0.1' but got [$1]" />
+ </action>
+ </nop>
+
+
+ <send>
+ <![CDATA[
+ ACK sip:[field1]@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: [field1] <sip:[field1]@[local_ip]>;tag=[call_number]
+ To: <sip:[field0]@[remote_ip];user=[field0]>[peer_tag_param]
+ CSeq: [cseq] ACK
+ [last_Call-ID:]
+ Contact: <sip:[field1]@[local_ip]:[local_port]>
+ Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER
+ User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
+ Accept-Language: en
+ Max-Forwards: 70
+ Content-Length: 0
+ ]]>
+ </send>
+
+ <!-- Wait some period of time -->
+ <pause milliseconds="1500"/>
+
+ <send>
+ <![CDATA[
+ BYE sip:[field1]@1[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/UDP [local_ip]:[local_port];branch=[branch]
+ From: [field1] <sip:[field1]@[local_ip]:[local_port]>;tag=[call_number]
+ To: [field0] <sip:[field1]@[remote_ip]>[$remote_tag]
+ CSeq: [cseq] BYE
+ [last_Call-ID:]
+ Contact: <sip:[field1]@[local_ip]:[local_port]>
+ User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
+ Accept-Language: en
+ Max-Forwards: 70
+ Content-Length: 0
+ ]]>
+ </send>
+
+
+</scenario>
+
Propchange: asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/sipp/endpoint_B.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/sipp/endpoint_B.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/sipp/endpoint_B.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/sipp/inject_bridge.csv
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/sipp/inject_bridge.csv?view=auto&rev=4516
==============================================================================
--- asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/sipp/inject_bridge.csv (added)
+++ asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/sipp/inject_bridge.csv Mon Dec 23 19:47:06 2013
@@ -1,0 +1,3 @@
+SEQUENTIAL
+endpoint_A;endpoint_B;basicdial
+
Propchange: asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/sipp/inject_bridge.csv
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/sipp/inject_bridge.csv
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/sipp/inject_bridge.csv
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/test-config.yaml?view=auto&rev=4516
==============================================================================
--- asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/test-config.yaml (added)
+++ asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/test-config.yaml Mon Dec 23 19:47:06 2013
@@ -1,0 +1,30 @@
+testinfo:
+ summary: 'Test SIP reinvite from directmedia to T.38 FAX'
+ description: |
+ Two devices are in a normal Audio call using directmedia when one does
+ a reinvite to start a T.38 Fax session. This tests that the Fax
+ session reinvite is issued correctly and includes the necessary SDP
+ contact information for Asterisk to be in the path of the fax media.
+
+test-modules:
+ add-test-to-search-path: 'True'
+ test-object:
+ config-section: test-object-config
+ typename: 'sipp.SIPpTestCase'
+
+test-object-config:
+ fail-on-any: False
+ test-iterations:
+ -
+ scenarios:
+ - { 'key-args': {'scenario': 'endpoint_A.xml', '-i': '127.0.0.2', '-p': '5060', '-inf': 'inject_bridge.csv'} }
+ - { 'key-args': {'scenario': 'endpoint_B.xml', '-i': '127.0.0.3', '-p': '5060', '-inf': 'inject_bridge.csv'} }
+
+properties:
+ minversion: '12'
+ dependencies:
+ - sipp :
+ version : 'v3.0'
+ tags:
+ - pjsip
+ - fax
Propchange: asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/test-config.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/test-config.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/fax/pjsip/directmedia_reinvite_t38/test-config.yaml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast1/extensions.conf?view=auto&rev=4516
==============================================================================
--- asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast1/extensions.conf Mon Dec 23 19:47:06 2013
@@ -1,0 +1,14 @@
+[receivefax]
+exten => 1234,1,noop
+exten => 1234,n,ReceiveFax(${ASTDATADIR}/receive.tiff)
+
+exten => h,1,noop
+exten => h,n,UserEvent(FaxStatus,operation: receive,status: ${FAXOPT(status)},statusstr: ${FAXOPT(statusstr)},error: ${FAXOPT(error)})
+
+[sendfax]
+exten => 1234,1,noop
+exten => 1234,n,SendFax(${ASTDATADIR}/send.tiff)
+
+exten => h,1,noop
+exten => h,n,UserEvent(FaxStatus,operation: send,status: ${FAXOPT(status)},statusstr: ${FAXOPT(statusstr)},error: ${FAXOPT(error)})
+
Propchange: asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast1/pjsip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast1/pjsip.conf?view=auto&rev=4516
==============================================================================
--- asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast1/pjsip.conf (added)
+++ asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast1/pjsip.conf Mon Dec 23 19:47:06 2013
@@ -1,0 +1,15 @@
+[local-transport]
+type=transport
+protocol=udp
+bind=127.0.0.1
+
+[endpoint-template](!)
+type=endpoint
+context=default
+allow=!all,ulaw,alaw
+t38_udptl=yes
+context=receivefax
+media_address=127.0.0.1
+
+[ast2-t38](endpoint-template)
+from_user=ast1-t38
Propchange: asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast2/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast2/extensions.conf?view=auto&rev=4516
==============================================================================
--- asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast2/extensions.conf (added)
+++ asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast2/extensions.conf Mon Dec 23 19:47:06 2013
@@ -1,0 +1,8 @@
+[gatewayfax]
+exten => 1234,1,noop
+exten => 1234,n,Set(FAXOPT(gateway)=yes)
+exten => 1234,n,Dial(PJSIP/ast1-t38/sip:1234 at 127.0.0.1)
+
+exten => h,1,noop
+exten => h,n,UserEvent(FaxStatus,operation: gateway,status: ${FAXOPT(status)},statusstr: ${FAXOPT(statusstr)},error: ${FAXOPT(error)})
+
Propchange: asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast2/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast2/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast2/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast2/pjsip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast2/pjsip.conf?view=auto&rev=4516
==============================================================================
--- asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast2/pjsip.conf (added)
+++ asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast2/pjsip.conf Mon Dec 23 19:47:06 2013
@@ -1,0 +1,15 @@
+[local-transport]
+type=transport
+protocol=udp
+bind=127.0.0.2
+
+[endpoint-template](!)
+type=endpoint
+context=default
+allow=!all,ulaw,alaw
+t38_udptl=yes
+context=gatewayfax
+media_address=127.0.0.2
+
+[ast1-t38](endpoint-template)
+from_user=ast2-t38
Propchange: asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast2/pjsip.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast2/pjsip.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast2/pjsip.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast2/sip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast2/sip.conf?view=auto&rev=4516
==============================================================================
--- asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast2/sip.conf (added)
+++ asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast2/sip.conf Mon Dec 23 19:47:06 2013
@@ -1,0 +1,25 @@
+[general]
+bindaddr = 127.0.0.2
+
+[ast1-g711]
+type = friend
+fromuser = ast2-g711
+context = gatewayfax
+host = 127.0.0.1
+t38pt_udptl = no
+disallow = all
+allow = ulaw
+qualify = no
+insecure = invite
+
+[ast1-t38]
+type = friend
+fromuser = ast2-t38
+context = gatewayfax
+host = 127.0.0.1
+t38pt_udptl = yes
+disallow = all
+allow = gsm
+qualify = no
+insecure = invite
+
Propchange: asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast2/sip.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast2/sip.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/fax/pjsip/gateway_native_t38/configs/ast2/sip.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/fax/pjsip/gateway_native_t38/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/fax/pjsip/gateway_native_t38/run-test?view=auto&rev=4516
==============================================================================
--- asterisk/trunk/tests/fax/pjsip/gateway_native_t38/run-test (added)
+++ asterisk/trunk/tests/fax/pjsip/gateway_native_t38/run-test Mon Dec 23 19:47:06 2013
@@ -1,0 +1,113 @@
+#!/usr/bin/env python
+# vim: sw=3 et:
+'''
+Copyright (C) 2011, Digium, Inc.
+Matthew Nicholson <mnicholson at digium.com>
+
+This program is free software, distributed under the terms of
+the GNU General Public License Version 2.
+'''
+
+import sys
+import logging
+import os
+import re
+import shutil
+
+from twisted.internet import reactor
+
+sys.path.append("lib/python")
+from asterisk.asterisk import Asterisk
+from asterisk.TestCase import TestCase
+
+logger = logging.getLogger(__name__)
+
+class GatewayTest(TestCase):
+ event_count = 0
+ success_count = 0
+
+ def __init__(self):
+ TestCase.__init__(self)
+ self.reactor_timeout = 120
+ self.create_asterisk(2)
+
+ # copy the tiff file we are going to send to a good known location
+ shutil.copy("%s/send.tiff" % (os.path.dirname(os.path.realpath(__file__)),), "%s%s" % (self.ast[0].base, self.ast[0].directories['astdatadir']))
+
+ def ami_connect(self, ami):
+ if ami.id == 0:
+
+ logger.info("Sending a call from Asterisk 1 to Asterisk 2")
+
+ ami.registerEvent('UserEvent', self.fax_result)
+ df = ami.originate("PJSIP/ast2-t38/sip:1234 at 127.0.0.2", "sendfax", "1234", 1)
+
+ def handle_failure(reason):
+ logger.error("Error sending originate")
+ logger.error(reason.getTraceback())
+ self.stop_reactor()
+
+ return reason
+
+ df.addErrback(handle_failure)
+ else:
+ ami.registerEvent('UserEvent', self.fax_gateway_result)
+
+ def fax_gateway_result(self, ami, event):
+ if event['userevent'] != 'FaxStatus':
+ return
+
+ self.event_count += 1
+
+ if event['status'] == "SUCCESS" and event['error'] == "NATIVE_T38":
+ logger.info("Successful gateway operation")
+ self.success_count += 1
+ else:
+ logger.info("gateway result should have been SUCCESS with error NATIVE_T38")
+ logger.info("status: %s" % (event['status'],))
+ logger.info("error: %s" % (event['error'],))
+ logger.info("statusstr: %s" % (event['statusstr'],))
+
+ self.are_we_there_yet()
+
+ def fax_result(self, ami, event):
+ if event['userevent'] != 'FaxStatus':
+ return
+
+ self.event_count += 1
+
+ if event['status'] == "SUCCESS":
+ logger.info("successful %s through gateway" % (event['operation'],))
+ self.success_count += 1
+ else:
+ logger.error("error sending fax through gateway:")
+ logger.error("operation: %s" % (event['operation'],))
+ logger.error("status: %s" % (event['status'],))
+ logger.error("error: %s" % (event['error'],))
+ logger.error("statusstr: %s" % (event['statusstr'],))
+
+ self.are_we_there_yet()
+
+ def are_we_there_yet(self):
+ if self.event_count == 3:
+ if self.success_count == 3:
+ self.passed = True
+ self.stop_reactor()
+
+ def run(self):
+ TestCase.run(self)
+ self.create_ami_factory(2)
+
+
+def main():
+ test = GatewayTest()
+ reactor.run()
+
+ if not test.passed:
+ return 1
+
+ return 0
+
+if __name__ == "__main__":
+ sys.exit(main() or 0)
+
Propchange: asterisk/trunk/tests/fax/pjsip/gateway_native_t38/run-test
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/fax/pjsip/gateway_native_t38/run-test
------------------------------------------------------------------------------
svn:executable = *
[... 845 lines stripped ...]
More information about the asterisk-commits
mailing list