ue-softphone-sdk 2.2.5 → 2.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (389) hide show
  1. package/dist/{index.d.ts → types/index.d.ts} +3 -7
  2. package/dist/ue-softphone-sdk.js +7 -2
  3. package/package.json +5 -6
  4. package/{new-rollup.config.mjs → rollup-new.config.mjs} +1 -1
  5. package/rollup.config.js +14 -15
  6. package/src/index.ts +28 -53
  7. package/tsconfig.json +10 -26
  8. package/dist/api/bye.d.ts +0 -16
  9. package/dist/api/dtmf.d.ts +0 -15
  10. package/dist/api/emitter.d.ts +0 -88
  11. package/dist/api/exceptions/content-type-unsupported.d.ts +0 -8
  12. package/dist/api/exceptions/index.d.ts +0 -5
  13. package/dist/api/exceptions/request-pending.d.ts +0 -9
  14. package/dist/api/exceptions/session-description-handler.d.ts +0 -8
  15. package/dist/api/exceptions/session-terminated.d.ts +0 -8
  16. package/dist/api/exceptions/state-transition.d.ts +0 -8
  17. package/dist/api/index.d.ts +0 -58
  18. package/dist/api/info.d.ts +0 -16
  19. package/dist/api/invitation-accept-options.d.ts +0 -19
  20. package/dist/api/invitation-progress-options.d.ts +0 -38
  21. package/dist/api/invitation-reject-options.d.ts +0 -25
  22. package/dist/api/invitation.d.ts +0 -179
  23. package/dist/api/inviter-cancel-options.d.ts +0 -9
  24. package/dist/api/inviter-invite-options.d.ts +0 -28
  25. package/dist/api/inviter-options.d.ts +0 -43
  26. package/dist/api/inviter.d.ts +0 -236
  27. package/dist/api/message.d.ts +0 -16
  28. package/dist/api/messager-message-options.d.ts +0 -11
  29. package/dist/api/messager-options.d.ts +0 -17
  30. package/dist/api/messager.d.ts +0 -26
  31. package/dist/api/notification.d.ts +0 -16
  32. package/dist/api/notifier.d.ts +0 -8
  33. package/dist/api/publisher-options.d.ts +0 -33
  34. package/dist/api/publisher-publish-options.d.ts +0 -6
  35. package/dist/api/publisher-state.d.ts +0 -21
  36. package/dist/api/publisher-unpublish-options.d.ts +0 -6
  37. package/dist/api/publisher.d.ts +0 -65
  38. package/dist/api/referral.d.ts +0 -38
  39. package/dist/api/registerer-options.d.ts +0 -46
  40. package/dist/api/registerer-register-options.d.ts +0 -11
  41. package/dist/api/registerer-state.d.ts +0 -21
  42. package/dist/api/registerer-unregister-options.d.ts +0 -16
  43. package/dist/api/registerer.d.ts +0 -144
  44. package/dist/api/session-bye-options.d.ts +0 -11
  45. package/dist/api/session-delegate.d.ts +0 -73
  46. package/dist/api/session-description-handler-factory.d.ts +0 -15
  47. package/dist/api/session-description-handler.d.ts +0 -74
  48. package/dist/api/session-info-options.d.ts +0 -11
  49. package/dist/api/session-invite-options.d.ts +0 -28
  50. package/dist/api/session-message-options.d.ts +0 -11
  51. package/dist/api/session-options.d.ts +0 -8
  52. package/dist/api/session-refer-options.d.ts +0 -14
  53. package/dist/api/session-state.d.ts +0 -45
  54. package/dist/api/session.d.ts +0 -359
  55. package/dist/api/subscriber-options.d.ts +0 -11
  56. package/dist/api/subscriber-subscribe-options.d.ts +0 -6
  57. package/dist/api/subscriber.d.ts +0 -94
  58. package/dist/api/subscription-delegate.d.ts +0 -12
  59. package/dist/api/subscription-options.d.ts +0 -8
  60. package/dist/api/subscription-state.d.ts +0 -19
  61. package/dist/api/subscription-subscribe-options.d.ts +0 -6
  62. package/dist/api/subscription-unsubscribe-options.d.ts +0 -6
  63. package/dist/api/subscription.d.ts +0 -84
  64. package/dist/api/transport-state.d.ts +0 -37
  65. package/dist/api/transport.d.ts +0 -159
  66. package/dist/api/user-agent-delegate.d.ts +0 -84
  67. package/dist/api/user-agent-options.d.ts +0 -253
  68. package/dist/api/user-agent-state.d.ts +0 -14
  69. package/dist/api/user-agent.d.ts +0 -200
  70. package/dist/core/dialogs/dialog-state.d.ts +0 -34
  71. package/dist/core/dialogs/dialog.d.ts +0 -161
  72. package/dist/core/dialogs/index.d.ts +0 -4
  73. package/dist/core/dialogs/session-dialog.d.ts +0 -196
  74. package/dist/core/dialogs/subscription-dialog.d.ts +0 -120
  75. package/dist/core/exceptions/exception.d.ts +0 -8
  76. package/dist/core/exceptions/index.d.ts +0 -3
  77. package/dist/core/exceptions/transaction-state-error.d.ts +0 -8
  78. package/dist/core/exceptions/transport-error.d.ts +0 -8
  79. package/dist/core/index.d.ts +0 -15
  80. package/dist/core/log/index.d.ts +0 -3
  81. package/dist/core/log/levels.d.ts +0 -10
  82. package/dist/core/log/logger-factory.d.ts +0 -21
  83. package/dist/core/log/logger.d.ts +0 -19
  84. package/dist/core/messages/body.d.ts +0 -64
  85. package/dist/core/messages/digest-authentication.d.ts +0 -51
  86. package/dist/core/messages/incoming-message.d.ts +0 -79
  87. package/dist/core/messages/incoming-request-message.d.ts +0 -10
  88. package/dist/core/messages/incoming-request.d.ts +0 -67
  89. package/dist/core/messages/incoming-response-message.d.ts +0 -10
  90. package/dist/core/messages/incoming-response.d.ts +0 -12
  91. package/dist/core/messages/index.d.ts +0 -13
  92. package/dist/core/messages/md5.d.ts +0 -32
  93. package/dist/core/messages/methods/ack.d.ts +0 -18
  94. package/dist/core/messages/methods/bye.d.ts +0 -21
  95. package/dist/core/messages/methods/cancel.d.ts +0 -21
  96. package/dist/core/messages/methods/constants.d.ts +0 -20
  97. package/dist/core/messages/methods/index.d.ts +0 -13
  98. package/dist/core/messages/methods/info.d.ts +0 -21
  99. package/dist/core/messages/methods/invite.d.ts +0 -86
  100. package/dist/core/messages/methods/message.d.ts +0 -21
  101. package/dist/core/messages/methods/notify.d.ts +0 -21
  102. package/dist/core/messages/methods/prack.d.ts +0 -21
  103. package/dist/core/messages/methods/publish.d.ts +0 -21
  104. package/dist/core/messages/methods/refer.d.ts +0 -21
  105. package/dist/core/messages/methods/register.d.ts +0 -21
  106. package/dist/core/messages/methods/subscribe.d.ts +0 -54
  107. package/dist/core/messages/outgoing-request-message.d.ts +0 -94
  108. package/dist/core/messages/outgoing-request.d.ts +0 -67
  109. package/dist/core/messages/outgoing-response.d.ts +0 -42
  110. package/dist/core/messages/parser.d.ts +0 -14
  111. package/dist/core/messages/utils.d.ts +0 -24
  112. package/dist/core/session/index.d.ts +0 -2
  113. package/dist/core/session/session-delegate.d.ts +0 -70
  114. package/dist/core/session/session.d.ts +0 -134
  115. package/dist/core/subscription/index.d.ts +0 -2
  116. package/dist/core/subscription/subscription-delegate.d.ts +0 -27
  117. package/dist/core/subscription/subscription.d.ts +0 -55
  118. package/dist/core/timers.d.ts +0 -20
  119. package/dist/core/transactions/client-transaction.d.ts +0 -45
  120. package/dist/core/transactions/index.d.ts +0 -10
  121. package/dist/core/transactions/invite-client-transaction.d.ts +0 -116
  122. package/dist/core/transactions/invite-server-transaction.d.ts +0 -127
  123. package/dist/core/transactions/non-invite-client-transaction.d.ts +0 -69
  124. package/dist/core/transactions/non-invite-server-transaction.d.ts +0 -57
  125. package/dist/core/transactions/server-transaction.d.ts +0 -35
  126. package/dist/core/transactions/transaction-state.d.ts +0 -13
  127. package/dist/core/transactions/transaction-user.d.ts +0 -72
  128. package/dist/core/transactions/transaction.d.ts +0 -79
  129. package/dist/core/transport.d.ts +0 -31
  130. package/dist/core/user-agent-core/allowed-methods.d.ts +0 -4
  131. package/dist/core/user-agent-core/index.d.ts +0 -3
  132. package/dist/core/user-agent-core/user-agent-core-configuration.d.ts +0 -99
  133. package/dist/core/user-agent-core/user-agent-core-delegate.d.ts +0 -37
  134. package/dist/core/user-agent-core/user-agent-core.d.ts +0 -179
  135. package/dist/core/user-agents/bye-user-agent-client.d.ts +0 -10
  136. package/dist/core/user-agents/bye-user-agent-server.d.ts +0 -10
  137. package/dist/core/user-agents/cancel-user-agent-client.d.ts +0 -10
  138. package/dist/core/user-agents/index.d.ts +0 -26
  139. package/dist/core/user-agents/info-user-agent-client.d.ts +0 -10
  140. package/dist/core/user-agents/info-user-agent-server.d.ts +0 -10
  141. package/dist/core/user-agents/invite-user-agent-client.d.ts +0 -35
  142. package/dist/core/user-agents/invite-user-agent-server.d.ts +0 -77
  143. package/dist/core/user-agents/message-user-agent-client.d.ts +0 -10
  144. package/dist/core/user-agents/message-user-agent-server.d.ts +0 -10
  145. package/dist/core/user-agents/notify-user-agent-client.d.ts +0 -10
  146. package/dist/core/user-agents/notify-user-agent-server.d.ts +0 -16
  147. package/dist/core/user-agents/prack-user-agent-client.d.ts +0 -10
  148. package/dist/core/user-agents/prack-user-agent-server.d.ts +0 -16
  149. package/dist/core/user-agents/publish-user-agent-client.d.ts +0 -10
  150. package/dist/core/user-agents/re-invite-user-agent-client.d.ts +0 -18
  151. package/dist/core/user-agents/re-invite-user-agent-server.d.ts +0 -41
  152. package/dist/core/user-agents/re-subscribe-user-agent-client.d.ts +0 -17
  153. package/dist/core/user-agents/re-subscribe-user-agent-server.d.ts +0 -10
  154. package/dist/core/user-agents/refer-user-agent-client.d.ts +0 -10
  155. package/dist/core/user-agents/refer-user-agent-server.d.ts +0 -16
  156. package/dist/core/user-agents/register-user-agent-client.d.ts +0 -10
  157. package/dist/core/user-agents/register-user-agent-server.d.ts +0 -11
  158. package/dist/core/user-agents/subscribe-user-agent-client.d.ts +0 -65
  159. package/dist/core/user-agents/subscribe-user-agent-server.d.ts +0 -11
  160. package/dist/core/user-agents/user-agent-client.d.ts +0 -103
  161. package/dist/core/user-agents/user-agent-server.d.ts +0 -79
  162. package/dist/grammar/grammar.d.ts +0 -26
  163. package/dist/grammar/index.d.ts +0 -4
  164. package/dist/grammar/name-addr-header.d.ts +0 -24
  165. package/dist/grammar/parameters.d.ts +0 -16
  166. package/dist/grammar/pegjs/dist/grammar.d.ts +0 -50
  167. package/dist/grammar/uri.d.ts +0 -62
  168. package/dist/main.d.ts +0 -9
  169. package/dist/new-index.d.ts +0 -199
  170. package/dist/platform/web/index.d.ts +0 -4
  171. package/dist/platform/web/modifiers/index.d.ts +0 -5
  172. package/dist/platform/web/modifiers/modifiers.d.ts +0 -41
  173. package/dist/platform/web/session-description-handler/index.d.ts +0 -14
  174. package/dist/platform/web/session-description-handler/media-stream-factory-default.d.ts +0 -6
  175. package/dist/platform/web/session-description-handler/media-stream-factory.d.ts +0 -6
  176. package/dist/platform/web/session-description-handler/peer-connection-configuration-default.d.ts +0 -5
  177. package/dist/platform/web/session-description-handler/peer-connection-delegate.d.ts +0 -63
  178. package/dist/platform/web/session-description-handler/session-description-handler-configuration.d.ts +0 -16
  179. package/dist/platform/web/session-description-handler/session-description-handler-factory-default.d.ts +0 -11
  180. package/dist/platform/web/session-description-handler/session-description-handler-factory-options.d.ts +0 -9
  181. package/dist/platform/web/session-description-handler/session-description-handler-factory.d.ts +0 -16
  182. package/dist/platform/web/session-description-handler/session-description-handler-options.d.ts +0 -47
  183. package/dist/platform/web/session-description-handler/session-description-handler.d.ts +0 -212
  184. package/dist/platform/web/simple-user/index.d.ts +0 -7
  185. package/dist/platform/web/simple-user/simple-user-delegate.d.ts +0 -72
  186. package/dist/platform/web/simple-user/simple-user-options.d.ts +0 -90
  187. package/dist/platform/web/simple-user/simple-user.d.ts +0 -226
  188. package/dist/platform/web/transport/index.d.ts +0 -6
  189. package/dist/platform/web/transport/transport-options.d.ts +0 -30
  190. package/dist/platform/web/transport/transport.d.ts +0 -125
  191. package/dist/ue-softphone-sdk.js.map +0 -1
  192. package/dist/version.d.ts +0 -1
  193. package/dist/webPhoneSdk.d.ts +0 -24
  194. package/dist/webrtc.d.ts +0 -17
  195. package/src/api/api-extractor.json +0 -358
  196. package/src/api/bye.ts +0 -27
  197. package/src/api/dtmf.ts +0 -27
  198. package/src/api/emitter.ts +0 -110
  199. package/src/api/exceptions/content-type-unsupported.ts +0 -11
  200. package/src/api/exceptions/index.ts +0 -5
  201. package/src/api/exceptions/request-pending.ts +0 -12
  202. package/src/api/exceptions/session-description-handler.ts +0 -11
  203. package/src/api/exceptions/session-terminated.ts +0 -11
  204. package/src/api/exceptions/state-transition.ts +0 -11
  205. package/src/api/index.ts +0 -58
  206. package/src/api/info.ts +0 -27
  207. package/src/api/invitation-accept-options.ts +0 -20
  208. package/src/api/invitation-progress-options.ts +0 -36
  209. package/src/api/invitation-reject-options.ts +0 -22
  210. package/src/api/invitation.ts +0 -816
  211. package/src/api/inviter-cancel-options.ts +0 -9
  212. package/src/api/inviter-invite-options.ts +0 -29
  213. package/src/api/inviter-options.ts +0 -44
  214. package/src/api/inviter.ts +0 -1126
  215. package/src/api/message.ts +0 -27
  216. package/src/api/messager-message-options.ts +0 -12
  217. package/src/api/messager-options.ts +0 -18
  218. package/src/api/messager.ts +0 -89
  219. package/src/api/notification.ts +0 -27
  220. package/src/api/notifier.ts +0 -7
  221. package/src/api/publisher-options.ts +0 -34
  222. package/src/api/publisher-publish-options.ts +0 -6
  223. package/src/api/publisher-state.ts +0 -21
  224. package/src/api/publisher-unpublish-options.ts +0 -6
  225. package/src/api/publisher.ts +0 -418
  226. package/src/api/referral.ts +0 -89
  227. package/src/api/registerer-options.ts +0 -55
  228. package/src/api/registerer-register-options.ts +0 -12
  229. package/src/api/registerer-state.ts +0 -21
  230. package/src/api/registerer-unregister-options.ts +0 -17
  231. package/src/api/registerer.ts +0 -814
  232. package/src/api/session-bye-options.ts +0 -12
  233. package/src/api/session-delegate.ts +0 -80
  234. package/src/api/session-description-handler-factory.ts +0 -16
  235. package/src/api/session-description-handler.ts +0 -89
  236. package/src/api/session-info-options.ts +0 -12
  237. package/src/api/session-invite-options.ts +0 -29
  238. package/src/api/session-message-options.ts +0 -12
  239. package/src/api/session-options.ts +0 -8
  240. package/src/api/session-refer-options.ts +0 -15
  241. package/src/api/session-state.ts +0 -45
  242. package/src/api/session.ts +0 -1448
  243. package/src/api/subscriber-options.ts +0 -12
  244. package/src/api/subscriber-subscribe-options.ts +0 -6
  245. package/src/api/subscriber.ts +0 -536
  246. package/src/api/subscription-delegate.ts +0 -13
  247. package/src/api/subscription-options.ts +0 -8
  248. package/src/api/subscription-state.ts +0 -19
  249. package/src/api/subscription-subscribe-options.ts +0 -6
  250. package/src/api/subscription-unsubscribe-options.ts +0 -6
  251. package/src/api/subscription.ts +0 -161
  252. package/src/api/transport-state.ts +0 -37
  253. package/src/api/transport.ts +0 -169
  254. package/src/api/user-agent-delegate.ts +0 -95
  255. package/src/api/user-agent-options.ts +0 -322
  256. package/src/api/user-agent-state.ts +0 -14
  257. package/src/api/user-agent.ts +0 -1014
  258. package/src/core/api-extractor.json +0 -358
  259. package/src/core/dialogs/dialog-state.ts +0 -35
  260. package/src/core/dialogs/dialog.ts +0 -605
  261. package/src/core/dialogs/index.ts +0 -4
  262. package/src/core/dialogs/session-dialog.ts +0 -996
  263. package/src/core/dialogs/subscription-dialog.ts +0 -557
  264. package/src/core/exceptions/exception.ts +0 -11
  265. package/src/core/exceptions/index.ts +0 -3
  266. package/src/core/exceptions/transaction-state-error.ts +0 -11
  267. package/src/core/exceptions/transport-error.ts +0 -11
  268. package/src/core/index.ts +0 -19
  269. package/src/core/log/index.ts +0 -3
  270. package/src/core/log/levels.ts +0 -10
  271. package/src/core/log/logger-factory.ts +0 -119
  272. package/src/core/log/logger.ts +0 -42
  273. package/src/core/messages/body.ts +0 -171
  274. package/src/core/messages/digest-authentication.ts +0 -190
  275. package/src/core/messages/incoming-message.ts +0 -152
  276. package/src/core/messages/incoming-request-message.ts +0 -14
  277. package/src/core/messages/incoming-request.ts +0 -75
  278. package/src/core/messages/incoming-response-message.ts +0 -14
  279. package/src/core/messages/incoming-response.ts +0 -13
  280. package/src/core/messages/index.ts +0 -18
  281. package/src/core/messages/md5.ts +0 -437
  282. package/src/core/messages/methods/ack.ts +0 -22
  283. package/src/core/messages/methods/bye.ts +0 -22
  284. package/src/core/messages/methods/cancel.ts +0 -22
  285. package/src/core/messages/methods/constants.ts +0 -21
  286. package/src/core/messages/methods/index.ts +0 -13
  287. package/src/core/messages/methods/info.ts +0 -22
  288. package/src/core/messages/methods/invite.ts +0 -104
  289. package/src/core/messages/methods/message.ts +0 -22
  290. package/src/core/messages/methods/notify.ts +0 -22
  291. package/src/core/messages/methods/prack.ts +0 -22
  292. package/src/core/messages/methods/publish.ts +0 -22
  293. package/src/core/messages/methods/refer.ts +0 -22
  294. package/src/core/messages/methods/register.ts +0 -22
  295. package/src/core/messages/methods/subscribe.ts +0 -59
  296. package/src/core/messages/outgoing-request-message.ts +0 -299
  297. package/src/core/messages/outgoing-request.ts +0 -77
  298. package/src/core/messages/outgoing-response.ts +0 -174
  299. package/src/core/messages/parser.ts +0 -265
  300. package/src/core/messages/utils.ts +0 -144
  301. package/src/core/session/index.ts +0 -2
  302. package/src/core/session/session-delegate.ts +0 -88
  303. package/src/core/session/session.ts +0 -158
  304. package/src/core/subscription/index.ts +0 -2
  305. package/src/core/subscription/subscription-delegate.ts +0 -30
  306. package/src/core/subscription/subscription.ts +0 -61
  307. package/src/core/timers.ts +0 -24
  308. package/src/core/transactions/client-transaction.ts +0 -78
  309. package/src/core/transactions/index.ts +0 -10
  310. package/src/core/transactions/invite-client-transaction.ts +0 -504
  311. package/src/core/transactions/invite-server-transaction.ts +0 -432
  312. package/src/core/transactions/non-invite-client-transaction.ts +0 -257
  313. package/src/core/transactions/non-invite-server-transaction.ts +0 -241
  314. package/src/core/transactions/server-transaction.ts +0 -47
  315. package/src/core/transactions/transaction-state.ts +0 -13
  316. package/src/core/transactions/transaction-user.ts +0 -82
  317. package/src/core/transactions/transaction.ts +0 -149
  318. package/src/core/transport.ts +0 -32
  319. package/src/core/user-agent-core/allowed-methods.ts +0 -19
  320. package/src/core/user-agent-core/index.ts +0 -3
  321. package/src/core/user-agent-core/user-agent-core-configuration.ts +0 -111
  322. package/src/core/user-agent-core/user-agent-core-delegate.ts +0 -50
  323. package/src/core/user-agent-core/user-agent-core.ts +0 -905
  324. package/src/core/user-agents/bye-user-agent-client.ts +0 -16
  325. package/src/core/user-agents/bye-user-agent-server.ts +0 -14
  326. package/src/core/user-agents/cancel-user-agent-client.ts +0 -14
  327. package/src/core/user-agents/index.ts +0 -26
  328. package/src/core/user-agents/info-user-agent-client.ts +0 -15
  329. package/src/core/user-agents/info-user-agent-server.ts +0 -14
  330. package/src/core/user-agents/invite-user-agent-client.ts +0 -405
  331. package/src/core/user-agents/invite-user-agent-server.ts +0 -269
  332. package/src/core/user-agents/message-user-agent-client.ts +0 -14
  333. package/src/core/user-agents/message-user-agent-server.ts +0 -14
  334. package/src/core/user-agents/notify-user-agent-client.ts +0 -15
  335. package/src/core/user-agents/notify-user-agent-server.ts +0 -30
  336. package/src/core/user-agents/prack-user-agent-client.ts +0 -16
  337. package/src/core/user-agents/prack-user-agent-server.ts +0 -37
  338. package/src/core/user-agents/publish-user-agent-client.ts +0 -14
  339. package/src/core/user-agents/re-invite-user-agent-client.ts +0 -127
  340. package/src/core/user-agents/re-invite-user-agent-server.ts +0 -109
  341. package/src/core/user-agents/re-subscribe-user-agent-client.ts +0 -78
  342. package/src/core/user-agents/re-subscribe-user-agent-server.ts +0 -14
  343. package/src/core/user-agents/refer-user-agent-client.ts +0 -15
  344. package/src/core/user-agents/refer-user-agent-server.ts +0 -30
  345. package/src/core/user-agents/register-user-agent-client.ts +0 -14
  346. package/src/core/user-agents/register-user-agent-server.ts +0 -14
  347. package/src/core/user-agents/subscribe-user-agent-client.ts +0 -341
  348. package/src/core/user-agents/subscribe-user-agent-server.ts +0 -14
  349. package/src/core/user-agents/user-agent-client.ts +0 -378
  350. package/src/core/user-agents/user-agent-server.ts +0 -276
  351. package/src/grammar/grammar.ts +0 -55
  352. package/src/grammar/index.ts +0 -4
  353. package/src/grammar/name-addr-header.ts +0 -58
  354. package/src/grammar/parameters.ts +0 -45
  355. package/src/grammar/pegjs/README.md +0 -9
  356. package/src/grammar/pegjs/dist/grammar.ts +0 -1557
  357. package/src/grammar/pegjs/src/grammar.pegjs +0 -1009
  358. package/src/grammar/uri.ts +0 -370
  359. package/src/main.ts +0 -26
  360. package/src/new-index.ts +0 -2486
  361. package/src/platform/react/README.md +0 -1
  362. package/src/platform/web/index.ts +0 -4
  363. package/src/platform/web/modifiers/index.ts +0 -5
  364. package/src/platform/web/modifiers/modifiers.ts +0 -180
  365. package/src/platform/web/session-description-handler/api-extractor.json +0 -358
  366. package/src/platform/web/session-description-handler/index.ts +0 -14
  367. package/src/platform/web/session-description-handler/media-stream-factory-default.ts +0 -22
  368. package/src/platform/web/session-description-handler/media-stream-factory.ts +0 -10
  369. package/src/platform/web/session-description-handler/peer-connection-configuration-default.ts +0 -17
  370. package/src/platform/web/session-description-handler/peer-connection-delegate.ts +0 -72
  371. package/src/platform/web/session-description-handler/session-description-handler-configuration.ts +0 -17
  372. package/src/platform/web/session-description-handler/session-description-handler-factory-default.ts +0 -45
  373. package/src/platform/web/session-description-handler/session-description-handler-factory-options.ts +0 -10
  374. package/src/platform/web/session-description-handler/session-description-handler-factory.ts +0 -17
  375. package/src/platform/web/session-description-handler/session-description-handler-options.ts +0 -56
  376. package/src/platform/web/session-description-handler/session-description-handler.ts +0 -938
  377. package/src/platform/web/simple-user/api-extractor.json +0 -358
  378. package/src/platform/web/simple-user/index.ts +0 -7
  379. package/src/platform/web/simple-user/simple-user-delegate.ts +0 -82
  380. package/src/platform/web/simple-user/simple-user-options.ts +0 -102
  381. package/src/platform/web/simple-user/simple-user.ts +0 -1099
  382. package/src/platform/web/transport/api-extractor.json +0 -358
  383. package/src/platform/web/transport/index.ts +0 -6
  384. package/src/platform/web/transport/transport-options.ts +0 -34
  385. package/src/platform/web/transport/transport.ts +0 -742
  386. package/src/version.ts +0 -8
  387. package/src/webPhoneSdk.ts +0 -67
  388. package/src/webrtc.ts +0 -318
  389. /package/dist/{config.d.ts → types/config.d.ts} +0 -0
