test_sdp_strings.h 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. /*
  2. * Copyright 2012 The WebRTC project authors. All Rights Reserved.
  3. *
  4. * Use of this source code is governed by a BSD-style license
  5. * that can be found in the LICENSE file in the root of the source
  6. * tree. An additional intellectual property rights grant can be found
  7. * in the file PATENTS. All contributing project authors may
  8. * be found in the AUTHORS file in the root of the source tree.
  9. */
  10. // This file contain SDP strings used for testing.
  11. #ifndef PC_TEST_TEST_SDP_STRINGS_H_
  12. #define PC_TEST_TEST_SDP_STRINGS_H_
  13. namespace webrtc {
  14. // SDP offer string from a Nightly FireFox build.
  15. static const char kFireFoxSdpOffer[] =
  16. "v=0\r\n"
  17. "o=Mozilla-SIPUA 23551 0 IN IP4 0.0.0.0\r\n"
  18. "s=SIP Call\r\n"
  19. "t=0 0\r\n"
  20. "a=ice-ufrag:e5785931\r\n"
  21. "a=ice-pwd:36fb7878390db89481c1d46daa4278d8\r\n"
  22. "a=fingerprint:sha-256 A7:24:72:CA:6E:02:55:39:BA:66:DF:6E:CC:4C:D8:B0:1A:"
  23. "BF:1A:56:65:7D:F4:03:AD:7E:77:43:2A:29:EC:93\r\n"
  24. "m=audio 36993 RTP/SAVPF 109 0 8 101\r\n"
  25. "c=IN IP4 74.95.2.170\r\n"
  26. "a=rtpmap:109 opus/48000/2\r\n"
  27. "a=ptime:20\r\n"
  28. "a=rtcp-mux\r\n"
  29. "a=rtpmap:0 PCMU/8000\r\n"
  30. "a=rtpmap:8 PCMA/8000\r\n"
  31. "a=rtpmap:101 telephone-event/8000\r\n"
  32. "a=fmtp:101 0-15\r\n"
  33. "a=sendrecv\r\n"
  34. "a=candidate:0 1 UDP 2112946431 172.16.191.1 61725 typ host\r\n"
  35. "a=candidate:2 1 UDP 2112487679 172.16.131.1 58798 typ host\r\n"
  36. "a=candidate:4 1 UDP 2113667327 10.0.254.2 58122 typ host\r\n"
  37. "a=candidate:5 1 UDP 1694302207 74.95.2.170 36993 typ srflx raddr "
  38. "10.0.254.2 rport 58122\r\n"
  39. "a=candidate:0 2 UDP 2112946430 172.16.191.1 55025 typ host\r\n"
  40. "a=candidate:2 2 UDP 2112487678 172.16.131.1 63576 typ host\r\n"
  41. "a=candidate:4 2 UDP 2113667326 10.0.254.2 50962 typ host\r\n"
  42. "a=candidate:5 2 UDP 1694302206 74.95.2.170 41028 typ srflx raddr"
  43. " 10.0.254.2 rport 50962\r\n"
  44. "m=video 38826 RTP/SAVPF 120\r\n"
  45. "c=IN IP4 74.95.2.170\r\n"
  46. "a=rtcp-mux\r\n"
  47. "a=rtpmap:120 VP8/90000\r\n"
  48. "a=sendrecv\r\n"
  49. "a=candidate:0 1 UDP 2112946431 172.16.191.1 62017 typ host\r\n"
  50. "a=candidate:2 1 UDP 2112487679 172.16.131.1 59741 typ host\r\n"
  51. "a=candidate:4 1 UDP 2113667327 10.0.254.2 62652 typ host\r\n"
  52. "a=candidate:5 1 UDP 1694302207 74.95.2.170 38826 typ srflx raddr"
  53. " 10.0.254.2 rport 62652\r\n"
  54. "a=candidate:0 2 UDP 2112946430 172.16.191.1 63440 typ host\r\n"
  55. "a=candidate:2 2 UDP 2112487678 172.16.131.1 51847 typ host\r\n"
  56. "a=candidate:4 2 UDP 2113667326 10.0.254.2 58890 typ host\r\n"
  57. "a=candidate:5 2 UDP 1694302206 74.95.2.170 33611 typ srflx raddr"
  58. " 10.0.254.2 rport 58890\r\n"
  59. #ifdef HAVE_SCTP
  60. "m=application 45536 DTLS/SCTP 5000\r\n"
  61. "c=IN IP4 74.95.2.170\r\n"
  62. "a=fmtp:5000 protocol=webrtc-datachannel;streams=16\r\n"
  63. "a=sendrecv\r\n"
  64. "a=candidate:0 1 UDP 2112946431 172.16.191.1 60248 typ host\r\n"
  65. "a=candidate:2 1 UDP 2112487679 172.16.131.1 55925 typ host\r\n"
  66. "a=candidate:4 1 UDP 2113667327 10.0.254.2 65268 typ host\r\n"
  67. "a=candidate:5 1 UDP 1694302207 74.95.2.170 45536 typ srflx raddr"
  68. " 10.0.254.2 rport 65268\r\n"
  69. "a=candidate:0 2 UDP 2112946430 172.16.191.1 49162 typ host\r\n"
  70. "a=candidate:2 2 UDP 2112487678 172.16.131.1 59635 typ host\r\n"
  71. "a=candidate:4 2 UDP 2113667326 10.0.254.2 61232 typ host\r\n"
  72. "a=candidate:5 2 UDP 1694302206 74.95.2.170 45468 typ srflx raddr"
  73. " 10.0.254.2 rport 61232\r\n"
  74. #endif
  75. ; // NOLINT(whitespace/semicolon)
  76. // Audio SDP with a limited set of audio codecs.
  77. static const char kAudioSdpPlanB[] =
  78. "v=0\r\n"
  79. "o=- 7859371131 2 IN IP4 192.168.30.208\r\n"
  80. "s=-\r\n"
  81. "c=IN IP4 192.168.30.208\r\n"
  82. "t=0 0\r\n"
  83. "m=audio 16000 RTP/SAVPF 0 8 126\r\n"
  84. "a=rtpmap:0 PCMU/8000\r\n"
  85. "a=rtpmap:8 PCMA/8000\r\n"
  86. "a=rtpmap:126 telephone-event/8000\r\n"
  87. "a=sendrecv\r\n"
  88. "a=rtcp:16000 IN IP4 192.168.30.208\r\n"
  89. "a=rtcp-mux\r\n"
  90. "a=crypto:0 AES_CM_128_HMAC_SHA1_80 "
  91. "inline:tvKIFjbMQ7W0/C2RzhwN0oQglj/7GJg+frdsNRxt\r\n"
  92. "a=ice-ufrag:AI2sRT3r\r\n"
  93. "a=ice-pwd:lByS9z2RSQlSE9XurlvjYmEm\r\n"
  94. "a=ssrc:4227871655 cname:GeAAgb6XCPNLVMX5\r\n"
  95. "a=ssrc:4227871655 msid:1NFAV3iD08ioO2339rQS9pfOI9mDf6GeG9F4 a0\r\n"
  96. "a=ssrc:4227871655 mslabel:1NFAV3iD08ioO2339rQS9pfOI9mDf6GeG9F4\r\n"
  97. "a=ssrc:4227871655 label:1NFAV3iD08ioO2339rQS9pfOI9mDf6GeG9F4a0\r\n"
  98. "a=mid:audio\r\n";
  99. // Same string as above but with the MID changed to the Unified Plan default.
  100. // This is needed so that this SDP can be used as an answer for a Unified Plan
  101. // offer.
  102. static const char kAudioSdpUnifiedPlan[] =
  103. "v=0\r\n"
  104. "o=- 7859371131 2 IN IP4 192.168.30.208\r\n"
  105. "s=-\r\n"
  106. "c=IN IP4 192.168.30.208\r\n"
  107. "t=0 0\r\n"
  108. "m=audio 16000 RTP/SAVPF 0 8 126\r\n"
  109. "a=rtpmap:0 PCMU/8000\r\n"
  110. "a=rtpmap:8 PCMA/8000\r\n"
  111. "a=rtpmap:126 telephone-event/8000\r\n"
  112. "a=sendrecv\r\n"
  113. "a=rtcp:16000 IN IP4 192.168.30.208\r\n"
  114. "a=rtcp-mux\r\n"
  115. "a=crypto:0 AES_CM_128_HMAC_SHA1_80 "
  116. "inline:tvKIFjbMQ7W0/C2RzhwN0oQglj/7GJg+frdsNRxt\r\n"
  117. "a=ice-ufrag:AI2sRT3r\r\n"
  118. "a=ice-pwd:lByS9z2RSQlSE9XurlvjYmEm\r\n"
  119. "a=ssrc:4227871655 cname:GeAAgb6XCPNLVMX5\r\n"
  120. "a=ssrc:4227871655 msid:1NFAV3iD08ioO2339rQS9pfOI9mDf6GeG9F4 a0\r\n"
  121. "a=ssrc:4227871655 mslabel:1NFAV3iD08ioO2339rQS9pfOI9mDf6GeG9F4\r\n"
  122. "a=ssrc:4227871655 label:1NFAV3iD08ioO2339rQS9pfOI9mDf6GeG9F4a0\r\n"
  123. "a=mid:0\r\n";
  124. static const char kAudioSdpWithUnsupportedCodecsPlanB[] =
  125. "v=0\r\n"
  126. "o=- 6858750541 2 IN IP4 192.168.30.208\r\n"
  127. "s=-\r\n"
  128. "c=IN IP4 192.168.30.208\r\n"
  129. "t=0 0\r\n"
  130. "m=audio 16000 RTP/SAVPF 0 8 18 110 126\r\n"
  131. "a=rtpmap:0 PCMU/8000\r\n"
  132. "a=rtpmap:8 PCMA/8000\r\n"
  133. "a=rtpmap:18 WeirdCodec1/8000\r\n"
  134. "a=rtpmap:110 WeirdCodec2/8000\r\n"
  135. "a=rtpmap:126 telephone-event/8000\r\n"
  136. "a=sendonly\r\n"
  137. "a=rtcp:16000 IN IP4 192.168.30.208\r\n"
  138. "a=rtcp-mux\r\n"
  139. "a=crypto:0 AES_CM_128_HMAC_SHA1_80 "
  140. "inline:tvKIFjbMQ7W0/C2RzhwN0oQglj/7GJg+frdsNRxt\r\n"
  141. "a=ice-ufrag:AI2sRT3r\r\n"
  142. "a=ice-pwd:lByS9z2RSQlSE9XurlvjYmEm\r\n"
  143. "a=ssrc:4227871655 cname:TsmD02HRfhkJBm4m\r\n"
  144. "a=ssrc:4227871655 msid:7nU0TApbB-n4dfPlCplWT9QTEsbBDS1IlpW3 a0\r\n"
  145. "a=ssrc:4227871655 mslabel:7nU0TApbB-n4dfPlCplWT9QTEsbBDS1IlpW3\r\n"
  146. "a=ssrc:4227871655 label:7nU0TApbB-n4dfPlCplWT9QTEsbBDS1IlpW3a0\r\n"
  147. "a=mid:audio\r\n";
  148. // Same string as above but with the MID changed to the Unified Plan default.
  149. // This is needed so that this SDP can be used as an answer for a Unified Plan
  150. // offer.
  151. static const char kAudioSdpWithUnsupportedCodecsUnifiedPlan[] =
  152. "v=0\r\n"
  153. "o=- 6858750541 2 IN IP4 192.168.30.208\r\n"
  154. "s=-\r\n"
  155. "c=IN IP4 192.168.30.208\r\n"
  156. "t=0 0\r\n"
  157. "m=audio 16000 RTP/SAVPF 0 8 18 110 126\r\n"
  158. "a=rtpmap:0 PCMU/8000\r\n"
  159. "a=rtpmap:8 PCMA/8000\r\n"
  160. "a=rtpmap:18 WeirdCodec1/8000\r\n"
  161. "a=rtpmap:110 WeirdCodec2/8000\r\n"
  162. "a=rtpmap:126 telephone-event/8000\r\n"
  163. "a=sendonly\r\n"
  164. "a=rtcp:16000 IN IP4 192.168.30.208\r\n"
  165. "a=rtcp-mux\r\n"
  166. "a=crypto:0 AES_CM_128_HMAC_SHA1_80 "
  167. "inline:tvKIFjbMQ7W0/C2RzhwN0oQglj/7GJg+frdsNRxt\r\n"
  168. "a=ice-ufrag:AI2sRT3r\r\n"
  169. "a=ice-pwd:lByS9z2RSQlSE9XurlvjYmEm\r\n"
  170. "a=ssrc:4227871655 cname:TsmD02HRfhkJBm4m\r\n"
  171. "a=ssrc:4227871655 msid:7nU0TApbB-n4dfPlCplWT9QTEsbBDS1IlpW3 a0\r\n"
  172. "a=ssrc:4227871655 mslabel:7nU0TApbB-n4dfPlCplWT9QTEsbBDS1IlpW3\r\n"
  173. "a=ssrc:4227871655 label:7nU0TApbB-n4dfPlCplWT9QTEsbBDS1IlpW3a0\r\n"
  174. "a=mid:0\r\n";
  175. } // namespace webrtc
  176. #endif // PC_TEST_TEST_SDP_STRINGS_H_