[Asterisk-code-review] Fix: Add unquoted send to vm test case. (testsuite[master])
Richard Mudgett
asteriskteam at digium.com
Wed Mar 2 09:39:59 CST 2016
Richard Mudgett has uploaded a new change for review.
https://gerrit.asterisk.org/2341
Change subject: Fix: Add unquoted send_to_vm test case.
......................................................................
Fix: Add unquoted send_to_vm test case.
Change-Id: If8d4c66e2d8651bffa06f35dceecf5afbf6cbf9f
---
A tests/channels/pjsip/refer_send_to_vm/v13.8.0/sipp/refer_unquoted_send_to_vm.xml
M tests/channels/pjsip/refer_send_to_vm/v13.8.0/test-config.yaml
2 files changed, 123 insertions(+), 1 deletion(-)
git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/41/2341/1
diff --git a/tests/channels/pjsip/refer_send_to_vm/v13.8.0/sipp/refer_unquoted_send_to_vm.xml b/tests/channels/pjsip/refer_send_to_vm/v13.8.0/sipp/refer_unquoted_send_to_vm.xml
new file mode 100644
index 0000000..9ef59df
--- /dev/null
+++ b/tests/channels/pjsip/refer_send_to_vm/v13.8.0/sipp/refer_unquoted_send_to_vm.xml
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<scenario name="Refer with custom header">
+ <Global variables="remote_tag" />
+ <recv request="INVITE" crlf="true">
+ <!-- Save the from tag. We'll need it when we send our BYE -->
+ <action>
+ <ereg regexp=".*(;tag=.*)"
+ header="From:"
+ search_in="hdr"
+ check_it="true"
+ assign_to="to_hdr,remote_tag"/>
+ </action>
+ </recv>
+ <Reference variables="to_hdr" />
+
+ <send>
+ <![CDATA[
+
+ SIP/2.0 180 Ringing
+ [last_Via:]
+ [last_From:]
+ [last_To:];tag=[pid]SIPpTag01[call_number]
+ [last_Call-ID:]
+ [last_CSeq:]
+ Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <send>
+ <![CDATA[
+
+ SIP/2.0 200 OK
+ [last_Via:]
+ [last_From:]
+ [last_To:];tag=[pid]SIPpTag01[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=- 1324901698 1324901698 IN IP4 [local_ip]
+ s=-
+ c=IN IP4 [local_ip]
+ t=0 0
+ m=audio 2226 RTP/AVP 0 101
+ a=sendrecv
+ a=rtpmap:0 PCMU/8000
+ a=rtpmap:101 telephone-event/8000
+ ]]>
+ </send>
+
+ <recv request="ACK" rtd="true" crlf="true" />
+
+ <pause milliseconds="1000"/>
+
+ <send retrans="500">
+ <![CDATA[
+ REFER sip:alice@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];rport;branch=[branch]
+ From: <sip:bob@[local_ip]:[local_port]>;tag=[pid]SIPpTag01[call_number]
+ To: <sip:alice@[remote_ip]:[remote_port]>[$remote_tag]
+ Call-ID: [call_id]
+ CSeq: [cseq] REFER
+ Contact: <sip:bob@[local_ip]:[local_port]>
+ Max-Forwards: 70
+ Event: refer
+ Expires: 600
+ Supported: replaces, 100rel, timer, norefersub
+ Accept: message/sipfrag;version=2.0
+ Allow-Events: presence, message-summary, refer
+ Refer-To: <sip:carol@[remote_ip]:[remote_port]>
+ Referred-By: <sip:bob@[local_ip]:[local_port]>
+ User-Agent: Digium D40
+ X-Digium-Call-Feature: feature_send_to_vm
+ Diversion: <sip:carol@[local_ip]:[local_port]>;reason=send_to_vm
+ Content-Length: [len]
+ ]]>
+ </send>
+
+ <recv response="202" />
+
+ <recv request="NOTIFY" crlf="true" />
+
+ <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];transport=[transport]>
+ Content-Length: 0
+ ]]>
+ </send>
+
+ <recv request="NOTIFY" crlf="true" />
+
+ <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];transport=[transport]>
+ Content-Length: 0
+ ]]>
+ </send>
+</scenario>
diff --git a/tests/channels/pjsip/refer_send_to_vm/v13.8.0/test-config.yaml b/tests/channels/pjsip/refer_send_to_vm/v13.8.0/test-config.yaml
index c0b6e47..b62090e 100644
--- a/tests/channels/pjsip/refer_send_to_vm/v13.8.0/test-config.yaml
+++ b/tests/channels/pjsip/refer_send_to_vm/v13.8.0/test-config.yaml
@@ -38,12 +38,16 @@
scenarios:
- { 'key-args': { 'scenario':'refer.xml', '-p':'5062' } }
- { 'key-args': { 'scenario':'invite.xml', '-p':'5061' } }
+ -
+ scenarios:
+ - { 'key-args': { 'scenario':'refer_unquoted_send_to_vm.xml', '-p':'5062' } }
+ - { 'key-args': { 'scenario':'invite.xml', '-p':'5061' } }
ami-config:
-
id: '0'
type: 'headermatch'
- count: '1'
+ count: '2'
conditions:
match:
Event: 'UserEvent'
--
To view, visit https://gerrit.asterisk.org/2341
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If8d4c66e2d8651bffa06f35dceecf5afbf6cbf9f
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
More information about the asterisk-code-review
mailing list