@@ -1,504 +0,0 @@
1
- import { TransportError } from "../exceptions";
2
-
3
- import { IncomingResponseMessage, OutgoingRequestMessage } from "../messages";
4
- import { Timers } from "../timers";
5
- import { Transport } from "../transport";
6
- import { ClientTransaction } from "./client-transaction";
7
- import { TransactionState } from "./transaction-state";
8
- import { ClientTransactionUser } from "./transaction-user";
9
-
10
- /**
11
- * INVITE Client Transaction.
12
- * @remarks
13
- * The INVITE transaction consists of a three-way handshake. The client
14
- * transaction sends an INVITE, the server transaction sends responses,
15
- * and the client transaction sends an ACK.
16
- * https://tools.ietf.org/html/rfc3261#section-17.1.1
17
- * @public
18
- */
19
- export class InviteClientTransaction extends ClientTransaction {
20
- private B: number | undefined;
21
- private D: number | undefined;
22
- private M: number | undefined;
23
-
24
- /**
25
- * Map of 2xx to-tag to ACK.
26
- * If value is not undefined, value is the ACK which was sent.
27
- * If key exists but value is undefined, a 2xx was received but the ACK not yet sent.
28
- * Otherwise, a 2xx was not (yet) received for this transaction.
29
- */
30
- private ackRetransmissionCache: Map<string, OutgoingRequestMessage | undefined> = new Map();
31
-
32
- /**
33
- * Constructor.
34
- * Upon construction, the outgoing request's Via header is updated by calling `setViaHeader`.
35
- * Then `toString` is called on the outgoing request and the message is sent via the transport.
36
- * After construction the transaction will be in the "calling" state and the transaction id
37
- * will equal the branch parameter set in the Via header of the outgoing request.
38
- * https://tools.ietf.org/html/rfc3261#section-17.1.1
39
- * @param request - The outgoing INVITE request.
40
- * @param transport - The transport.
41
- * @param user - The transaction user.
42
- */
43
- constructor(request: OutgoingRequestMessage, transport: Transport, user: ClientTransactionUser) {
44
- super(request, transport, user, TransactionState.Calling, "sip.transaction.ict");
45
- // FIXME: Timer A for unreliable transport not implemented
46
- //
47
- // If an unreliable transport is being used, the client transaction
48
- // MUST start timer A with a value of T1. If a reliable transport is being used,
49
- // the client transaction SHOULD NOT start timer A (Timer A controls request retransmissions).
50
- // For any transport, the client transaction MUST start timer B with a value
51
- // of 64*T1 seconds (Timer B controls transaction timeouts).
52
- // https://tools.ietf.org/html/rfc3261#section-17.1.1.2
53
- //
54
- // While not spelled out in the RFC, Timer B is the maximum amount of time that a sender
55
- // will wait for an INVITE message to be acknowledged (a SIP response message is received).
56
- // So Timer B should be cleared when the transaction state proceeds from "Calling".
57
- this.B = window.setTimeout(() => this.timerB(), Timers.TIMER_B);
58
- this.send(request.toString()).catch((error: TransportError) => {
59
- this.logTransportError(error, "Failed to send initial outgoing request.");
60
- });
61
- }
62
-
63
- /**
64
- * Destructor.
65
- */
66
- public dispose(): void {
67
- if (this.B) {
68
- clearTimeout(this.B);
69
- this.B = undefined;
70
- }
71
- if (this.D) {
72
- clearTimeout(this.D);
73
- this.D = undefined;
74
- }
75
- if (this.M) {
76
- clearTimeout(this.M);
77
- this.M = undefined;
78
- }
79
- super.dispose();
80
- }
81
-
82
- /** Transaction kind. Deprecated. */
83
- get kind(): string {
84
- return "ict";
85
- }
86
-
87
- /**
88
- * ACK a 2xx final response.
89
- *
90
- * The transaction includes the ACK only if the final response was not a 2xx response (the
91
- * transaction will generate and send the ACK to the transport automagically). If the
92
- * final response was a 2xx, the ACK is not considered part of the transaction (the
93
- * transaction user needs to generate and send the ACK).
94
- *
95
- * This library is not strictly RFC compliant with regard to ACK handling for 2xx final
96
- * responses. Specifically, retransmissions of ACKs to a 2xx final responses is handled
97
- * by the transaction layer (instead of the UAC core). The "standard" approach is for
98
- * the UAC core to receive all 2xx responses and manage sending ACK retransmissions to
99
- * the transport directly. Herein the transaction layer manages sending ACKs to 2xx responses
100
- * and any retransmissions of those ACKs as needed.
101
- *
102
- * @param ack - The outgoing ACK request.
103
- */
104
- public ackResponse(ack: OutgoingRequestMessage): void {
105
- const toTag = ack.toTag;
106
- if (!toTag) {
107
- throw new Error("To tag undefined.");
108
- }
109
- const id = "z9hG4bK" + Math.floor(Math.random() * 10000000);
110
- ack.setViaHeader(id, this.transport.protocol);
111
- this.ackRetransmissionCache.set(toTag, ack); // Add to ACK retransmission cache
112
- this.send(ack.toString()).catch((error: TransportError) => {
113
- this.logTransportError(error, "Failed to send ACK to 2xx response.");
114
- });
115
- }
116
-
117
- /**
118
- * Handler for incoming responses from the transport which match this transaction.
119
- * @param response - The incoming response.
120
- */
121
- public receiveResponse(response: IncomingResponseMessage): void {
122
- const statusCode = response.statusCode;
123
- if (!statusCode || statusCode < 100 || statusCode > 699) {
124
- throw new Error(`Invalid status code ${statusCode}`);
125
- }
126
-
127
- switch (this.state) {
128
- case TransactionState.Calling:
129
- // If the client transaction receives a provisional response while in
130
- // the "Calling" state, it transitions to the "Proceeding" state. In the
131
- // "Proceeding" state, the client transaction SHOULD NOT retransmit the
132
- // request any longer. Furthermore, the provisional response MUST be
133
- // passed to the TU. Any further provisional responses MUST be passed
134
- // up to the TU while in the "Proceeding" state.
135
- // https://tools.ietf.org/html/rfc3261#section-17.1.1.2
136
- if (statusCode >= 100 && statusCode <= 199) {
137
- this.stateTransition(TransactionState.Proceeding);
138
- if (this.user.receiveResponse) {
139
- this.user.receiveResponse(response);
140
- }
141
- return;
142
- }
143
- // When a 2xx response is received while in either the "Calling" or
144
- // "Proceeding" states, the client transaction MUST transition to
145
- // the "Accepted" state... The 2xx response MUST be passed up to the TU.
146
- // The client transaction MUST NOT generate an ACK to the 2xx response -- its
147
- // handling is delegated to the TU. A UAC core will send an ACK to
148
- // the 2xx response using a new transaction.
149
- // https://tools.ietf.org/html/rfc6026#section-8.4
150
- if (statusCode >= 200 && statusCode <= 299) {
151
- this.ackRetransmissionCache.set(response.toTag, undefined); // Prime the ACK cache
152
- this.stateTransition(TransactionState.Accepted);
153
- if (this.user.receiveResponse) {
154
- this.user.receiveResponse(response);
155
- }
156
- return;
157
- }
158
- // When in either the "Calling" or "Proceeding" states, reception of
159
- // a response with status code from 300-699 MUST cause the client
160
- // transaction to transition to "Completed". The client transaction
161
- // MUST pass the received response up to the TU, and the client
162
- // transaction MUST generate an ACK request, even if the transport is
163
- // reliable (guidelines for constructing the ACK from the response
164
- // are given in Section 17.1.1.3), and then pass the ACK to the
165
- // transport layer for transmission. The ACK MUST be sent to the
166
- // same address, port, and transport to which the original request was sent.
167
- // https://tools.ietf.org/html/rfc6026#section-8.4
168
- if (statusCode >= 300 && statusCode <= 699) {
169
- this.stateTransition(TransactionState.Completed);
170
- this.ack(response);
171
- if (this.user.receiveResponse) {
172
- this.user.receiveResponse(response);
173
- }
174
- return;
175
- }
176
- break;
177
- case TransactionState.Proceeding:
178
- // In the "Proceeding" state, the client transaction SHOULD NOT retransmit the
179
- // request any longer. Furthermore, the provisional response MUST be
180
- // passed to the TU. Any further provisional responses MUST be passed
181
- // up to the TU while in the "Proceeding" state.
182
- // https://tools.ietf.org/html/rfc3261#section-17.1.1.2
183
- if (statusCode >= 100 && statusCode <= 199) {
184
- if (this.user.receiveResponse) {
185
- this.user.receiveResponse(response);
186
- }
187
- return;
188
- }
189
- // When a 2xx response is received while in either the "Calling" or "Proceeding" states,
190
- // the client transaction MUST transition to the "Accepted" state...
191
- // The 2xx response MUST be passed up to the TU. The client
192
- // transaction MUST NOT generate an ACK to the 2xx response -- its
193
- // handling is delegated to the TU. A UAC core will send an ACK to
194
- // the 2xx response using a new transaction.
195
- // https://tools.ietf.org/html/rfc6026#section-8.4
196
- if (statusCode >= 200 && statusCode <= 299) {
197
- this.ackRetransmissionCache.set(response.toTag, undefined); // Prime the ACK cache
198
- this.stateTransition(TransactionState.Accepted);
199
- if (this.user.receiveResponse) {
200
- this.user.receiveResponse(response);
201
- }
202
- return;
203
- }
204
- // When in either the "Calling" or "Proceeding" states, reception of
205
- // a response with status code from 300-699 MUST cause the client
206
- // transaction to transition to "Completed". The client transaction
207
- // MUST pass the received response up to the TU, and the client
208
- // transaction MUST generate an ACK request, even if the transport is
209
- // reliable (guidelines for constructing the ACK from the response
210
- // are given in Section 17.1.1.3), and then pass the ACK to the
211
- // transport layer for transmission. The ACK MUST be sent to the
212
- // same address, port, and transport to which the original request was sent.
213
- // https://tools.ietf.org/html/rfc6026#section-8.4
214
- if (statusCode >= 300 && statusCode <= 699) {
215
- this.stateTransition(TransactionState.Completed);
216
- this.ack(response);
217
- if (this.user.receiveResponse) {
218
- this.user.receiveResponse(response);
219
- }
220
- return;
221
- }
222
- break;
223
- case TransactionState.Accepted:
224
- // The purpose of the "Accepted" state is to allow the client
225
- // transaction to continue to exist to receive, and pass to the TU,
226
- // any retransmissions of the 2xx response and any additional 2xx
227
- // responses from other branches of the INVITE if it forked
228
- // downstream. Timer M reflects the amount of time that the
229
- // transaction user will wait for such messages.
230
- //
231
- // Any 2xx responses that match this client transaction and that are
232
- // received while in the "Accepted" state MUST be passed up to the
233
- // TU. The client transaction MUST NOT generate an ACK to the 2xx
234
- // response. The client transaction takes no further action.
235
- // https://tools.ietf.org/html/rfc6026#section-8.4
236
- if (statusCode >= 200 && statusCode <= 299) {
237
- // NOTE: This implementation herein is intentionally not RFC compliant.
238
- // While the first 2xx response for a given branch is passed up to the TU,
239
- // retransmissions of 2xx responses are absorbed and the ACK associated
240
- // with the original response is resent. This approach is taken because
241
- // our current transaction users are not currently in a good position to
242
- // deal with 2xx retransmission. This SHOULD NOT cause any compliance issues - ;)
243
- //
244
- // If we don't have a cache hit, pass the response to the TU.
245
- if (!this.ackRetransmissionCache.has(response.toTag)) {
246
- this.ackRetransmissionCache.set(response.toTag, undefined); // Prime the ACK cache
247
- if (this.user.receiveResponse) {
248
- this.user.receiveResponse(response);
249
- }
250
- return;
251
- }
252
- // If we have a cache hit, try pulling the ACK from cache and retransmitting it.
253
- const ack = this.ackRetransmissionCache.get(response.toTag);
254
- if (ack) {
255
- this.send(ack.toString()).catch((error: TransportError) => {
256
- this.logTransportError(error, "Failed to send retransmission of ACK to 2xx response.");
257
- });
258
- return;
259
- }
260
- // If an ACK was not found in cache then we have received a retransmitted 2xx
261
- // response before the TU responded to the original response (we don't have an ACK yet).
262
- // So discard this response under the assumption that the TU will eventually
263
- // get us a ACK for the original response.
264
- return;
265
- }
266
- break;
267
- case TransactionState.Completed:
268
- // Any retransmissions of a response with status code 300-699 that
269
- // are received while in the "Completed" state MUST cause the ACK to
270
- // be re-passed to the transport layer for retransmission, but the
271
- // newly received response MUST NOT be passed up to the TU.
272
- // https://tools.ietf.org/html/rfc6026#section-8.4
273
- if (statusCode >= 300 && statusCode <= 699) {
274
- this.ack(response);
275
- return;
276
- }
277
- break;
278
- case TransactionState.Terminated:
279
- break;
280
- default:
281
- throw new Error(`Invalid state ${this.state}`);
282
- }
283
-
284
- // Any response received that does not match an existing client
285
- // transaction state machine is simply dropped. (Implementations are,
286
- // of course, free to log or do other implementation-specific things
287
- // with such responses, but the implementer should be sure to consider
288
- // the impact of large numbers of malicious stray responses.)
289
- // https://tools.ietf.org/html/rfc6026#section-7.2
290
- const message = `Received unexpected ${statusCode} response while in state ${this.state}.`;
291
- this.logger.warn(message);
292
- return;
293
- }
294
-
295
- /**
296
- * The client transaction SHOULD inform the TU that a transport failure
297
- * has occurred, and the client transaction SHOULD transition directly
298
- * to the "Terminated" state. The TU will handle the failover
299
- * mechanisms described in [4].
300
- * https://tools.ietf.org/html/rfc3261#section-17.1.4
301
- * @param error - The error.
302
- */
303
- protected onTransportError(error: TransportError): void {
304
- if (this.user.onTransportError) {
305
- this.user.onTransportError(error);
306
- }
307
- this.stateTransition(TransactionState.Terminated, true);
308
- }
309
-
310
- /** For logging. */
311
- protected typeToString(): string {
312
- return "INVITE client transaction";
313
- }
314
-
315
- private ack(response: IncomingResponseMessage): void {
316
- // The ACK request constructed by the client transaction MUST contain
317
- // values for the Call-ID, From, and Request-URI that are equal to the
318
- // values of those header fields in the request passed to the transport
319
- // by the client transaction (call this the "original request"). The To
320
- // header field in the ACK MUST equal the To header field in the
321
- // response being acknowledged, and therefore will usually differ from
322
- // the To header field in the original request by the addition of the
323
- // tag parameter. The ACK MUST contain a single Via header field, and
324
- // this MUST be equal to the top Via header field of the original
325
- // request. The CSeq header field in the ACK MUST contain the same
326
- // value for the sequence number as was present in the original request,
327
- // but the method parameter MUST be equal to "ACK".
328
- //
329
- // If the INVITE request whose response is being acknowledged had Route
330
- // header fields, those header fields MUST appear in the ACK. This is
331
- // to ensure that the ACK can be routed properly through any downstream
332
- // stateless proxies.
333
- // https://tools.ietf.org/html/rfc3261#section-17.1.1.3
334
- const ruri = this.request.ruri;
335
- const callId = this.request.callId;
336
- const cseq = this.request.cseq;
337
- const from = this.request.getHeader("from");
338
- const to = response.getHeader("to");
339
- const via = this.request.getHeader("via");
340
- const route = this.request.getHeader("route");
341
- if (!from) {
342
- throw new Error("From undefined.");
343
- }
344
- if (!to) {
345
- throw new Error("To undefined.");
346
- }
347
- if (!via) {
348
- throw new Error("Via undefined.");
349
- }
350
-
351
- let ack = `ACK ${ruri} SIP/2.0\r\n`;
352
- if (route) {
353
- ack += `Route: ${route}\r\n`;
354
- }
355
- ack += `Via: ${via}\r\n`;
356
- ack += `To: ${to}\r\n`;
357
- ack += `From: ${from}\r\n`;
358
- ack += `Call-ID: ${callId}\r\n`;
359
- ack += `CSeq: ${cseq} ACK\r\n`;
360
- ack += `Max-Forwards: 70\r\n`;
361
- ack += `Content-Length: 0\r\n\r\n`;
362
-
363
- // TOOO: "User-Agent" header
364
-
365
- this.send(ack).catch((error: TransportError) => {
366
- this.logTransportError(error, "Failed to send ACK to non-2xx response.");
367
- });
368
- return;
369
- }
370
-
371
- /**
372
- * Execute a state transition.
373
- * @param newState - New state.
374
- */
375
- private stateTransition(newState: TransactionState, dueToTransportError = false): void {
376
- // Assert valid state transitions.
377
- const invalidStateTransition = (): void => {
378
- throw new Error(`Invalid state transition from ${this.state} to ${newState}`);
379
- };
380
-
381
- switch (newState) {
382
- case TransactionState.Calling:
383
- invalidStateTransition();
384
- break;
385
- case TransactionState.Proceeding:
386
- if (this.state !== TransactionState.Calling) {
387
- invalidStateTransition();
388
- }
389
- break;
390
- case TransactionState.Accepted:
391
- case TransactionState.Completed:
392
- if (this.state !== TransactionState.Calling && this.state !== TransactionState.Proceeding) {
393
- invalidStateTransition();
394
- }
395
- break;
396
- case TransactionState.Terminated:
397
- if (
398
- this.state !== TransactionState.Calling &&
399
- this.state !== TransactionState.Accepted &&
400
- this.state !== TransactionState.Completed
401
- ) {
402
- if (!dueToTransportError) {
403
- invalidStateTransition();
404
- }
405
- }
406
- break;
407
- default:
408
- invalidStateTransition();
409
- }
410
-
411
- // While not spelled out in the RFC, Timer B is the maximum amount of time that a sender
412
- // will wait for an INVITE message to be acknowledged (a SIP response message is received).
413
- // So Timer B should be cleared when the transaction state proceeds from "Calling".
414
- if (this.B) {
415
- clearTimeout(this.B);
416
- this.B = undefined;
417
- }
418
-
419
- if (newState === TransactionState.Proceeding) {
420
- // Timers have no effect on "Proceeding" state.
421
- // In the "Proceeding" state, the client transaction
422
- // SHOULD NOT retransmit the request any longer.
423
- // https://tools.ietf.org/html/rfc3261#section-17.1.1.2
424
- }
425
-
426
- // The client transaction MUST start Timer D when it enters the "Completed" state
427
- // for any reason, with a value of at least 32 seconds for unreliable transports,
428
- // and a value of zero seconds for reliable transports.
429
- // https://tools.ietf.org/html/rfc6026#section-8.4
430
- if (newState === TransactionState.Completed) {
431
- this.D = window.setTimeout(() => this.timerD(), Timers.TIMER_D);
432
- }
433
-
434
- // The client transaction MUST transition to the "Accepted" state,
435
- // and Timer M MUST be started with a value of 64*T1.
436
- // https://tools.ietf.org/html/rfc6026#section-8.4
437
- if (newState === TransactionState.Accepted) {
438
- this.M = window.setTimeout(() => this.timerM(), Timers.TIMER_M);
439
- }
440
-
441
- // Once the transaction is in the "Terminated" state, it MUST be destroyed immediately.
442
- // https://tools.ietf.org/html/rfc6026#section-8.7
443
- if (newState === TransactionState.Terminated) {
444
- this.dispose();
445
- }
446
-
447
- // Update state.
448
- this.setState(newState);
449
- }
450
-
451
- /**
452
- * When timer A fires, the client transaction MUST retransmit the
453
- * request by passing it to the transport layer, and MUST reset the
454
- * timer with a value of 2*T1.
455
- * When timer A fires 2*T1 seconds later, the request MUST be
456
- * retransmitted again (assuming the client transaction is still in this
457
- * state). This process MUST continue so that the request is
458
- * retransmitted with intervals that double after each transmission.
459
- * These retransmissions SHOULD only be done while the client
460
- * transaction is in the "Calling" state.
461
- * https://tools.ietf.org/html/rfc3261#section-17.1.1.2
462
- */
463
- private timerA(): void {
464
- // TODO
465
- }
466
-
467
- /**
468
- * If the client transaction is still in the "Calling" state when timer
469
- * B fires, the client transaction SHOULD inform the TU that a timeout
470
- * has occurred. The client transaction MUST NOT generate an ACK.
471
- * https://tools.ietf.org/html/rfc3261#section-17.1.1.2
472
- */
473
- private timerB(): void {
474
- this.logger.debug(`Timer B expired for INVITE client transaction ${this.id}.`);
475
- if (this.state === TransactionState.Calling) {
476
- this.onRequestTimeout();
477
- this.stateTransition(TransactionState.Terminated);
478
- }
479
- }
480
-
481
- /**
482
- * If Timer D fires while the client transaction is in the "Completed" state,
483
- * the client transaction MUST move to the "Terminated" state.
484
- * https://tools.ietf.org/html/rfc6026#section-8.4
485
- */
486
- private timerD(): void {
487
- this.logger.debug(`Timer D expired for INVITE client transaction ${this.id}.`);
488
- if (this.state === TransactionState.Completed) {
489
- this.stateTransition(TransactionState.Terminated);
490
- }
491
- }
492
-
493
- /**
494
- * If Timer M fires while the client transaction is in the "Accepted"
495
- * state, the client transaction MUST move to the "Terminated" state.
496
- * https://tools.ietf.org/html/rfc6026#section-8.4
497
- */
498
- private timerM(): void {
499
- this.logger.debug(`Timer M expired for INVITE client transaction ${this.id}.`);
500
- if (this.state === TransactionState.Accepted) {
501
- this.stateTransition(TransactionState.Terminated);
502
- }
503
- }
504
- }