uas-subscribe-refresh-481.xml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <?xml version="1.0" encoding="ISO-8859-1" ?>
  2. <!DOCTYPE scenario SYSTEM "sipp.dtd">
  3. <!-- This program is free software; you can redistribute it and/or -->
  4. <!-- modify it under the terms of the GNU General Public License as -->
  5. <!-- published by the Free Software Foundation; either version 2 of the -->
  6. <!-- License, or (at your option) any later version. -->
  7. <!-- -->
  8. <!-- This program is distributed in the hope that it will be useful, -->
  9. <!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
  10. <!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
  11. <!-- GNU General Public License for more details. -->
  12. <!-- -->
  13. <!-- You should have received a copy of the GNU General Public License -->
  14. <!-- along with this program; if not, write to the -->
  15. <!-- Free Software Foundation, Inc., -->
  16. <!-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -->
  17. <!-- -->
  18. <scenario name="SUBSCRIBE tests">
  19. <!-- Establish subscription -->
  20. <recv request="SUBSCRIBE" crlf="true">
  21. <action>
  22. <ereg regexp=".*" search_in="hdr" header="From" assign_to="3"/>
  23. <ereg regexp="sip:(.*)>" search_in="hdr" header="Contact" assign_to="4,5"/>
  24. <assign assign_to="4" variable="5" />
  25. </action>
  26. </recv>
  27. <send>
  28. <![CDATA[
  29. SIP/2.0 200 OK
  30. [last_Via:]
  31. [last_From:]
  32. [last_To:];tag=[call_number]
  33. [last_Call-ID:]
  34. [last_CSeq:]
  35. Contact: <sip:sipp@[local_ip]:[local_port]>
  36. Content-Length: 0
  37. Expires: 60
  38. ]]>
  39. </send>
  40. <send retrans="500">
  41. <![CDATA[
  42. NOTIFY sip:[$5] SIP/2.0
  43. Via: SIP/2.0/[transport] [local_ip]:[local_port];rport;branch=z9hG4bKPj01
  44. From: sipp <sip:sipp@[local_ip]>;tag=[call_number]
  45. To[$3]
  46. Call-ID: [call_id]
  47. Cseq: 1 NOTIFY
  48. Contact: sip:sipp@[local_ip]:[local_port]
  49. Max-Forwards: 70
  50. Event: presence
  51. Subscription-State: active;expires=10
  52. Content-Type: application/pidf+xml
  53. <?xml version="1.0" encoding="UTF-8"?>
  54. <presence xmlns="urn:ietf:params:xml:ns:pidf" xmlns:op="urn:oma:xml:prs:pidf:oma-pres" entity="sip:moto_red@ptt.intra.genaker.net">
  55. <tuple id="17415d5738f332a64a2f1d8cfb4ab0a5">
  56. <status>
  57. <basic>open</basic>
  58. </status>
  59. </tuple>
  60. </presence>
  61. ]]>
  62. </send>
  63. <recv response="200">
  64. </recv>
  65. <!-- Subscription has been established at this point -->
  66. <!-- *******
  67. Wait for subscription refresh, reply with 481
  68. -->
  69. <recv request="SUBSCRIBE" crlf="true">
  70. </recv>
  71. <send>
  72. <![CDATA[
  73. SIP/2.0 481 You should resubscribe mow
  74. [last_Via:]
  75. [last_From:]
  76. [last_To:];tag=[call_number]
  77. [last_Call-ID:]
  78. [last_CSeq:]
  79. Contact: <sip:sipp@[local_ip]:[local_port]>
  80. Content-Length: 0
  81. ]]>
  82. </send>
  83. <!-- definition of the response time repartition table (unit is ms) -->
  84. <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
  85. <!-- definition of the call length repartition table (unit is ms) -->
  86. <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
  87. </scenario>