Benny Prijono | f279c09 | 2010-10-12 11:35:55 +0000 | [diff] [blame^] | 1 | <?xml version="1.0" encoding="ISO-8859-1" ?> |
| 2 | <!DOCTYPE scenario SYSTEM "sipp.dtd"> |
| 3 | |
| 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. --> |
| 8 | <!-- --> |
| 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. --> |
| 13 | <!-- --> |
| 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 --> |
| 18 | <!-- --> |
| 19 | <!-- Late NOTIFY scenario: --> |
| 20 | <!-- - UAC sends SUBSCRIBE, we reply with 200 --> |
| 21 | <!-- - we send NOTIFY, expect 200 --> |
| 22 | <!-- - UAC sends SUBSCRIBE, we ignore --> |
| 23 | <!-- - we send NOTIFY --> |
| 24 | <!-- See http://trac.pjsip.org/repos/ticket/911 --> |
| 25 | <!-- --> |
| 26 | |
| 27 | <scenario name="SUBSCRIBE tests"> |
| 28 | <!-- Establish subscription --> |
| 29 | <recv request="SUBSCRIBE" crlf="true"> |
| 30 | <action> |
| 31 | <ereg regexp=".*" search_in="hdr" header="From" assign_to="3"/> |
| 32 | <ereg regexp="sip:(.*)>" search_in="hdr" header="Contact" assign_to="4,5"/> |
| 33 | <assign assign_to="4" variable="5" /> |
| 34 | </action> |
| 35 | </recv> |
| 36 | |
| 37 | <send> |
| 38 | <![CDATA[ |
| 39 | |
| 40 | SIP/2.0 200 OK |
| 41 | [last_Via:] |
| 42 | [last_From:] |
| 43 | [last_To:];tag=[call_number] |
| 44 | [last_Call-ID:] |
| 45 | [last_CSeq:] |
| 46 | Contact: <sip:sipp@[local_ip]:[local_port]> |
| 47 | Content-Length: 0 |
| 48 | Expires: 60 |
| 49 | ]]> |
| 50 | </send> |
| 51 | |
| 52 | <send retrans="500"> |
| 53 | <![CDATA[ |
| 54 | NOTIFY sip:[$5] SIP/2.0 |
| 55 | Via: SIP/2.0/[transport] [local_ip]:[local_port];rport;branch=z9hG4bKPj01 |
| 56 | From: sipp <sip:sipp@[local_ip]>;tag=[call_number] |
| 57 | To[$3] |
| 58 | Call-ID: [call_id] |
| 59 | Cseq: 1 NOTIFY |
| 60 | Contact: sip:sipp@[local_ip]:[local_port] |
| 61 | Max-Forwards: 70 |
| 62 | Event: presence |
| 63 | Subscription-State: active;expires=50 |
| 64 | Content-Type: multipart/mixed;boundary=abcd |
| 65 | |
| 66 | --abcd |
| 67 | Content-Type: text/plain |
| 68 | |
| 69 | Hi there, please don't read this part. |
| 70 | --abcd |
| 71 | Content-Type: application/pidf+xml |
| 72 | |
| 73 | <?xml version="1.0" encoding="UTF-8"?> |
| 74 | <presence xmlns="urn:ietf:params:xml:ns:pidf" xmlns:op="urn:oma:xml:prs:pidf:oma-pres" entity="sip:test@pjsip.org"> |
| 75 | <tuple id="17415d5738f332a64a2f1d8cfb4ab0a5"> |
| 76 | <status> |
| 77 | <basic>open</basic> |
| 78 | </status> |
| 79 | </tuple> |
| 80 | </presence> |
| 81 | --abcd-- |
| 82 | ]]> |
| 83 | </send> |
| 84 | |
| 85 | <recv response="200"> |
| 86 | </recv> |
| 87 | |
| 88 | <!-- Subscription has been established at this point --> |
| 89 | |
| 90 | |
| 91 | <!-- ******* |
| 92 | |
| 93 | Wait for subscription refresh, reply with 481 |
| 94 | |
| 95 | --> |
| 96 | |
| 97 | <recv request="SUBSCRIBE" crlf="true"> |
| 98 | </recv> |
| 99 | |
| 100 | <send> |
| 101 | <![CDATA[ |
| 102 | |
| 103 | SIP/2.0 481 You should resubscribe mow |
| 104 | [last_Via:] |
| 105 | [last_From:] |
| 106 | [last_To:];tag=[call_number] |
| 107 | [last_Call-ID:] |
| 108 | [last_CSeq:] |
| 109 | Contact: <sip:sipp@[local_ip]:[local_port]> |
| 110 | Content-Length: 0 |
| 111 | ]]> |
| 112 | </send> |
| 113 | |
| 114 | |
| 115 | |
| 116 | |
| 117 | <!-- definition of the response time repartition table (unit is ms) --> |
| 118 | <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/> |
| 119 | |
| 120 | <!-- definition of the call length repartition table (unit is ms) --> |
| 121 | <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/> |
| 122 | |
| 123 | </scenario> |
| 124 | |