uas-subscribe-late-notify.xml 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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="Late NOTIFY">
  26. <!-- By adding rrs="true" (Record Route Sets), the route sets -->
  27. <!-- are saved and used for following messages sent. Useful to test -->
  28. <!-- against stateful SIP proxies/B2BUAs. -->
  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. <!-- The '[last_*]' keyword is replaced automatically by the -->
  37. <!-- specified header if it was present in the last message received -->
  38. <!-- (except if it was a retransmission). If the header was not -->
  39. <!-- present or if no message has been received, the '[last_*]' -->
  40. <!-- keyword is discarded, and all bytes until the end of the line -->
  41. <!-- are also discarded. -->
  42. <!-- -->
  43. <!-- If the specified header was present several times in the -->
  44. <!-- message, all occurences are concatenated (CRLF seperated) -->
  45. <!-- to be used in place of the '[last_*]' keyword. -->
  46. <send>
  47. <![CDATA[
  48. SIP/2.0 200 OK
  49. [last_Via:]
  50. [last_From:]
  51. [last_To:];tag=[call_number]
  52. [last_Call-ID:]
  53. [last_CSeq:]
  54. Contact: <sip:sipp@[local_ip]:[local_port]>
  55. Content-Length: 0
  56. Expires: 60
  57. ]]>
  58. </send>
  59. <send retrans="500">
  60. <![CDATA[
  61. NOTIFY sip:[$5] SIP/2.0
  62. Via: SIP/2.0/[transport] [local_ip]:[local_port];rport;branch=z9hG4bKPj01
  63. From: sipp <sip:sipp@[local_ip]>;tag=[call_number]
  64. To[$3]
  65. Call-ID: [call_id]
  66. Cseq: 1 NOTIFY
  67. Contact: sip:sipp@[local_ip]:[local_port]
  68. Max-Forwards: 70
  69. Event: presence
  70. Subscription-State: active;expires=10
  71. Content-Type: application/pidf+xml
  72. <?xml version="1.0" encoding="UTF-8"?>
  73. <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">
  74. <tuple id="17415d5738f332a64a2f1d8cfb4ab0a5">
  75. <status>
  76. <basic>open</basic>
  77. </status>
  78. <op:willingness>
  79. <op:basic>closed</op:basic>
  80. </op:willingness>
  81. <op:barring-state>active</op:barring-state>
  82. <op:service-description>
  83. <op:service-id>org.openmobilealliance:PoC-session</op:service-id>
  84. <op:version>1.0</op:version>
  85. </op:service-description>
  86. </tuple>
  87. </presence>
  88. ]]>
  89. </send>
  90. <recv response="200">
  91. </recv>
  92. <recv request="SUBSCRIBE" crlf="true">
  93. </recv>
  94. <!-- UAC sends SUBSCRIBE, we do nothing -->
  95. <send>
  96. <![CDATA[
  97. SIP/2.0 408 Timeout Bo
  98. [last_Via:]
  99. [last_From:]
  100. [last_To:];tag=[call_number]
  101. [last_Call-ID:]
  102. [last_CSeq:]
  103. Contact: <sip:sipp@[local_ip]:[local_port]>
  104. Content-Length: 0
  105. Expires: 60
  106. ]]>
  107. </send>
  108. <!-- <pause milliseconds="32070"/> -->
  109. <!-- Now send late NOTIFY -->
  110. <send retrans="500">
  111. <![CDATA[
  112. NOTIFY sip:[$5] SIP/2.0
  113. Via: SIP/2.0/[transport] [local_ip]:[local_port];rport;branch=z9hG4bKPj02
  114. From: sipp <sip:sipp@[local_ip]>;tag=[call_number]
  115. To[$3]
  116. Call-ID: [call_id]
  117. Cseq: 2 NOTIFY
  118. Contact: sip:sipp@[local_ip]:[local_port]
  119. Max-Forwards: 70
  120. Event: presence
  121. Subscription-State: terminated;reason=timeout
  122. Content-Length: 0
  123. ]]>
  124. </send>
  125. <recv response="481">
  126. </recv>
  127. <!-- definition of the response time repartition table (unit is ms) -->
  128. <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
  129. <!-- definition of the call length repartition table (unit is ms) -->
  130. <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
  131. </scenario>