uas-subscribe-terminated-retry.xml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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. <!-- Late NOTIFY scenario: -->
  19. <!-- - UAC sends SUBSCRIBE, we reply with 200 -->
  20. <!-- - we send NOTIFY, expect 200 -->
  21. <!-- - UAC sends SUBSCRIBE, we ignore -->
  22. <!-- - we send NOTIFY -->
  23. <!-- See https://github.com/pjsip/pjproject/issues/911 -->
  24. <!-- -->
  25. <scenario name="NOTIFY with terminated status with some reason code should cause UAC to retry">
  26. <!-- Establish subscription -->
  27. <recv request="SUBSCRIBE" crlf="true">
  28. <action>
  29. <ereg regexp=".*" search_in="hdr" header="From" assign_to="3"/>
  30. <ereg regexp="sip:(.*)>" search_in="hdr" header="Contact" assign_to="4,5"/>
  31. <assign assign_to="4" variable="5" />
  32. </action>
  33. </recv>
  34. <send>
  35. <![CDATA[
  36. SIP/2.0 200 OK
  37. [last_Via:]
  38. [last_From:]
  39. [last_To:];tag=[call_number]
  40. [last_Call-ID:]
  41. [last_CSeq:]
  42. Contact: <sip:sipp@[local_ip]:[local_port]>
  43. Content-Length: 0
  44. Expires: 60
  45. ]]>
  46. </send>
  47. <send retrans="500">
  48. <![CDATA[
  49. NOTIFY sip:[$5] SIP/2.0
  50. Via: SIP/2.0/[transport] [local_ip]:[local_port];rport;branch=[branch]
  51. From: sipp <sip:sipp@[local_ip]>;tag=[call_number]
  52. To[$3]
  53. Call-ID: [call_id]
  54. Cseq: 1 NOTIFY
  55. Contact: sip:sipp@[local_ip]:[local_port]
  56. Max-Forwards: 70
  57. Event: presence
  58. Subscription-State: active;expires=50
  59. Content-Type: application/pidf+xml
  60. <?xml version="1.0" encoding="UTF-8"?>
  61. <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">
  62. <tuple id="17415d5738f332a64a2f1d8cfb4ab0a5">
  63. <status>
  64. <basic>open</basic>
  65. </status>
  66. </tuple>
  67. </presence>
  68. ]]>
  69. </send>
  70. <recv response="200">
  71. </recv>
  72. <!-- Subscription has been established at this point -->
  73. <pause milliseconds="4000"/>
  74. <!-- *******
  75. Send NOTIFY termination
  76. -->
  77. <send retrans="500">
  78. <![CDATA[
  79. NOTIFY sip:[$5] SIP/2.0
  80. Via: SIP/2.0/[transport] [local_ip]:[local_port];rport;branch=[branch]
  81. From: sipp <sip:sipp@[local_ip]>;tag=[call_number]
  82. To[$3]
  83. Call-ID: [call_id]
  84. Cseq: 3 NOTIFY
  85. Contact: sip:sipp@[local_ip]:[local_port]
  86. Max-Forwards: 70
  87. Event: presence
  88. Subscription-State: terminated;reason=probation;retry-after=5
  89. Content-Length: 0
  90. ]]>
  91. </send>
  92. <recv response="200">
  93. </recv>
  94. <!-- definition of the response time repartition table (unit is ms) -->
  95. <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
  96. <!-- definition of the call length repartition table (unit is ms) -->
  97. <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
  98. </scenario>