[asterisk-commits] pjsip: Add blonde transfer tests and connected line update c... (testsuite[master])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jun 15 16:12:12 CDT 2015
Matt Jordan has submitted this change and it was merged.
Change subject: pjsip: Add blonde transfer tests and connected line update checks.
......................................................................
pjsip: Add blonde transfer tests and connected line update checks.
Both the caller and callee initiated nominal local attended transfer tests
have been updated to include checking for connected line updates on
completion of the attended transfer. If they do not occur or the values do not
match who the other side should be the test will now fail.
Blonde attended transfer tests have also been added. A blonde transfer is
when an attended transfer is completed before the new called party has
actually answered. These tests mirror that of the nominal case and ensure
that channels are bridged as expected and that connected line updates
occur.
ASTERISK-25157
Change-Id: I5aa4aee05ae4bbd3e6fc110e608459b4c102b725
---
M tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local/configs/ast1/pjsip.conf
M tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local/sipp/uac-no-hangup.xml
M tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local/sipp/uas.xml
M tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local/test-config.yaml
A tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local_blonde/configs/ast1/extensions.conf
A tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local_blonde/configs/ast1/pjsip.conf
A tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local_blonde/sipp/referee.xml
A tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local_blonde/sipp/referer_uas.xml
A tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local_blonde/sipp/uac-no-hangup.xml
A tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local_blonde/sipp/uas.xml
A tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local_blonde/test-config.yaml
M tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local/configs/ast1/pjsip.conf
M tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local/sipp/uas.xml
M tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local/test-config.yaml
A tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local_blonde/configs/ast1/extensions.conf
A tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local_blonde/configs/ast1/pjsip.conf
A tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local_blonde/sipp/referee.xml
A tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local_blonde/sipp/referer.xml
A tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local_blonde/sipp/uas.xml
A tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local_blonde/sipp/uas_hangup.xml
A tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local_blonde/test-config.yaml
M tests/channels/pjsip/transfers/attended_transfer/nominal/tests.yaml
22 files changed, 1,671 insertions(+), 3 deletions(-)
Approvals:
Mark Michelson: Looks good to me, but someone else must approve
Matt Jordan: Looks good to me, approved; Verified
diff --git a/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local/configs/ast1/pjsip.conf b/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local/configs/ast1/pjsip.conf
index 2f5cea8..2ef5dbe 100644
--- a/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local/configs/ast1/pjsip.conf
+++ b/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local/configs/ast1/pjsip.conf
@@ -9,11 +9,15 @@
disallow=all
allow=ulaw
direct_media=no
+send_pai=yes
+send_rpid=yes
[alice](endpoint)
+callerid=Alice <alice>
[bob](endpoint)
aors=bob
+callerid=Bob <bob>
[bob]
type=aor
@@ -21,10 +25,11 @@
[charlie](endpoint)
aors=charlie
+callerid=Charlie <charlie>
[charlie]
type=aor
contact=sip:charlie at 127.0.0.1:5067
[david](endpoint)
-
+callerid=David <david>
diff --git a/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local/sipp/uac-no-hangup.xml b/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local/sipp/uac-no-hangup.xml
index a3d3330..305133e 100644
--- a/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local/sipp/uac-no-hangup.xml
+++ b/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local/sipp/uac-no-hangup.xml
@@ -62,6 +62,48 @@
]]>
</send>
+ <recv request="INVITE">
+ <action>
+ <ereg regexp="\"Charlie\" <sip:charlie at 127.0.0.1>"
+ header="P-Asserted-Identity"
+ search_in="hdr"
+ check_it="true"
+ assign_to="asserted_identity"/>
+ <ereg regexp="\"Charlie\" <sip:charlie at 127.0.0.1>"
+ header="Remote-Party-ID"
+ search_in="hdr"
+ check_it="true"
+ assign_to="remote_party_id"/>
+ </action>
+ </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-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 request="ACK">
+ </recv>
+
<recv request="BYE">
</recv>
@@ -86,5 +128,8 @@
<CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
+ <Reference variables="asserted_identity" />
+ <Reference variables="remote_party_id" />
+
</scenario>
diff --git a/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local/sipp/uas.xml b/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local/sipp/uas.xml
index c15cd0c..9eec4b8 100644
--- a/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local/sipp/uas.xml
+++ b/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local/sipp/uas.xml
@@ -82,6 +82,48 @@
crlf="true">
</recv>
+ <recv request="INVITE">
+ <action>
+ <ereg regexp="\"Alice\" <sip:alice at 127.0.0.1>"
+ header="P-Asserted-Identity"
+ search_in="hdr"
+ check_it="true"
+ assign_to="asserted_identity"/>
+ <ereg regexp="\"Alice\" <sip:alice at 127.0.0.1>"
+ header="Remote-Party-ID"
+ search_in="hdr"
+ check_it="true"
+ assign_to="remote_party_id"/>
+ </action>
+ </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-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 request="ACK">
+ </recv>
+
<recv request="BYE">
</recv>
@@ -111,5 +153,8 @@
<!-- definition of the call length repartition table (unit is ms) -->
<CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
+ <Reference variables="asserted_identity" />
+ <Reference variables="remote_party_id" />
+
</scenario>
diff --git a/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local/test-config.yaml b/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local/test-config.yaml
index 17df5dc..033ced7 100644
--- a/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local/test-config.yaml
+++ b/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local/test-config.yaml
@@ -2,11 +2,12 @@
summary: Test performing a callee-initiated attended transfer via chan_pjsip.
description: |
"Start four SIPp scenarios that do the following:
- SIPp #1 (uac.xml) calls through Asterisk to SIPp #2 (referer_uas.xml)
- SIPp #2 kicks off SIPp #3 which calls SIPp #4.
+ SIPp #1 (uac-no-hangup.xml) calls through Asterisk to SIPp #2 (referer_uas.xml)
+ SIPp #2 kicks off SIPp #3 (referee.xml) which calls SIPp #4 (uas.xml).
SIPp #3 passes call information back to SIPp #2.
SIPp #2 initiates an attended transfer via REFER with Replaces information from SIPp #3.
SIPp #1 and SIPp #4 are bridged.
+ SIPp #1 and SIPp #4 receive connected line updates and the values are checked.
SIPp #2 and SIPp #3 are hung up.
SIPp #1 and SIPp #4 are hung up."
diff --git a/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local_blonde/configs/ast1/extensions.conf b/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local_blonde/configs/ast1/extensions.conf
new file mode 100644
index 0000000..5dc3863
--- /dev/null
+++ b/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local_blonde/configs/ast1/extensions.conf
@@ -0,0 +1,8 @@
+[default]
+exten => call_c,1,NoOp()
+ same => n,Dial(PJSIP/charlie)
+ same => n,Hangup()
+
+exten => alice,1,NoOp()
+ same => n,Dial(PJSIP/bob)
+ same => n,Hangup()
diff --git a/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local_blonde/configs/ast1/pjsip.conf b/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local_blonde/configs/ast1/pjsip.conf
new file mode 100644
index 0000000..2ef5dbe
--- /dev/null
+++ b/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local_blonde/configs/ast1/pjsip.conf
@@ -0,0 +1,35 @@
+[local]
+type=transport
+protocol=udp
+bind=127.0.0.1:5060
+
+[endpoint](!)
+type=endpoint
+context=default
+disallow=all
+allow=ulaw
+direct_media=no
+send_pai=yes
+send_rpid=yes
+
+[alice](endpoint)
+callerid=Alice <alice>
+
+[bob](endpoint)
+aors=bob
+callerid=Bob <bob>
+
+[bob]
+type=aor
+contact=sip:bob at 127.0.0.1:5066
+
+[charlie](endpoint)
+aors=charlie
+callerid=Charlie <charlie>
+
+[charlie]
+type=aor
+contact=sip:charlie at 127.0.0.1:5067
+
+[david](endpoint)
+callerid=David <david>
diff --git a/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local_blonde/sipp/referee.xml b/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local_blonde/sipp/referee.xml
new file mode 100644
index 0000000..819fb4e
--- /dev/null
+++ b/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local_blonde/sipp/referee.xml
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<!-- This program is free software; you can redistribute it and/or -->
+<!-- modify it under the terms of the GNU General Public License as -->
+<!-- published by the Free Software Foundation; either version 2 of the -->
+<!-- License, or (at your option) any later version. -->
+<!-- -->
+<!-- This program is distributed in the hope that it will be useful, -->
+<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
+<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
+<!-- GNU General Public License for more details. -->
+<!-- -->
+<!-- You should have received a copy of the GNU General Public License -->
+<!-- along with this program; if not, write to the -->
+<!-- Free Software Foundation, Inc., -->
+<!-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -->
+<!-- -->
+
+<scenario name="Referee Leg">
+
+ <recvCmd>
+ <action>
+ <ereg regexp="REMOTE(.*)"
+ search_in="hdr"
+ header="Call-ID:"
+ check_it="true"
+ assign_to="1,original_callid" />
+ </action>
+ </recvCmd>
+
+ <send retrans="500">
+ <![CDATA[
+
+ INVITE sip:call_c@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: <sip:bob@[local_ip]:[local_port]>;tag=[call_number]
+ To: <sip:transfer@[remote_ip]:[remote_port]>
+ Call-ID: [call_id]
+ CSeq: [cseq] INVITE
+ Contact: <sip:bob@[local_ip]:[local_port]>
+ Max-Forwards: 70
+ Content-Type: application/sdp
+ Content-Length: [len]
+
+ v=0
+ o=- 1324901698 1324901698 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 101
+ a=sendrecv
+ a=rtpmap:0 PCMU/8000
+ a=rtpmap:101 telephone-event/8000
+
+ ]]>
+ </send>
+
+ <recv response="100" optional="true" />
+ <recv response="101" optional="true" />
+ <recv response="180">
+ <action>
+ <ereg regexp="tag=([[:alnum:].\-]*)"
+ search_in="hdr"
+ header="To:"
+ check_it="true"
+ assign_to="2,to_tag" />
+ <ereg regexp="tag=([[:alnum:].\-]*)"
+ search_in="hdr"
+ header="From:"
+ check_it="true"
+ assign_to="3,from_tag" />
+ </action>
+ </recv>
+ <Reference variables="1,2,3" />
+
+ <pause milliseconds="1000" />
+ <sendCmd>
+ <![CDATA[
+ Call-ID: [$original_callid]
+ Remote-To-Tag: [$to_tag]
+ Remote-From-Tag: [$from_tag]
+ Remote-URI: sip:call_c@[remote_ip]:[remote_port]
+ ]]>
+ </sendCmd>
+
+ <recv response="603" />
+
+ <send>
+ <![CDATA[
+
+ ACK sip:call_c@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];rport;branch=[branch]
+ [last_From:]
+ [last_To]
+ Call-ID: [call_id]
+ CSeq: [cseq] ACK
+ Contact: sip:bob@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <!-- 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>
+
diff --git a/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local_blonde/sipp/referer_uas.xml b/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local_blonde/sipp/referer_uas.xml
new file mode 100644
index 0000000..329ffa2
--- /dev/null
+++ b/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local_blonde/sipp/referer_uas.xml
@@ -0,0 +1,218 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<!-- This program is free software; you can redistribute it and/or -->
+<!-- modify it under the terms of the GNU General Public License as -->
+<!-- published by the Free Software Foundation; either version 2 of the -->
+<!-- License, or (at your option) any later version. -->
+<!-- -->
+<!-- This program is distributed in the hope that it will be useful, -->
+<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
+<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
+<!-- GNU General Public License for more details. -->
+<!-- -->
+<!-- You should have received a copy of the GNU General Public License -->
+<!-- along with this program; if not, write to the -->
+<!-- Free Software Foundation, Inc., -->
+<!-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -->
+<!-- -->
+
+<scenario name="Referer Leg">
+ <recv request="INVITE" crlf="true" />
+
+ <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=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 request="ACK"
+ rtd="true"
+ crlf="true">
+ <action>
+ <ereg regexp=" (.+)"
+ search_in="hdr"
+ header="From:"
+ check_it="true"
+ assign_to="1,outbound_to_header" />
+ <ereg regexp=" (.+)"
+ search_in="hdr"
+ header="To:"
+ check_it="true"
+ assign_to="1,outbound_from_header" />
+ </action>
+ </recv>
+
+ <!-- Put this leg on hold -->
+ <send retrans="500">
+ <![CDATA[
+
+ INVITE sip:[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/UDP [local_ip]:[local_port];rport;received=127.0.0.1;branch=[branch]
+ From: [$outbound_from_header]
+ To: [$outbound_to_header]
+ Call-ID: [call_id]
+ CSeq: [cseq] INVITE
+ Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+ Content-Type: application/sdp
+ Max-Forwards: 70
+ Content-Length: [len]
+
+ v=0
+ o=- 1324901698 1324901698 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 101
+ a=sendonly
+ a=rtpmap:0 PCMU/8000
+ a=rtpmap:101 telephone-event/8000
+
+ ]]>
+ </send>
+
+ <recv response="100" optional="true" />
+ <recv response="101" optional="true" />
+ <recv response="180" optional="true" />
+ <recv response="200" rtd="true" crlf="true" />
+
+ <send>
+ <![CDATA[
+
+ ACK sip:[local_ip]:[local_port] SIP/2.0
+ [last_Via]
+ [last_From]
+ [last_To]
+ Call-ID: [call_id]
+ CSeq: [cseq] ACK
+ Contact: sip:bob@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <sendCmd>
+ <![CDATA[
+ Call-ID: REMOTE[call_id]
+ Start the Echo Leg
+ ]]>
+ </sendCmd>
+
+ <recvCmd>
+ <action>
+ <ereg regexp=" (.+)"
+ search_in="hdr"
+ header="Remote-URI:"
+ check_it="true"
+ assign_to="1,remote_contact" />
+ <ereg regexp=" (.+)"
+ search_in="hdr"
+ header="Remote-To-Tag:"
+ check_it="true"
+ assign_to="2,remote_to_tag" />
+ <ereg regexp=" (.+)"
+ search_in="hdr"
+ header="Remote-From-Tag:"
+ check_it="true"
+ assign_to="3,remote_from_tag" />
+ </action>
+ </recvCmd>
+ <Reference variables="1,2,3" />
+
+ <send>
+ <![CDATA[
+
+ REFER sip:call_c@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ [last_From:]
+ [last_To]
+ [last_Call-ID:]
+ CSeq: [cseq] REFER
+ Contact: <sip:bob@[local_ip]:[local_port]>
+ Max-Forwards: 70
+ Refer-to: <[$remote_contact]?Replaces=REMOTE[call_id]%3Bto-tag%3D[$remote_to_tag]%3Bfrom-tag%3D[$remote_from_tag]>
+ Referred-By: sip:bob@[local_ip]
+ Content-Length: 0
+
+ ]]>
+ </send>
+ <recv response="202" rtd="true" crlf="true" />
+
+ <recv request="NOTIFY" />
+ <send>
+ <![CDATA[
+
+ SIP/2.0 200 OK
+ [last_Via:]
+ [last_From:]
+ [last_To]
+ [last_Call-ID:]
+ [last_CSeq:]
+ Contact: <sip:bob@[local_ip]:[local_port]>
+ Content-Length:0
+
+ ]]>
+ </send>
+
+ <recv request="NOTIFY" />
+
+ <send>
+ <![CDATA[
+
+ SIP/2.0 200 OK
+ [last_Via:]
+ [last_From:]
+ [last_To]
+ [last_Call-ID:]
+ [last_CSeq:]
+ Contact: <sip:bob@[local_ip]:[local_port]>
+ Content-Length:0
+
+ ]]>
+ </send>
+
+ <send retrans="500">
+ <![CDATA[
+
+ BYE sip:[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/UDP [local_ip]:[local_port];rport;received=127.0.0.1;branch=[branch]
+ From: [$outbound_from_header]
+ To: [$outbound_to_header]
+ Call-ID: [call_id]
+ CSeq: [cseq] BYE
+ Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+ Content-Type: application/sdp
+ Max-Forwards: 70
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <!-- 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>
+
+
diff --git a/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local_blonde/sipp/uac-no-hangup.xml b/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local_blonde/sipp/uac-no-hangup.xml
new file mode 100644
index 0000000..305133e
--- /dev/null
+++ b/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local_blonde/sipp/uac-no-hangup.xml
@@ -0,0 +1,135 @@
+<?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: sipp <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:alice@[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:alice@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Subject: Performance Test
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <recv request="INVITE">
+ <action>
+ <ereg regexp="\"Charlie\" <sip:charlie at 127.0.0.1>"
+ header="P-Asserted-Identity"
+ search_in="hdr"
+ check_it="true"
+ assign_to="asserted_identity"/>
+ <ereg regexp="\"Charlie\" <sip:charlie at 127.0.0.1>"
+ header="Remote-Party-ID"
+ search_in="hdr"
+ check_it="true"
+ assign_to="remote_party_id"/>
+ </action>
+ </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-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 request="ACK">
+ </recv>
+
+ <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"/>
+
+ <Reference variables="asserted_identity" />
+ <Reference variables="remote_party_id" />
+
+</scenario>
+
diff --git a/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local_blonde/sipp/uas.xml b/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local_blonde/sipp/uas.xml
new file mode 100644
index 0000000..d9cda73
--- /dev/null
+++ b/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local_blonde/sipp/uas.xml
@@ -0,0 +1,171 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<!-- This program is free software; you can redistribute it and/or -->
+<!-- modify it under the terms of the GNU General Public License as -->
+<!-- published by the Free Software Foundation; either version 2 of the -->
+<!-- License, or (at your option) any later version. -->
+<!-- -->
+<!-- This program is distributed in the hope that it will be useful, -->
+<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
+<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
+<!-- GNU General Public License for more details. -->
+<!-- -->
+<!-- You should have received a copy of the GNU General Public License -->
+<!-- along with this program; if not, write to the -->
+<!-- Free Software Foundation, Inc., -->
+<!-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -->
+<!-- -->
+<!-- Sipp default 'uas' scenario. -->
+<!-- -->
+
+<scenario name="Basic UAS responder">
+ <!-- By adding rrs="true" (Record Route Sets), the route sets -->
+ <!-- are saved and used for following messages sent. Useful to test -->
+ <!-- against stateful SIP proxies/B2BUAs. -->
+ <recv request="INVITE" crlf="true">
+ </recv>
+
+ <!-- The '[last_*]' keyword is replaced automatically by the -->
+ <!-- specified header if it was present in the last message received -->
+ <!-- (except if it was a retransmission). If the header was not -->
+ <!-- present or if no message has been received, the '[last_*]' -->
+ <!-- keyword is discarded, and all bytes until the end of the line -->
+ <!-- are also discarded. -->
+ <!-- -->
+ <!-- If the specified header was present several times in the -->
+ <!-- message, all occurences are concatenated (CRLF seperated) -->
+ <!-- to be used in place of the '[last_*]' keyword. -->
+
+ <send>
+ <![CDATA[
+
+ SIP/2.0 180 Ringing
+ [last_Via:]
+ [last_From:]
+ [last_To:];tag=[call_number]
+ [last_Call-ID:]
+ [last_CSeq:]
+ Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <pause milliseconds="5000" />
+
+ <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=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 request="ACK"
+ optional="true"
+ rtd="true"
+ crlf="true">
+ </recv>
+
+ <recv request="INVITE">
+ <action>
+ <ereg regexp="\"Alice\" <sip:alice at 127.0.0.1>"
+ header="P-Asserted-Identity"
+ search_in="hdr"
+ check_it="true"
+ assign_to="asserted_identity"/>
+ <ereg regexp="\"Alice\" <sip:alice at 127.0.0.1>"
+ header="Remote-Party-ID"
+ search_in="hdr"
+ check_it="true"
+ assign_to="remote_party_id"/>
+ <!-- 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"/>
+ <!-- Save the From user portion of URI. We'll need it when we send our BYE -->
+ <ereg regexp="(sip:bob)"
+ header="From:"
+ search_in="hdr"
+ check_it="true"
+ assign_to="remote_user"/>
+ </action>
+ </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-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 request="ACK">
+ </recv>
+
+ <send retrans="500">
+ <![CDATA[
+
+ BYE [$remote_user]@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: <sip:charlie@[local_ip]:[local_port]>;tag=[call_number]
+ To: <[$remote_user]@[remote_ip]:[remote_port]>[$remote_tag]
+ Call-ID: [call_id]
+ CSeq: [cseq] BYE
+ Contact: sip:charlie@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Subject: Performance Test
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <recv response="200" crlf="true">
+ </recv>
+
+ <!-- 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"/>
+
+ <Reference variables="asserted_identity" />
+ <Reference variables="remote_party_id" />
+
+</scenario>
+
diff --git a/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local_blonde/test-config.yaml b/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local_blonde/test-config.yaml
new file mode 100644
index 0000000..3154c80
--- /dev/null
+++ b/tests/channels/pjsip/transfers/attended_transfer/nominal/callee_local_blonde/test-config.yaml
@@ -0,0 +1,56 @@
+testinfo:
+ summary: Test performing a callee-initiated blonde attended transfer via chan_pjsip.
+ description: |
+ "Start four SIPp scenarios that do the following:
+ SIPp #1 (uac-no-hangup.xml) calls through Asterisk to SIPp #2 (referer_uas.xml)
+ SIPp #2 kicks off SIPp #3 (referee.xml) which calls SIPp #4 (uas.xml).
+ SIPp #3 passes call information back to SIPp #2.
+ Before SIPp #4 answers SIPp #2 initiates an attended transfer via REFER with Replaces information from SIPp #3.
+ SIPp #3 is hung up.
+ SIPp #2 hangs up.
+ SIPp #4 continues to ring until it answers.
+ SIPp #1 receives a connected line update and the values are checked.
+ SIPp #4 answers.
+ SIPp #1 and SIPp #4 are bridged.
+ SIPp #4 receives a connected line update and the values are checked.
+ SIPp #4 hangs up.
+ SIPp #1 is hung up."
+
+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: True
+ test-iterations:
+ -
+ scenarios:
+ - { 'coordinated-sender': {'key-args': {'scenario':'referer_uas.xml', '-p':'5066'} },
+ 'coordinated-receiver': { 'key-args': {'scenario':'referee.xml', '-p':'5065'} } }
+ - { 'key-args': {'scenario':'uas.xml', '-p':'5067'} }
+ - { 'key-args': {'scenario':'uac-no-hangup.xml', '-p':'5068', '-s':'alice'} }
+
+ami-config:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'AttendedTransfer'
+ Result: 'Success'
+ count: 1
+
+properties:
+ minversion: '13.5.0'
+ dependencies:
+ - python : twisted
+ - python : starpy
+ - asterisk : app_dial
+ - asterisk : chan_pjsip
+ tags:
+ - PJSIP
diff --git a/tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local/configs/ast1/pjsip.conf b/tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local/configs/ast1/pjsip.conf
index 10ae2e5..f2d2cdb 100644
--- a/tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local/configs/ast1/pjsip.conf
+++ b/tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local/configs/ast1/pjsip.conf
@@ -9,6 +9,9 @@
disallow=all
allow=ulaw
direct_media=no
+send_pai=yes
+send_rpid=yes
+callerid=Bob <bob>
[charlie]
type=endpoint
@@ -17,6 +20,9 @@
allow=ulaw
direct_media=no
aors=charlie
+send_pai=yes
+send_rpid=yes
+callerid=Charlie <charlie>
[charlie]
type=aor
diff --git a/tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local/sipp/uas.xml b/tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local/sipp/uas.xml
index c15cd0c..66ec663 100644
--- a/tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local/sipp/uas.xml
+++ b/tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local/sipp/uas.xml
@@ -82,6 +82,48 @@
crlf="true">
</recv>
+ <recv request="INVITE">
+ <action>
+ <ereg regexp="\"Charlie\" <sip:charlie at 127.0.0.1>"
+ header="P-Asserted-Identity"
+ search_in="hdr"
+ check_it="true"
+ assign_to="asserted_identity"/>
+ <ereg regexp="\"Charlie\" <sip:charlie at 127.0.0.1>"
+ header="Remote-Party-ID"
+ search_in="hdr"
+ check_it="true"
+ assign_to="remote_party_id"/>
+ </action>
+ </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-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 request="ACK">
+ </recv>
+
<recv request="BYE">
</recv>
@@ -111,5 +153,8 @@
<!-- definition of the call length repartition table (unit is ms) -->
<CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
+ <Reference variables="asserted_identity" />
+ <Reference variables="remote_party_id" />
+
</scenario>
diff --git a/tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local/test-config.yaml b/tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local/test-config.yaml
index b766022..ac8c670 100644
--- a/tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local/test-config.yaml
+++ b/tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local/test-config.yaml
@@ -10,6 +10,7 @@
SIPp #3 passes call information back to SIPp #1.
SIPp #1 initiates an attended transfer via REFER with Replaces information from SIPp #3.
SIPp #2 and SIPp #4 are bridged.
+ SIPp #2 and SIPp #4 receive connected line updates and the values are checked.
SIPp #1 and SIPp #3 are hung up.
SIPp #2 and SIPp #4 are hung up."
diff --git a/tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local_blonde/configs/ast1/extensions.conf b/tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local_blonde/configs/ast1/extensions.conf
new file mode 100644
index 0000000..0031d35
--- /dev/null
+++ b/tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local_blonde/configs/ast1/extensions.conf
@@ -0,0 +1,9 @@
+[default]
+exten => call_c,1,NoOp()
+ same => n,Dial(PJSIP/charlie)
+ same => n,Hangup()
+
+exten => call_a,1,NoOp()
+ same => n,Dial(PJSIP/alice)
+ same => n,Hangup()
+
diff --git a/tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local_blonde/configs/ast1/pjsip.conf b/tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local_blonde/configs/ast1/pjsip.conf
new file mode 100644
index 0000000..62bc07a
--- /dev/null
+++ b/tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local_blonde/configs/ast1/pjsip.conf
@@ -0,0 +1,44 @@
+[local]
+type=transport
+protocol=udp
+bind=127.0.0.1:5060
+
+[alice]
+type=endpoint
+context=default
+disallow=all
+allow=ulaw
+direct_media=no
+aors=alice
+send_pai=yes
+send_rpid=yes
+callerid=Alice <alice>
+
+[alice]
+type=aor
+contact=sip:alice at 127.0.0.1:5068
+
+[bob]
+type=endpoint
+context=default
+disallow=all
+allow=ulaw
+direct_media=no
+send_pai=yes
+send_rpid=yes
+callerid=Bob <bob>
+
+[charlie]
+type=endpoint
+context=default
+disallow=all
+allow=ulaw
+direct_media=no
+aors=charlie
+send_pai=yes
+send_rpid=yes
+callerid=Charlie <charlie>
+
+[charlie]
+type=aor
+contact=sip:charlie at 127.0.0.1:5067
diff --git a/tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local_blonde/sipp/referee.xml b/tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local_blonde/sipp/referee.xml
new file mode 100644
index 0000000..0d65a3f
--- /dev/null
+++ b/tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local_blonde/sipp/referee.xml
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<!-- This program is free software; you can redistribute it and/or -->
+<!-- modify it under the terms of the GNU General Public License as -->
+<!-- published by the Free Software Foundation; either version 2 of the -->
+<!-- License, or (at your option) any later version. -->
+<!-- -->
+<!-- This program is distributed in the hope that it will be useful, -->
+<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
+<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
+<!-- GNU General Public License for more details. -->
+<!-- -->
+<!-- You should have received a copy of the GNU General Public License -->
+<!-- along with this program; if not, write to the -->
+<!-- Free Software Foundation, Inc., -->
+<!-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -->
+<!-- -->
+
+<scenario name="Referee Leg">
+
+ <recvCmd>
+ <action>
+ <ereg regexp="REMOTE(.*)"
+ search_in="hdr"
+ header="Call-ID:"
+ check_it="true"
+ assign_to="1,original_callid" />
+ </action>
+ </recvCmd>
+
+ <send retrans="500">
+ <![CDATA[
+
+ INVITE sip:call_a@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: <sip:bob@[local_ip]:[local_port]>;tag=[call_number]
+ To: <sip:transfer@[remote_ip]:[remote_port]>
+ Call-ID: [call_id]
+ CSeq: [cseq] INVITE
+ Contact: <sip:bob@[local_ip]:[local_port]>
+ Max-Forwards: 70
+ Content-Type: application/sdp
+ Content-Length: [len]
+
+ v=0
+ o=- 1324901698 1324901698 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 101
+ a=sendrecv
+ a=rtpmap:0 PCMU/8000
+ a=rtpmap:101 telephone-event/8000
+
+ ]]>
+ </send>
+
+ <recv response="100" optional="true" />
+ <recv response="101" optional="true" />
+ <recv response="180">
+ <action>
+ <ereg regexp="tag=([[:alnum:].\-]*)"
+ search_in="hdr"
+ header="To:"
+ check_it="true"
+ assign_to="2,to_tag" />
+ <ereg regexp="tag=([[:alnum:].\-]*)"
+ search_in="hdr"
+ header="From:"
+ check_it="true"
+ assign_to="3,from_tag" />
+ </action>
+ </recv>
+ <Reference variables="1,2,3" />
+
+ <pause milliseconds="1000" />
+ <sendCmd>
+ <![CDATA[
+ Call-ID: [$original_callid]
+ Remote-To-Tag: [$to_tag]
+ Remote-From-Tag: [$from_tag]
+ Remote-URI: sip:call_a@[remote_ip]:[remote_port]
+ ]]>
+ </sendCmd>
+
+ <recv response="603" />
+
+ <send>
+ <![CDATA[
+
+ ACK sip:call_a@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];rport;branch=[branch]
+ [last_From:]
+ [last_To]
+ Call-ID: [call_id]
+ CSeq: [cseq] ACK
+ Contact: sip:bob@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <!-- 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>
+
diff --git a/tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local_blonde/sipp/referer.xml b/tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local_blonde/sipp/referer.xml
new file mode 100644
index 0000000..c3a23de
--- /dev/null
+++ b/tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local_blonde/sipp/referer.xml
@@ -0,0 +1,228 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<!-- This program is free software; you can redistribute it and/or -->
+<!-- modify it under the terms of the GNU General Public License as -->
+<!-- published by the Free Software Foundation; either version 2 of the -->
+<!-- License, or (at your option) any later version. -->
+<!-- -->
+<!-- This program is distributed in the hope that it will be useful, -->
+<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
+<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
+<!-- GNU General Public License for more details. -->
+<!-- -->
+<!-- You should have received a copy of the GNU General Public License -->
+<!-- along with this program; if not, write to the -->
+<!-- Free Software Foundation, Inc., -->
+<!-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -->
+<!-- -->
+
+<scenario name="Referer Leg">
+
+ <send retrans="500">
+ <![CDATA[
+
+ INVITE sip:call_c@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: <sip:bob@[local_ip]:[local_port]>;tag=[call_number]
+ To: <sip:transfer@[remote_ip]:[remote_port]>
+ Call-ID: [call_id]
+ CSeq: [cseq] INVITE
+ Contact: <sip:bob@[local_ip]:[local_port]>
+ Content-Type: application/sdp
+ Max-Forwards: 70
+ Content-Length: [len]
+
+ v=0
+ o=- 1324901698 1324901698 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 101
+ a=sendrecv
+ a=rtpmap:0 PCMU/8000
+ a=rtpmap:101 telephone-event/8000
+
+ ]]>
+ </send>
+
+ <recv response="100" optional="true" />
+ <recv response="101" optional="true" />
+ <recv response="180" optional="true" />
+ <recv response="200" rtd="true" crlf="true" />
+
+ <send>
+ <![CDATA[
+
+ ACK sip:call_c@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];rport;branch=[branch]
+ [last_From]
+ [last_To]
+ Call-ID: [call_id]
+ CSeq: [cseq] ACK
+ Contact: sip:bob@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <!-- Put this leg on hold -->
+ <send retrans="500">
+ <![CDATA[
+
+ INVITE sip:call_c@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ [last_From]
+ [last_To]
+ Call-ID: [call_id]
+ CSeq: [cseq] INVITE
+ Contact: <sip:bob@[local_ip]:[local_port]>
+ Content-Type: application/sdp
+ Max-Forwards: 70
+ Content-Length: [len]
+
+ v=0
+ o=- 1324901698 1324901698 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 101
+ a=sendonly
+ a=rtpmap:0 PCMU/8000
+ a=rtpmap:101 telephone-event/8000
+
+ ]]>
+ </send>
+
+ <recv response="100" optional="true" />
+ <recv response="101" optional="true" />
+ <recv response="180" optional="true" />
+ <recv response="200" rtd="true" crlf="true" />
+
+ <send>
+ <![CDATA[
+
+ ACK sip:call_c@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];rport;branch=[branch]
+ [last_From]
+ [last_To]
+ Call-ID: [call_id]
+ CSeq: [cseq] ACK
+ Contact: sip:bob@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <sendCmd>
+ <![CDATA[
+ Call-ID: REMOTE[call_id]
+ Start the Echo Leg
+ ]]>
+ </sendCmd>
+
+ <recvCmd>
+ <action>
+ <ereg regexp=" (.+)"
+ search_in="hdr"
+ header="Remote-URI:"
+ check_it="true"
+ assign_to="1,remote_contact" />
+ <ereg regexp=" (.+)"
+ search_in="hdr"
+ header="Remote-To-Tag:"
+ check_it="true"
+ assign_to="2,remote_to_tag" />
+ <ereg regexp=" (.+)"
+ search_in="hdr"
+ header="Remote-From-Tag:"
+ check_it="true"
+ assign_to="3,remote_from_tag" />
+ <ereg regexp=" (.+)@(.+)"
+ search_in="hdr"
+ header="Call-ID:"
+ check_it="true"
+ assign_to="4,callid_chunk_1,callid_chunk_2"/>
+ </action>
+ </recvCmd>
+ <Reference variables="1,2,3,4" />
+
+ <send>
+ <![CDATA[
+
+ REFER sip:call_c@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ [last_From:]
+ [last_To]
+ [last_Call-ID:]
+ CSeq: [cseq] REFER
+ Contact: <sip:bob@[local_ip]:[local_port]>
+ Max-Forwards: 70
+ Refer-to: <[$remote_contact]?Replaces=REMOTE[$callid_chunk_1]%40[$callid_chunk_2]%3Bto-tag%3D[$remote_to_tag]%3Bfrom-tag%3D[$remote_from_tag]>
+ Referred-By: sip:bob@[local_ip]
+ Content-Length: 0
+
+ ]]>
+ </send>
+ <recv response="202" rtd="true" crlf="true" />
+
+ <recv request="NOTIFY" />
+ <send>
+ <![CDATA[
+
+ SIP/2.0 200 OK
+ [last_Via:]
+ [last_From:]
+ [last_To]
+ [last_Call-ID:]
+ [last_CSeq:]
+ Contact: <sip:bob@[local_ip]:[local_port]>
+ Content-Length:0
+
+ ]]>
+ </send>
+
+ <recv request="NOTIFY" />
+
+ <send>
+ <![CDATA[
+
+ SIP/2.0 200 OK
+ [last_Via:]
+ [last_From:]
+ [last_To]
+ [last_Call-ID:]
+ [last_CSeq:]
+ Contact: <sip:bob@[local_ip]:[local_port]>
+ Content-Length:0
+
+ ]]>
+ </send>
+
+ <send retrans="500">
+ <![CDATA[
+
+ BYE sip:[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/UDP [local_ip]:[local_port];rport;received=127.0.0.1;branch=[branch]
+ [last_From:]
+ [last_To]
+ [last_Call-ID:]
+ CSeq: [cseq] BYE
+ Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+ Content-Type: application/sdp
+ Max-Forwards: 70
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <!-- 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>
+
diff --git a/tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local_blonde/sipp/uas.xml b/tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local_blonde/sipp/uas.xml
new file mode 100644
index 0000000..9eec4b8
--- /dev/null
+++ b/tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local_blonde/sipp/uas.xml
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<!-- This program is free software; you can redistribute it and/or -->
+<!-- modify it under the terms of the GNU General Public License as -->
+<!-- published by the Free Software Foundation; either version 2 of the -->
+<!-- License, or (at your option) any later version. -->
+<!-- -->
+<!-- This program is distributed in the hope that it will be useful, -->
+<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
+<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
+<!-- GNU General Public License for more details. -->
+<!-- -->
+<!-- You should have received a copy of the GNU General Public License -->
+<!-- along with this program; if not, write to the -->
+<!-- Free Software Foundation, Inc., -->
+<!-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -->
+<!-- -->
+<!-- Sipp default 'uas' scenario. -->
+<!-- -->
+
+<scenario name="Basic UAS responder">
+ <!-- By adding rrs="true" (Record Route Sets), the route sets -->
+ <!-- are saved and used for following messages sent. Useful to test -->
+ <!-- against stateful SIP proxies/B2BUAs. -->
+ <recv request="INVITE" crlf="true">
+ </recv>
+
+ <!-- The '[last_*]' keyword is replaced automatically by the -->
+ <!-- specified header if it was present in the last message received -->
+ <!-- (except if it was a retransmission). If the header was not -->
+ <!-- present or if no message has been received, the '[last_*]' -->
+ <!-- keyword is discarded, and all bytes until the end of the line -->
+ <!-- are also discarded. -->
+ <!-- -->
+ <!-- If the specified header was present several times in the -->
+ <!-- message, all occurences are concatenated (CRLF seperated) -->
+ <!-- to be used in place of the '[last_*]' keyword. -->
+
+ <send>
+ <![CDATA[
+
+ SIP/2.0 180 Ringing
+ [last_Via:]
+ [last_From:]
+ [last_To:];tag=[call_number]
+ [last_Call-ID:]
+ [last_CSeq:]
+ Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <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=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 request="ACK"
+ optional="true"
+ rtd="true"
+ crlf="true">
+ </recv>
+
+ <recv request="INVITE">
+ <action>
+ <ereg regexp="\"Alice\" <sip:alice at 127.0.0.1>"
+ header="P-Asserted-Identity"
+ search_in="hdr"
+ check_it="true"
+ assign_to="asserted_identity"/>
+ <ereg regexp="\"Alice\" <sip:alice at 127.0.0.1>"
+ header="Remote-Party-ID"
+ search_in="hdr"
+ check_it="true"
+ assign_to="remote_party_id"/>
+ </action>
+ </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-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 request="ACK">
+ </recv>
+
+ <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>
+
+ <!-- Keep the call open for a while in case the 200 is lost to be -->
+ <!-- able to retransmit it if we receive the BYE again. -->
+ <pause milliseconds="4000"/>
+
+
+ <!-- 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"/>
+
+ <Reference variables="asserted_identity" />
+ <Reference variables="remote_party_id" />
+
+</scenario>
+
diff --git a/tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local_blonde/sipp/uas_hangup.xml b/tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local_blonde/sipp/uas_hangup.xml
new file mode 100644
index 0000000..e9bb6c0
--- /dev/null
+++ b/tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local_blonde/sipp/uas_hangup.xml
@@ -0,0 +1,171 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<!-- This program is free software; you can redistribute it and/or -->
+<!-- modify it under the terms of the GNU General Public License as -->
+<!-- published by the Free Software Foundation; either version 2 of the -->
+<!-- License, or (at your option) any later version. -->
+<!-- -->
+<!-- This program is distributed in the hope that it will be useful, -->
+<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
+<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
+<!-- GNU General Public License for more details. -->
+<!-- -->
+<!-- You should have received a copy of the GNU General Public License -->
+<!-- along with this program; if not, write to the -->
+<!-- Free Software Foundation, Inc., -->
+<!-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -->
+<!-- -->
+<!-- Sipp default 'uas' scenario. -->
+<!-- -->
+
+<scenario name="Basic UAS responder">
+ <!-- By adding rrs="true" (Record Route Sets), the route sets -->
+ <!-- are saved and used for following messages sent. Useful to test -->
+ <!-- against stateful SIP proxies/B2BUAs. -->
+ <recv request="INVITE" crlf="true">
+ </recv>
+
+ <!-- The '[last_*]' keyword is replaced automatically by the -->
+ <!-- specified header if it was present in the last message received -->
+ <!-- (except if it was a retransmission). If the header was not -->
+ <!-- present or if no message has been received, the '[last_*]' -->
+ <!-- keyword is discarded, and all bytes until the end of the line -->
+ <!-- are also discarded. -->
+ <!-- -->
+ <!-- If the specified header was present several times in the -->
+ <!-- message, all occurences are concatenated (CRLF seperated) -->
+ <!-- to be used in place of the '[last_*]' keyword. -->
+
+ <send>
+ <![CDATA[
+
+ SIP/2.0 180 Ringing
+ [last_Via:]
+ [last_From:]
+ [last_To:];tag=[call_number]
+ [last_Call-ID:]
+ [last_CSeq:]
+ Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <pause milliseconds="5000"/>
+
+ <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=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 request="ACK"
+ optional="true"
+ rtd="true"
+ crlf="true">
+ </recv>
+
+ <recv request="INVITE">
+ <action>
+ <ereg regexp="\"Charlie\" <sip:charlie at 127.0.0.1>"
+ header="P-Asserted-Identity"
+ search_in="hdr"
+ check_it="true"
+ assign_to="asserted_identity"/>
+ <ereg regexp="\"Charlie\" <sip:charlie at 127.0.0.1>"
+ header="Remote-Party-ID"
+ search_in="hdr"
+ check_it="true"
+ assign_to="remote_party_id"/>
+ <!-- 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"/>
+ <!-- Save the From user portion of URI. We'll need it when we send our BYE -->
+ <ereg regexp="(sip:bob)"
+ header="From:"
+ search_in="hdr"
+ check_it="true"
+ assign_to="remote_user"/>
+ </action>
+ </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-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 request="ACK">
+ </recv>
+
+ <send retrans="500">
+ <![CDATA[
+
+ BYE [$remote_user]@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: <sip:charlie@[local_ip]:[local_port]>;tag=[call_number]
+ To: <[$remote_user]@[remote_ip]:[remote_port]>[$remote_tag]
+ Call-ID: [call_id]
+ CSeq: [cseq] BYE
+ Contact: sip:charlie@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Subject: Performance Test
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <recv response="200" crlf="true">
+ </recv>
+
+ <!-- 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"/>
+
+ <Reference variables="asserted_identity" />
+ <Reference variables="remote_party_id" />
+
+</scenario>
+
diff --git a/tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local_blonde/test-config.yaml b/tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local_blonde/test-config.yaml
new file mode 100644
index 0000000..4096f96
--- /dev/null
+++ b/tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local_blonde/test-config.yaml
@@ -0,0 +1,59 @@
+testinfo:
+ summary: Test performing a caller-initiated attended transfer via chan_pjsip.
+ description: |
+ "Originate two SIP calls through Asterisk to remote endpoints and then have
+ one originating call transfer the other via REFER with Replaces header.
+
+ The four SIPp scenarios involved perform the following actions:
+ SIPp #1 (referer.xml) calls through Asterisk to SIPp #2 (uas.xml)
+ SIPp #1 kicks off SIPp #3 (referee.xml) which calls SIPp #4 (uas_hangup.xml).
+ SIPp #3 passes call information back to SIPp #1.
+ Before SIPp #4 answers SIPp #1 initiates an attended transfer via REFER with Replaces information from SIPp #3.
+ SIPp #3 is hung up.
+ SIPp #1 hangs up.
+ SIPp #4 continues to ring until it answers.
+ SIPp #2 receives a connected line update and the values are checked.
+ SIPp #4 answers.
+ SIPp #2 and SIPp #4 are bridged.
+ SIPp #4 receives a connected line update and the values are checked.
+ SIPp #4 hangs up.
+ SIPp #2 is hung up."
+
+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: True
+ test-iterations:
+ -
+ scenarios:
+ - { 'key-args': {'scenario':'uas.xml', '-p':'5067', '-m':'2'} }
+ - { 'key-args': {'scenario':'uas_hangup.xml', '-p':'5068', '-m':'2'} }
+ - { 'coordinated-sender': {'key-args': {'scenario':'referer.xml', '-p':'5066'} },
+ 'coordinated-receiver': {'key-args': {'scenario':'referee.xml', '-p':'5065'} } }
+
+ami-config:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'AttendedTransfer'
+ Result: 'Success'
+ count: 1
+
+properties:
+ minversion: '13.5.0'
+ dependencies:
+ - python : twisted
+ - python : starpy
+ - asterisk : app_dial
+ - asterisk : chan_pjsip
+ tags:
+ - PJSIP
diff --git a/tests/channels/pjsip/transfers/attended_transfer/nominal/tests.yaml b/tests/channels/pjsip/transfers/attended_transfer/nominal/tests.yaml
index 73008fb..b56c877 100644
--- a/tests/channels/pjsip/transfers/attended_transfer/nominal/tests.yaml
+++ b/tests/channels/pjsip/transfers/attended_transfer/nominal/tests.yaml
@@ -1,7 +1,9 @@
# Enter tests here in the order they should be considered for execution:
tests:
- test: 'caller_local'
+ - test: 'caller_local_blonde'
- test: 'callee_local'
+ - test: 'callee_local_blonde'
- test: 'caller_remote'
- test: 'callee_remote'
- test: 'caller_local_app'
--
To view, visit https://gerrit.asterisk.org/655
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I5aa4aee05ae4bbd3e6fc110e608459b4c102b725
Gerrit-PatchSet: 3
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
More information about the asterisk-commits
mailing list