Index: tests/channels/SIP/tests.yaml
===================================================================
--- tests/channels/SIP/tests.yaml (revision 4212)
+++ tests/channels/SIP/tests.yaml (working copy)
@@ -59,3 +59,4 @@
- dir: 'session_timers'
- test: 'path'
- test: 'alwaysauthreject'
+ - test: 'route'
Index: tests/channels/SIP/route/sipp/send-invite.xml
===================================================================
--- tests/channels/SIP/route/sipp/send-invite.xml (revision 0)
+++ tests/channels/SIP/route/sipp/send-invite.xml (working copy)
@@ -0,0 +1,141 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ;tag=[call_number]
+ To:
+ Call-ID: [call_id]
+ CSeq: [cseq] INVITE
+ Contact: sip:51@[local_ip]:[local_port]
+ Record-Route: [$rr_out]
+ Max-Forwards: 100
+ 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 8
+ a=rtpmap:8 PCMA/8000
+
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ;tag=[call_number]
+ [last_To:]
+ [routes]
+ Call-ID: [call_id]
+ CSeq: [cseq] ACK
+ Contact: sip:51@[local_ip]:[local_port]
+ Max-Forwards: 100
+ Content-Length: 0
+
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Content-Length: 0
+
+ ]]>
+
+
+
+
Index: tests/channels/SIP/route/sipp/recv-invite.xml
===================================================================
--- tests/channels/SIP/route/sipp/recv-invite.xml (revision 0)
+++ tests/channels/SIP/route/sipp/recv-invite.xml (working copy)
@@ -0,0 +1,135 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Content-Length: 0
+
+ ]]>
+
+
+
+
+ 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
+
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Content-Length: 0
+
+ ]]>
+
+
+
+
Index: tests/channels/SIP/route/test-config.yaml
===================================================================
--- tests/channels/SIP/route/test-config.yaml (revision 0)
+++ tests/channels/SIP/route/test-config.yaml (working copy)
@@ -0,0 +1,41 @@
+testinfo:
+ summary: 'SIP Record-Route Support'
+ description: |
+ 'This test verifies SIP Record-Route handling for incoming calls.
+ Test includes loose and strict routes.'
+
+properties:
+ minversion: '1.8.0'
+ dependencies:
+ - python : 'twisted'
+ - python : 'starpy'
+ - app : 'sipp'
+ - asterisk : 'chan_sip'
+ tags:
+ - SIP
+
+test-modules:
+ test-object:
+ config-section: sipp-config
+ typename: 'sipp.SIPpTestCase'
+ modules:
+ # Need to originate exactly 2 channels for recv-invite.
+ -
+ config-section: originator-recv-invite
+ typename: 'PluggableModules.Originator'
+ -
+ config-section: originator-recv-invite
+ typename: 'PluggableModules.Originator'
+
+originator-recv-invite:
+ application: 'Wait'
+ data: '1'
+ trigger: 'ami_connect'
+
+sipp-config:
+ fail-on-any: True
+ test-iterations:
+ -
+ scenarios:
+ - { 'key-args': {'scenario': 'send-invite.xml', '-p': '5061', '-m': '2', },}
+ - { 'key-args': {'scenario': 'recv-invite.xml', '-p': '5062', '-m': '2', },}
Index: tests/channels/SIP/route/configs/ast1/sip.conf
===================================================================
--- tests/channels/SIP/route/configs/ast1/sip.conf (revision 0)
+++ tests/channels/SIP/route/configs/ast1/sip.conf (working copy)
@@ -0,0 +1,7 @@
+[general]
+udpbindaddr=127.0.0.1
+
+[ua1]
+type=peer
+host=127.0.0.1
+port=5062
Index: tests/channels/SIP/route/configs/ast1/extensions.conf
===================================================================
--- tests/channels/SIP/route/configs/ast1/extensions.conf (revision 0)
+++ tests/channels/SIP/route/configs/ast1/extensions.conf (working copy)
@@ -0,0 +1,8 @@
+[default]
+exten => s,1,Answer()
+same => n,Dial(SIP/ua1,1)
+same => n,Hangup()
+
+exten => _XX,1,Ringing()
+same => n,Answer()
+same => n,Hangup()