1
<?xml version="1.0" encoding="ISO-8859-1" ?>
2
<!DOCTYPE scenario SYSTEM "sipp.dtd">
4
<!-- This program is free software; you can redistribute it and/or -->
5
<!-- modify it under the terms of the GNU General Public License as -->
6
<!-- published by the Free Software Foundation; either version 2 of the -->
7
<!-- License, or (at your option) any later version. -->
9
<!-- This program is distributed in the hope that it will be useful, -->
10
<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
11
<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
12
<!-- GNU General Public License for more details. -->
14
<!-- You should have received a copy of the GNU General Public License -->
15
<!-- along with this program; if not, write to the -->
16
<!-- Free Software Foundation, Inc., -->
17
<!-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -->
19
<!-- See https://trac.pjsip.org/repos/ticket/1146 -->
22
<scenario name="SUBSCRIBE tests">
23
<!-- Establish subscription -->
24
<recv request="SUBSCRIBE" crlf="true">
26
<ereg regexp=".*" search_in="hdr" header="From" assign_to="3"/>
27
<ereg regexp="sip:(.*)>" search_in="hdr" header="Contact" assign_to="4,5"/>
28
<assign assign_to="4" variable="5" />
38
[last_To:];tag=[call_number]
41
Contact: <sip:sipp@[local_ip]:[local_port]>
49
NOTIFY sip:[$5] SIP/2.0
50
Via: SIP/2.0/[transport] [local_ip]:[local_port];rport;branch=z9hG4bKPj01
51
From: sipp <sip:sipp@[local_ip]>;tag=[call_number]
55
Contact: sip:sipp@[local_ip]:[local_port]
58
Subscription-State: active;expires=10
59
Content-Type: multipart/mixed;boundary=abcd
62
Content-Type: text/plain
64
Hi there, please don't read this part.
66
Content-Type: application/pidf+xml
68
<?xml version="1.0" encoding="UTF-8"?>
69
<presence xmlns="urn:ietf:params:xml:ns:pidf" xmlns:op="urn:oma:xml:prs:pidf:oma-pres" entity="sip:test@pjsip.org">
70
<tuple id="17415d5738f332a64a2f1d8cfb4ab0a5">
83
<!-- Subscription has been established at this point -->
88
Wait for subscription refresh, reply with 481
92
<recv request="SUBSCRIBE" crlf="true">
98
SIP/2.0 481 You should resubscribe mow
101
[last_To:];tag=[call_number]
104
Contact: <sip:sipp@[local_ip]:[local_port]>
112
<!-- definition of the response time repartition table (unit is ms) -->
113
<ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
115
<!-- definition of the call length repartition table (unit is ms) -->
116
<CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>