ue-softphone-sdk-beta 4.0.11 → 4.0.12

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 (189) hide show
  1. package/dist/lib/types/lib/sip.js/api/ack.d.ts +12 -0
  2. package/dist/lib/types/lib/sip.js/api/bye.d.ts +16 -0
  3. package/dist/lib/types/lib/sip.js/api/dtmf.d.ts +15 -0
  4. package/dist/lib/types/lib/sip.js/api/emitter.d.ts +88 -0
  5. package/dist/lib/types/lib/sip.js/api/exceptions/content-type-unsupported.d.ts +8 -0
  6. package/dist/lib/types/lib/sip.js/api/exceptions/index.d.ts +5 -0
  7. package/dist/lib/types/lib/sip.js/api/exceptions/request-pending.d.ts +9 -0
  8. package/dist/lib/types/lib/sip.js/api/exceptions/session-description-handler.d.ts +8 -0
  9. package/dist/lib/types/lib/sip.js/api/exceptions/session-terminated.d.ts +8 -0
  10. package/dist/lib/types/lib/sip.js/api/exceptions/state-transition.d.ts +8 -0
  11. package/dist/lib/types/lib/sip.js/api/index.d.ts +59 -0
  12. package/dist/lib/types/lib/sip.js/api/info.d.ts +16 -0
  13. package/dist/lib/types/lib/sip.js/api/invitation-accept-options.d.ts +19 -0
  14. package/dist/lib/types/lib/sip.js/api/invitation-progress-options.d.ts +38 -0
  15. package/dist/lib/types/lib/sip.js/api/invitation-reject-options.d.ts +25 -0
  16. package/dist/lib/types/lib/sip.js/api/invitation.d.ts +179 -0
  17. package/dist/lib/types/lib/sip.js/api/inviter-cancel-options.d.ts +9 -0
  18. package/dist/lib/types/lib/sip.js/api/inviter-invite-options.d.ts +28 -0
  19. package/dist/lib/types/lib/sip.js/api/inviter-options.d.ts +43 -0
  20. package/dist/lib/types/lib/sip.js/api/inviter.d.ts +236 -0
  21. package/dist/lib/types/lib/sip.js/api/message.d.ts +16 -0
  22. package/dist/lib/types/lib/sip.js/api/messager-message-options.d.ts +11 -0
  23. package/dist/lib/types/lib/sip.js/api/messager-options.d.ts +17 -0
  24. package/dist/lib/types/lib/sip.js/api/messager.d.ts +26 -0
  25. package/dist/lib/types/lib/sip.js/api/notification.d.ts +16 -0
  26. package/dist/lib/types/lib/sip.js/api/notifier.d.ts +8 -0
  27. package/dist/lib/types/lib/sip.js/api/publisher-options.d.ts +33 -0
  28. package/dist/lib/types/lib/sip.js/api/publisher-publish-options.d.ts +6 -0
  29. package/dist/lib/types/lib/sip.js/api/publisher-state.d.ts +21 -0
  30. package/dist/lib/types/lib/sip.js/api/publisher-unpublish-options.d.ts +6 -0
  31. package/dist/lib/types/lib/sip.js/api/publisher.d.ts +65 -0
  32. package/dist/lib/types/lib/sip.js/api/referral.d.ts +38 -0
  33. package/dist/lib/types/lib/sip.js/api/registerer-options.d.ts +46 -0
  34. package/dist/lib/types/lib/sip.js/api/registerer-register-options.d.ts +11 -0
  35. package/dist/lib/types/lib/sip.js/api/registerer-state.d.ts +21 -0
  36. package/dist/lib/types/lib/sip.js/api/registerer-unregister-options.d.ts +16 -0
  37. package/dist/lib/types/lib/sip.js/api/registerer.d.ts +144 -0
  38. package/dist/lib/types/lib/sip.js/api/session-bye-options.d.ts +11 -0
  39. package/dist/lib/types/lib/sip.js/api/session-delegate.d.ts +79 -0
  40. package/dist/lib/types/lib/sip.js/api/session-description-handler-factory.d.ts +15 -0
  41. package/dist/lib/types/lib/sip.js/api/session-description-handler.d.ts +74 -0
  42. package/dist/lib/types/lib/sip.js/api/session-info-options.d.ts +11 -0
  43. package/dist/lib/types/lib/sip.js/api/session-invite-options.d.ts +28 -0
  44. package/dist/lib/types/lib/sip.js/api/session-message-options.d.ts +11 -0
  45. package/dist/lib/types/lib/sip.js/api/session-options.d.ts +8 -0
  46. package/dist/lib/types/lib/sip.js/api/session-refer-options.d.ts +14 -0
  47. package/dist/lib/types/lib/sip.js/api/session-state.d.ts +45 -0
  48. package/dist/lib/types/lib/sip.js/api/session.d.ts +359 -0
  49. package/dist/lib/types/lib/sip.js/api/subscriber-options.d.ts +11 -0
  50. package/dist/lib/types/lib/sip.js/api/subscriber-subscribe-options.d.ts +6 -0
  51. package/dist/lib/types/lib/sip.js/api/subscriber.d.ts +94 -0
  52. package/dist/lib/types/lib/sip.js/api/subscription-delegate.d.ts +12 -0
  53. package/dist/lib/types/lib/sip.js/api/subscription-options.d.ts +8 -0
  54. package/dist/lib/types/lib/sip.js/api/subscription-state.d.ts +19 -0
  55. package/dist/lib/types/lib/sip.js/api/subscription-subscribe-options.d.ts +6 -0
  56. package/dist/lib/types/lib/sip.js/api/subscription-unsubscribe-options.d.ts +6 -0
  57. package/dist/lib/types/lib/sip.js/api/subscription.d.ts +84 -0
  58. package/dist/lib/types/lib/sip.js/api/transport-state.d.ts +37 -0
  59. package/dist/lib/types/lib/sip.js/api/transport.d.ts +159 -0
  60. package/dist/lib/types/lib/sip.js/api/user-agent-delegate.d.ts +84 -0
  61. package/dist/lib/types/lib/sip.js/api/user-agent-options.d.ts +253 -0
  62. package/dist/lib/types/lib/sip.js/api/user-agent-state.d.ts +14 -0
  63. package/dist/lib/types/lib/sip.js/api/user-agent.d.ts +200 -0
  64. package/dist/lib/types/lib/sip.js/core/dialogs/dialog-state.d.ts +34 -0
  65. package/dist/lib/types/lib/sip.js/core/dialogs/dialog.d.ts +161 -0
  66. package/dist/lib/types/lib/sip.js/core/dialogs/index.d.ts +4 -0
  67. package/dist/lib/types/lib/sip.js/core/dialogs/session-dialog.d.ts +196 -0
  68. package/dist/lib/types/lib/sip.js/core/dialogs/subscription-dialog.d.ts +120 -0
  69. package/dist/lib/types/lib/sip.js/core/exceptions/exception.d.ts +8 -0
  70. package/dist/lib/types/lib/sip.js/core/exceptions/index.d.ts +3 -0
  71. package/dist/lib/types/lib/sip.js/core/exceptions/transaction-state-error.d.ts +8 -0
  72. package/dist/lib/types/lib/sip.js/core/exceptions/transport-error.d.ts +8 -0
  73. package/dist/lib/types/lib/sip.js/core/index.d.ts +15 -0
  74. package/dist/lib/types/lib/sip.js/core/log/index.d.ts +3 -0
  75. package/dist/lib/types/lib/sip.js/core/log/levels.d.ts +10 -0
  76. package/dist/lib/types/lib/sip.js/core/log/logger-factory.d.ts +21 -0
  77. package/dist/lib/types/lib/sip.js/core/log/logger.d.ts +19 -0
  78. package/dist/lib/types/lib/sip.js/core/messages/body.d.ts +64 -0
  79. package/dist/lib/types/lib/sip.js/core/messages/digest-authentication.d.ts +51 -0
  80. package/dist/lib/types/lib/sip.js/core/messages/incoming-message.d.ts +79 -0
  81. package/dist/lib/types/lib/sip.js/core/messages/incoming-request-message.d.ts +10 -0
  82. package/dist/lib/types/lib/sip.js/core/messages/incoming-request.d.ts +67 -0
  83. package/dist/lib/types/lib/sip.js/core/messages/incoming-response-message.d.ts +10 -0
  84. package/dist/lib/types/lib/sip.js/core/messages/incoming-response.d.ts +12 -0
  85. package/dist/lib/types/lib/sip.js/core/messages/index.d.ts +13 -0
  86. package/dist/lib/types/lib/sip.js/core/messages/md5.d.ts +32 -0
  87. package/dist/lib/types/lib/sip.js/core/messages/methods/ack.d.ts +18 -0
  88. package/dist/lib/types/lib/sip.js/core/messages/methods/bye.d.ts +21 -0
  89. package/dist/lib/types/lib/sip.js/core/messages/methods/cancel.d.ts +21 -0
  90. package/dist/lib/types/lib/sip.js/core/messages/methods/constants.d.ts +20 -0
  91. package/dist/lib/types/lib/sip.js/core/messages/methods/index.d.ts +13 -0
  92. package/dist/lib/types/lib/sip.js/core/messages/methods/info.d.ts +21 -0
  93. package/dist/lib/types/lib/sip.js/core/messages/methods/invite.d.ts +86 -0
  94. package/dist/lib/types/lib/sip.js/core/messages/methods/message.d.ts +21 -0
  95. package/dist/lib/types/lib/sip.js/core/messages/methods/notify.d.ts +21 -0
  96. package/dist/lib/types/lib/sip.js/core/messages/methods/prack.d.ts +21 -0
  97. package/dist/lib/types/lib/sip.js/core/messages/methods/publish.d.ts +21 -0
  98. package/dist/lib/types/lib/sip.js/core/messages/methods/refer.d.ts +21 -0
  99. package/dist/lib/types/lib/sip.js/core/messages/methods/register.d.ts +21 -0
  100. package/dist/lib/types/lib/sip.js/core/messages/methods/subscribe.d.ts +54 -0
  101. package/dist/lib/types/lib/sip.js/core/messages/outgoing-request-message.d.ts +94 -0
  102. package/dist/lib/types/lib/sip.js/core/messages/outgoing-request.d.ts +67 -0
  103. package/dist/lib/types/lib/sip.js/core/messages/outgoing-response.d.ts +42 -0
  104. package/dist/lib/types/lib/sip.js/core/messages/parser.d.ts +14 -0
  105. package/dist/lib/types/lib/sip.js/core/messages/utils.d.ts +24 -0
  106. package/dist/lib/types/lib/sip.js/core/session/index.d.ts +2 -0
  107. package/dist/lib/types/lib/sip.js/core/session/session-delegate.d.ts +70 -0
  108. package/dist/lib/types/lib/sip.js/core/session/session.d.ts +134 -0
  109. package/dist/lib/types/lib/sip.js/core/subscription/index.d.ts +2 -0
  110. package/dist/lib/types/lib/sip.js/core/subscription/subscription-delegate.d.ts +27 -0
  111. package/dist/lib/types/lib/sip.js/core/subscription/subscription.d.ts +55 -0
  112. package/dist/lib/types/lib/sip.js/core/timers.d.ts +20 -0
  113. package/dist/lib/types/lib/sip.js/core/transactions/client-transaction.d.ts +45 -0
  114. package/dist/lib/types/lib/sip.js/core/transactions/index.d.ts +10 -0
  115. package/dist/lib/types/lib/sip.js/core/transactions/invite-client-transaction.d.ts +116 -0
  116. package/dist/lib/types/lib/sip.js/core/transactions/invite-server-transaction.d.ts +127 -0
  117. package/dist/lib/types/lib/sip.js/core/transactions/non-invite-client-transaction.d.ts +69 -0
  118. package/dist/lib/types/lib/sip.js/core/transactions/non-invite-server-transaction.d.ts +57 -0
  119. package/dist/lib/types/lib/sip.js/core/transactions/server-transaction.d.ts +35 -0
  120. package/dist/lib/types/lib/sip.js/core/transactions/transaction-state.d.ts +13 -0
  121. package/dist/lib/types/lib/sip.js/core/transactions/transaction-user.d.ts +72 -0
  122. package/dist/lib/types/lib/sip.js/core/transactions/transaction.d.ts +79 -0
  123. package/dist/lib/types/lib/sip.js/core/transport.d.ts +31 -0
  124. package/dist/lib/types/lib/sip.js/core/user-agent-core/allowed-methods.d.ts +4 -0
  125. package/dist/lib/types/lib/sip.js/core/user-agent-core/index.d.ts +3 -0
  126. package/dist/lib/types/lib/sip.js/core/user-agent-core/user-agent-core-configuration.d.ts +99 -0
  127. package/dist/lib/types/lib/sip.js/core/user-agent-core/user-agent-core-delegate.d.ts +37 -0
  128. package/dist/lib/types/lib/sip.js/core/user-agent-core/user-agent-core.d.ts +179 -0
  129. package/dist/lib/types/lib/sip.js/core/user-agents/bye-user-agent-client.d.ts +10 -0
  130. package/dist/lib/types/lib/sip.js/core/user-agents/bye-user-agent-server.d.ts +10 -0
  131. package/dist/lib/types/lib/sip.js/core/user-agents/cancel-user-agent-client.d.ts +10 -0
  132. package/dist/lib/types/lib/sip.js/core/user-agents/index.d.ts +26 -0
  133. package/dist/lib/types/lib/sip.js/core/user-agents/info-user-agent-client.d.ts +10 -0
  134. package/dist/lib/types/lib/sip.js/core/user-agents/info-user-agent-server.d.ts +10 -0
  135. package/dist/lib/types/lib/sip.js/core/user-agents/invite-user-agent-client.d.ts +35 -0
  136. package/dist/lib/types/lib/sip.js/core/user-agents/invite-user-agent-server.d.ts +77 -0
  137. package/dist/lib/types/lib/sip.js/core/user-agents/message-user-agent-client.d.ts +10 -0
  138. package/dist/lib/types/lib/sip.js/core/user-agents/message-user-agent-server.d.ts +10 -0
  139. package/dist/lib/types/lib/sip.js/core/user-agents/notify-user-agent-client.d.ts +10 -0
  140. package/dist/lib/types/lib/sip.js/core/user-agents/notify-user-agent-server.d.ts +16 -0
  141. package/dist/lib/types/lib/sip.js/core/user-agents/prack-user-agent-client.d.ts +10 -0
  142. package/dist/lib/types/lib/sip.js/core/user-agents/prack-user-agent-server.d.ts +16 -0
  143. package/dist/lib/types/lib/sip.js/core/user-agents/publish-user-agent-client.d.ts +10 -0
  144. package/dist/lib/types/lib/sip.js/core/user-agents/re-invite-user-agent-client.d.ts +18 -0
  145. package/dist/lib/types/lib/sip.js/core/user-agents/re-invite-user-agent-server.d.ts +41 -0
  146. package/dist/lib/types/lib/sip.js/core/user-agents/re-subscribe-user-agent-client.d.ts +17 -0
  147. package/dist/lib/types/lib/sip.js/core/user-agents/re-subscribe-user-agent-server.d.ts +10 -0
  148. package/dist/lib/types/lib/sip.js/core/user-agents/refer-user-agent-client.d.ts +10 -0
  149. package/dist/lib/types/lib/sip.js/core/user-agents/refer-user-agent-server.d.ts +16 -0
  150. package/dist/lib/types/lib/sip.js/core/user-agents/register-user-agent-client.d.ts +10 -0
  151. package/dist/lib/types/lib/sip.js/core/user-agents/register-user-agent-server.d.ts +11 -0
  152. package/dist/lib/types/lib/sip.js/core/user-agents/subscribe-user-agent-client.d.ts +65 -0
  153. package/dist/lib/types/lib/sip.js/core/user-agents/subscribe-user-agent-server.d.ts +11 -0
  154. package/dist/lib/types/lib/sip.js/core/user-agents/user-agent-client.d.ts +103 -0
  155. package/dist/lib/types/lib/sip.js/core/user-agents/user-agent-server.d.ts +79 -0
  156. package/dist/lib/types/lib/sip.js/grammar/grammar.d.ts +26 -0
  157. package/dist/lib/types/lib/sip.js/grammar/index.d.ts +4 -0
  158. package/dist/lib/types/lib/sip.js/grammar/name-addr-header.d.ts +24 -0
  159. package/dist/lib/types/lib/sip.js/grammar/parameters.d.ts +16 -0
  160. package/dist/lib/types/lib/sip.js/grammar/pegjs/dist/grammar.d.ts +50 -0
  161. package/dist/lib/types/lib/sip.js/grammar/uri.d.ts +62 -0
  162. package/dist/lib/types/lib/sip.js/index.d.ts +9 -0
  163. package/dist/lib/types/lib/sip.js/platform/web/index.d.ts +4 -0
  164. package/dist/lib/types/lib/sip.js/platform/web/modifiers/index.d.ts +5 -0
  165. package/dist/lib/types/lib/sip.js/platform/web/modifiers/modifiers.d.ts +41 -0
  166. package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/index.d.ts +14 -0
  167. package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/media-stream-factory-default.d.ts +6 -0
  168. package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/media-stream-factory.d.ts +6 -0
  169. package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/peer-connection-configuration-default.d.ts +5 -0
  170. package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/peer-connection-delegate.d.ts +63 -0
  171. package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/session-description-handler-configuration.d.ts +16 -0
  172. package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/session-description-handler-factory-default.d.ts +11 -0
  173. package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/session-description-handler-factory-options.d.ts +9 -0
  174. package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/session-description-handler-factory.d.ts +16 -0
  175. package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/session-description-handler-options.d.ts +47 -0
  176. package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/session-description-handler.d.ts +212 -0
  177. package/dist/lib/types/lib/sip.js/platform/web/simple-user/index.d.ts +7 -0
  178. package/dist/lib/types/lib/sip.js/platform/web/simple-user/simple-user-delegate.d.ts +72 -0
  179. package/dist/lib/types/lib/sip.js/platform/web/simple-user/simple-user-options.d.ts +90 -0
  180. package/dist/lib/types/lib/sip.js/platform/web/simple-user/simple-user.d.ts +226 -0
  181. package/dist/lib/types/lib/sip.js/platform/web/transport/index.d.ts +6 -0
  182. package/dist/lib/types/lib/sip.js/platform/web/transport/transport-options.d.ts +30 -0
  183. package/dist/lib/types/lib/sip.js/platform/web/transport/transport.d.ts +125 -0
  184. package/dist/lib/types/lib/sip.js/version.d.ts +1 -0
  185. package/dist/lib/types/webrtc/webrtc-method.d.ts +2 -0
  186. package/dist/lib/types/webrtc/webrtc.d.ts +38 -0
  187. package/dist/lib/ue-soft-phone.min.js +1 -1
  188. package/dist/ue-softphone-sdk.js +1 -1
  189. package/package.json +1 -1
@@ -0,0 +1,24 @@
1
+ import { Parameters } from "./parameters";
2
+ import { URI } from "./uri";
3
+ /**
4
+ * Name Address SIP header.
5
+ * @public
6
+ */
7
+ export declare class NameAddrHeader extends Parameters {
8
+ uri: URI;
9
+ private _displayName;
10
+ /**
11
+ * Constructor
12
+ * @param uri -
13
+ * @param displayName -
14
+ * @param parameters -
15
+ */
16
+ constructor(uri: URI, displayName: string, parameters: {
17
+ [name: string]: string;
18
+ });
19
+ get friendlyName(): string;
20
+ get displayName(): string;
21
+ set displayName(value: string);
22
+ clone(): NameAddrHeader;
23
+ toString(): string;
24
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @internal
3
+ */
4
+ export declare class Parameters {
5
+ parameters: {
6
+ [name: string]: string | null;
7
+ };
8
+ constructor(parameters: {
9
+ [name: string]: string | number | null | undefined;
10
+ });
11
+ setParam(key: string, value: string | number | null | undefined): void;
12
+ getParam(key: string): string | null | undefined;
13
+ hasParam(key: string): boolean;
14
+ deleteParam(key: string): string | null | undefined;
15
+ clearParams(): void;
16
+ }
@@ -0,0 +1,50 @@
1
+ export interface IFilePosition {
2
+ offset: number;
3
+ line: number;
4
+ column: number;
5
+ }
6
+ export interface IFileRange {
7
+ start: IFilePosition;
8
+ end: IFilePosition;
9
+ }
10
+ export interface ILiteralExpectation {
11
+ type: "literal";
12
+ text: string;
13
+ ignoreCase: boolean;
14
+ }
15
+ export interface IClassParts extends Array<string | IClassParts> {
16
+ }
17
+ export interface IClassExpectation {
18
+ type: "class";
19
+ parts: IClassParts;
20
+ inverted: boolean;
21
+ ignoreCase: boolean;
22
+ }
23
+ export interface IAnyExpectation {
24
+ type: "any";
25
+ }
26
+ export interface IEndExpectation {
27
+ type: "end";
28
+ }
29
+ export interface IOtherExpectation {
30
+ type: "other";
31
+ description: string;
32
+ }
33
+ export type Expectation = ILiteralExpectation | IClassExpectation | IAnyExpectation | IEndExpectation | IOtherExpectation;
34
+ export declare class SyntaxError extends Error {
35
+ static buildMessage(expected: Expectation[], found: string | null): string;
36
+ message: string;
37
+ expected: Expectation[];
38
+ found: string | null;
39
+ location: IFileRange;
40
+ name: string;
41
+ constructor(message: string, expected: Expectation[], found: string | null, location: IFileRange);
42
+ }
43
+ export interface IParseOptions {
44
+ filename?: string;
45
+ startRule?: string;
46
+ tracer?: any;
47
+ [key: string]: any;
48
+ }
49
+ export type ParseFunction = (input: string, options?: IParseOptions) => any;
50
+ export declare const parse: ParseFunction;
@@ -0,0 +1,62 @@
1
+ import { Parameters } from "./parameters";
2
+ /**
3
+ * URI.
4
+ * @public
5
+ */
6
+ export declare class URI extends Parameters {
7
+ headers: {
8
+ [name: string]: Array<string>;
9
+ };
10
+ private normal;
11
+ private raw;
12
+ /**
13
+ * Constructor
14
+ * @param scheme -
15
+ * @param user -
16
+ * @param host -
17
+ * @param port -
18
+ * @param parameters -
19
+ * @param headers -
20
+ */
21
+ constructor(scheme: string, user: string, host: string, port?: number, parameters?: {
22
+ [name: string]: string | number | null;
23
+ }, headers?: {
24
+ [name: string]: Array<string>;
25
+ });
26
+ get scheme(): string;
27
+ set scheme(value: string);
28
+ get user(): string | undefined;
29
+ set user(value: string | undefined);
30
+ get host(): string;
31
+ set host(value: string);
32
+ get aor(): string;
33
+ get port(): number | undefined;
34
+ set port(value: number | undefined);
35
+ setHeader(name: string, value: Array<string> | string): void;
36
+ getHeader(name: string): Array<string> | undefined;
37
+ hasHeader(name: string): boolean;
38
+ deleteHeader(header: string): Array<string> | undefined;
39
+ clearHeaders(): void;
40
+ clone(): URI;
41
+ toRaw(): string;
42
+ toString(): string;
43
+ private get _normal();
44
+ private get _raw();
45
+ private _toString;
46
+ private escapeUser;
47
+ private headerize;
48
+ }
49
+ /**
50
+ * Returns true if URIs are equivalent per RFC 3261 Section 19.1.4.
51
+ * @param a URI to compare
52
+ * @param b URI to compare
53
+ *
54
+ * @remarks
55
+ * 19.1.4 URI Comparison
56
+ * Some operations in this specification require determining whether two
57
+ * SIP or SIPS URIs are equivalent.
58
+ *
59
+ * https://tools.ietf.org/html/rfc3261#section-19.1.4
60
+ * @internal
61
+ */
62
+ export declare function equivalentURI(a: URI, b: URI): boolean;
@@ -0,0 +1,9 @@
1
+ declare const version = "0.20.0";
2
+ declare const name = "sip.js";
3
+ export { name, version };
4
+ export * from "./api";
5
+ export * from "./grammar";
6
+ import * as Core from "./core";
7
+ export { Core };
8
+ import * as Web from "./platform/web";
9
+ export { Web };
@@ -0,0 +1,4 @@
1
+ export * from "./modifiers";
2
+ export * from "./session-description-handler";
3
+ export * from "./simple-user";
4
+ export * from "./transport";
@@ -0,0 +1,5 @@
1
+ /**
2
+ * SessionDescriptionHandlerModifer functions for web browsers.
3
+ * @packageDocumentation
4
+ */
5
+ export * from "./modifiers";
@@ -0,0 +1,41 @@
1
+ import { SessionDescriptionHandlerModifier } from "../../../api";
2
+ /**
3
+ * Modifier.
4
+ * @public
5
+ */
6
+ export declare function stripTcpCandidates(description: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit>;
7
+ /**
8
+ * Modifier.
9
+ * @public
10
+ */
11
+ export declare function stripTelephoneEvent(description: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit>;
12
+ /**
13
+ * Modifier.
14
+ * @public
15
+ */
16
+ export declare function cleanJitsiSdpImageattr(description: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit>;
17
+ /**
18
+ * Modifier.
19
+ * @public
20
+ */
21
+ export declare function stripG722(description: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit>;
22
+ /**
23
+ * Modifier.
24
+ * @public
25
+ */
26
+ export declare function stripRtpPayload(payload: string): SessionDescriptionHandlerModifier;
27
+ /**
28
+ * Modifier.
29
+ * @public
30
+ */
31
+ export declare function stripVideo(description: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit>;
32
+ /**
33
+ * Modifier.
34
+ * @public
35
+ */
36
+ export declare function addMidLines(description: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit>;
37
+ /**
38
+ * The modifier that should be used when the session would like to place the call on hold.
39
+ * @param description - The description that will be modified.
40
+ */
41
+ export declare function holdModifier(description: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit>;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * A SessionDescriptionHandler for web browsers.
3
+ * @packageDocumentation
4
+ */
5
+ export * from "./media-stream-factory-default";
6
+ export * from "./media-stream-factory";
7
+ export * from "./peer-connection-configuration-default";
8
+ export * from "./peer-connection-delegate";
9
+ export * from "./session-description-handler-configuration";
10
+ export * from "./session-description-handler-factory-default";
11
+ export * from "./session-description-handler-factory-options";
12
+ export * from "./session-description-handler-factory";
13
+ export * from "./session-description-handler-options";
14
+ export * from "./session-description-handler";
@@ -0,0 +1,6 @@
1
+ import { MediaStreamFactory } from "./media-stream-factory";
2
+ /**
3
+ * Function which returns a MediaStreamFactory.
4
+ * @public
5
+ */
6
+ export declare function defaultMediaStreamFactory(): MediaStreamFactory;
@@ -0,0 +1,6 @@
1
+ import { SessionDescriptionHandler } from "./session-description-handler";
2
+ /**
3
+ * Interface of factory function which produces a MediaStream.
4
+ * @public
5
+ */
6
+ export type MediaStreamFactory = (constraints: MediaStreamConstraints, sessionDescriptionHandler: SessionDescriptionHandler) => Promise<MediaStream>;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Function which returns an RTCConfiguration.
3
+ * @public
4
+ */
5
+ export declare function defaultPeerConnectionConfiguration(): RTCConfiguration;
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Delegate to handle PeerConnection state changes.
3
+ * @public
4
+ */
5
+ export interface PeerConnectionDelegate {
6
+ /**
7
+ * This happens whenever the aggregate state of the connection changes.
8
+ * The aggregate state is a combination of the states of all of the
9
+ * individual network transports being used by the connection.
10
+ * @param event - Event.
11
+ */
12
+ onconnectionstatechange?(event: Event): void;
13
+ /**
14
+ * Triggered when an RTCDataChannel is added to the connection by the
15
+ * remote peer calling createDataChannel().
16
+ * @param event - RTCDataChannelEvent.
17
+ */
18
+ ondatachannel?(event: RTCDataChannelEvent): void;
19
+ /**
20
+ * Triggered when a new ICE candidate has been found.
21
+ * @param event - RTCPeerConnectionIceEvent.
22
+ */
23
+ onicecandidate?(event: RTCPeerConnectionIceEvent): void;
24
+ /**
25
+ * Triggered when an error occurred during ICE candidate gathering.
26
+ * @param event - RTCPeerConnectionIceErrorEvent.
27
+ */
28
+ onicecandidateerror?(event: RTCPeerConnectionIceErrorEvent): void;
29
+ /**
30
+ * This happens whenever the local ICE agent needs to deliver a message to
31
+ * the other peer through the signaling server. This lets the ICE agent
32
+ * perform negotiation with the remote peer without the browser itself
33
+ * needing to know any specifics about the technology being used for
34
+ * signalingTriggered when the IceConnectionState changes.
35
+ * @param event - Event.
36
+ */
37
+ oniceconnectionstatechange?(event: Event): void;
38
+ /**
39
+ * Triggered when the ICE gathering state changes.
40
+ * @param event - Event.
41
+ */
42
+ onicegatheringstatechange?(event: Event): void;
43
+ /**
44
+ * Triggered when renegotiation is necessary.
45
+ * @param event - Event.
46
+ */
47
+ onnegotiationneeded?(event: Event): void;
48
+ /**
49
+ * Triggered when the SignalingState changes.
50
+ * @param event - Event.
51
+ */
52
+ onsignalingstatechange?(event: Event): void;
53
+ /**
54
+ * Triggered when when a statistics object being monitored is deleted.
55
+ * @param event - Event.
56
+ */
57
+ onstatsended?(event: Event): void;
58
+ /**
59
+ * Triggered when a new track is signaled by the remote peer, as a result of setRemoteDescription.
60
+ * @param event - Event.
61
+ */
62
+ ontrack?(event: Event): void;
63
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Configuration for SessionDescriptionHandler.
3
+ * @public
4
+ */
5
+ export interface SessionDescriptionHandlerConfiguration {
6
+ /**
7
+ * The maximum duration to wait in ms for ICE gathering to complete.
8
+ * If undefined, implementation dependent.
9
+ * If zero, no timeout.
10
+ */
11
+ iceGatheringTimeout?: number;
12
+ /**
13
+ * Peer connection options.
14
+ */
15
+ peerConnectionConfiguration?: RTCConfiguration;
16
+ }
@@ -0,0 +1,11 @@
1
+ import { SessionDescriptionHandler } from "./session-description-handler";
2
+ import { SessionDescriptionHandlerFactory } from "./session-description-handler-factory";
3
+ /**
4
+ * Function which returns a SessionDescriptionHandlerFactory.
5
+ * @remarks
6
+ * See {@link defaultPeerConnectionConfiguration} for the default peer connection configuration.
7
+ * The ICE gathering timeout defaults to 5000ms.
8
+ * @param mediaStreamFactory - MediaStream factory.
9
+ * @public
10
+ */
11
+ export declare function defaultSessionDescriptionHandlerFactory(mediaStreamFactory?: (constraints: MediaStreamConstraints, sessionDescriptionHandler: SessionDescriptionHandler) => Promise<MediaStream>): SessionDescriptionHandlerFactory;
@@ -0,0 +1,9 @@
1
+ import { SessionDescriptionHandlerConfiguration } from "./session-description-handler-configuration";
2
+ /**
3
+ * Options for SessionDescriptionHandlerFactory.
4
+ * @remarks
5
+ * The "options" are provided as part of the UserAgent configuration and passed through
6
+ * on every call to SessionDescriptionHandlerFactory's constructor.
7
+ * @public
8
+ */
9
+ export type SessionDescriptionHandlerFactoryOptions = SessionDescriptionHandlerConfiguration;
@@ -0,0 +1,16 @@
1
+ import { Session, SessionDescriptionHandlerFactory as SessionDescriptionHandlerFactoryDefinition } from "../../../api";
2
+ import { SessionDescriptionHandler } from "./session-description-handler";
3
+ import { SessionDescriptionHandlerFactoryOptions } from "./session-description-handler-factory-options";
4
+ /**
5
+ * Factory for {@link SessionDescriptionHandler}.
6
+ * @public
7
+ */
8
+ export interface SessionDescriptionHandlerFactory extends SessionDescriptionHandlerFactoryDefinition {
9
+ /**
10
+ * SessionDescriptionHandler factory function.
11
+ * @remarks
12
+ * The `options` are provided as part of the UserAgent configuration
13
+ * and passed through on every call to SessionDescriptionHandlerFactory's constructor.
14
+ */
15
+ (session: Session, options?: SessionDescriptionHandlerFactoryOptions): SessionDescriptionHandler;
16
+ }
@@ -0,0 +1,47 @@
1
+ import { SessionDescriptionHandlerOptions as SessionDescriptionHandlerOptionsDefinition } from "../../../api";
2
+ /**
3
+ * Options for {@link SessionDescriptionHandler}.
4
+ * @public
5
+ */
6
+ export interface SessionDescriptionHandlerOptions extends SessionDescriptionHandlerOptionsDefinition {
7
+ /**
8
+ * Answer options to use when creating an answer.
9
+ */
10
+ answerOptions?: RTCAnswerOptions;
11
+ /**
12
+ * Constraints to use when creating local media stream.
13
+ * @remarks
14
+ * If undefined, defaults to audio true and video false.
15
+ * If audio and video are false, media stream will have no tracks.
16
+ */
17
+ constraints?: MediaStreamConstraints;
18
+ /**
19
+ * If true, create a data channel when making initial offer.
20
+ */
21
+ dataChannel?: boolean;
22
+ /**
23
+ * A human-readable name to use when creating the data channel.
24
+ */
25
+ dataChannelLabel?: string;
26
+ /**
27
+ * Configuration options for creating the data channel.
28
+ */
29
+ dataChannelOptions?: RTCDataChannelInit;
30
+ /**
31
+ * If true, offer and answer directions will be set to place peer on hold.
32
+ */
33
+ hold?: boolean;
34
+ /**
35
+ * The maximum duration to wait in ms for ICE gathering to complete.
36
+ * No timeout if undefined or zero.
37
+ */
38
+ iceGatheringTimeout?: number;
39
+ /**
40
+ * Offer options to use when creating an offer.
41
+ */
42
+ offerOptions?: RTCOfferOptions;
43
+ /**
44
+ * Called upon creating a data channel.
45
+ */
46
+ onDataChannel?: (dataChannel: RTCDataChannel) => void;
47
+ }
@@ -0,0 +1,212 @@
1
+ import { BodyAndContentType, SessionDescriptionHandler as SessionDescriptionHandlerDefinition, SessionDescriptionHandlerModifier } from '../../../api';
2
+ import { Logger } from '../../../core';
3
+ import { MediaStreamFactory } from './media-stream-factory';
4
+ import { SessionDescriptionHandlerConfiguration } from './session-description-handler-configuration';
5
+ import { SessionDescriptionHandlerOptions } from './session-description-handler-options';
6
+ import { PeerConnectionDelegate } from './peer-connection-delegate';
7
+ /**
8
+ * A base class implementing a WebRTC session description handler for sip.js.
9
+ * @remarks
10
+ * It is expected/intended to be extended by specific WebRTC based applications.
11
+ * @privateRemarks
12
+ * So do not put application specific implementation in here.
13
+ * @public
14
+ */
15
+ export declare class SessionDescriptionHandler implements SessionDescriptionHandlerDefinition {
16
+ /** Logger. */
17
+ protected logger: Logger;
18
+ /** Media stream factory. */
19
+ protected mediaStreamFactory: MediaStreamFactory;
20
+ /** Configuration options. */
21
+ protected sessionDescriptionHandlerConfiguration?: SessionDescriptionHandlerConfiguration;
22
+ /** The local media stream. */
23
+ protected _localMediaStream: MediaStream;
24
+ /** The remote media stream. */
25
+ protected _remoteMediaStream: MediaStream;
26
+ /** The data channel. Undefined before created. */
27
+ protected _dataChannel: RTCDataChannel | undefined;
28
+ /** The peer connection. Undefined after SessionDescriptionHandler.close(). */
29
+ protected _peerConnection: RTCPeerConnection | undefined;
30
+ /** The peer connection delegate. */
31
+ protected _peerConnectionDelegate: PeerConnectionDelegate | undefined;
32
+ private iceGatheringCompletePromise;
33
+ private iceGatheringCompleteTimeoutId;
34
+ private iceGatheringCompleteResolve;
35
+ private iceGatheringCompleteReject;
36
+ private localMediaStreamConstraints;
37
+ private onDataChannel;
38
+ /**
39
+ * Constructor
40
+ * @param logger - A logger
41
+ * @param mediaStreamFactory - A factory to provide a MediaStream
42
+ * @param options - Options passed from the SessionDescriptionHandleFactory
43
+ */
44
+ constructor(logger: Logger, mediaStreamFactory: MediaStreamFactory, sessionDescriptionHandlerConfiguration?: SessionDescriptionHandlerConfiguration);
45
+ /**
46
+ * The local media stream currently being sent.
47
+ *
48
+ * @remarks
49
+ * The local media stream initially has no tracks, so the presence of tracks
50
+ * should not be assumed. Furthermore, tracks may be added or removed if the
51
+ * local media changes - for example, on upgrade from audio only to a video session.
52
+ * At any given time there will be at most one audio track and one video track
53
+ * (it's possible that this restriction may not apply to sub-classes).
54
+ * Use `MediaStream.onaddtrack` or add a listener for the `addtrack` event
55
+ * to detect when a new track becomes available:
56
+ * https://developer.mozilla.org/en-US/docs/Web/API/MediaStream/onaddtrack
57
+ */
58
+ get localMediaStream(): MediaStream;
59
+ /**
60
+ * The remote media stream currently being received.
61
+ *
62
+ * @remarks
63
+ * The remote media stream initially has no tracks, so the presence of tracks
64
+ * should not be assumed. Furthermore, tracks may be added or removed if the
65
+ * remote media changes - for example, on upgrade from audio only to a video session.
66
+ * At any given time there will be at most one audio track and one video track
67
+ * (it's possible that this restriction may not apply to sub-classes).
68
+ * Use `MediaStream.onaddtrack` or add a listener for the `addtrack` event
69
+ * to detect when a new track becomes available:
70
+ * https://developer.mozilla.org/en-US/docs/Web/API/MediaStream/onaddtrack
71
+ */
72
+ get remoteMediaStream(): MediaStream;
73
+ /**
74
+ * The data channel. Undefined before it is created.
75
+ */
76
+ get dataChannel(): RTCDataChannel | undefined;
77
+ /**
78
+ * The peer connection. Undefined if peer connection has closed.
79
+ *
80
+ * @remarks
81
+ * While access to the underlying `RTCPeerConnection` is provided, note that
82
+ * using methods with modify it may break the operation of this class.
83
+ * In particular, this class depends on exclusive access to the
84
+ * event handler properties. If you need access to the peer connection
85
+ * events, either register for events using `addEventListener()` on
86
+ * the `RTCPeerConnection` or set the `peerConnectionDelegate` on
87
+ * this `SessionDescriptionHandler`.
88
+ */
89
+ get peerConnection(): RTCPeerConnection | undefined;
90
+ /**
91
+ * A delegate which provides access to the peer connection event handlers.
92
+ *
93
+ * @remarks
94
+ * Setting the peer connection event handlers directly is not supported
95
+ * and may break this class. As this class depends on exclusive access
96
+ * to them, a delegate may be set which provides alternative access to
97
+ * the event handlers in a fashion which is supported.
98
+ */
99
+ get peerConnectionDelegate(): PeerConnectionDelegate | undefined;
100
+ set peerConnectionDelegate(delegate: PeerConnectionDelegate | undefined);
101
+ private static dispatchAddTrackEvent;
102
+ private static dispatchRemoveTrackEvent;
103
+ /**
104
+ * Stop tracks and close peer connection.
105
+ */
106
+ close(): void;
107
+ /**
108
+ * Creates an offer or answer.
109
+ * @param options - Options bucket.
110
+ * @param modifiers - Modifiers.
111
+ */
112
+ getDescription(options?: SessionDescriptionHandlerOptions, modifiers?: Array<SessionDescriptionHandlerModifier>): Promise<BodyAndContentType>;
113
+ /**
114
+ * Returns true if the SessionDescriptionHandler can handle the Content-Type described by a SIP message.
115
+ * @param contentType - The content type that is in the SIP Message.
116
+ */
117
+ hasDescription(contentType: string): boolean;
118
+ /**
119
+ * Send DTMF via RTP (RFC 4733).
120
+ * Returns true if DTMF send is successful, false otherwise.
121
+ * @param tones - A string containing DTMF digits.
122
+ * @param options - Options object to be used by sendDtmf.
123
+ */
124
+ sendDtmf(tones: string, options?: {
125
+ duration: number;
126
+ interToneGap: number;
127
+ }): boolean;
128
+ /**
129
+ * Sets an offer or answer.
130
+ * @param sdp - The session description.
131
+ * @param options - Options bucket.
132
+ * @param modifiers - Modifiers.
133
+ */
134
+ setDescription(sdp: string, options?: SessionDescriptionHandlerOptions, modifiers?: Array<SessionDescriptionHandlerModifier>): Promise<void>;
135
+ /**
136
+ * Applies modifiers to SDP prior to setting the local or remote description.
137
+ * @param sdp - SDP to modify.
138
+ * @param modifiers - Modifiers to apply.
139
+ */
140
+ protected applyModifiers(sdp: RTCSessionDescriptionInit, modifiers?: Array<SessionDescriptionHandlerModifier>): Promise<RTCSessionDescriptionInit>;
141
+ /**
142
+ * Create a data channel.
143
+ * @remarks
144
+ * Only creates a data channel if SessionDescriptionHandlerOptions.dataChannel is true.
145
+ * Only creates a data channel if creating a local offer.
146
+ * Only if one does not already exist.
147
+ * @param options - Session description handler options.
148
+ */
149
+ protected createDataChannel(options?: SessionDescriptionHandlerOptions): Promise<void>;
150
+ /**
151
+ * Depending on current signaling state, create a local offer or answer.
152
+ * @param options - Session description handler options.
153
+ */
154
+ protected createLocalOfferOrAnswer(options?: SessionDescriptionHandlerOptions): Promise<RTCSessionDescriptionInit>;
155
+ /**
156
+ * Get a media stream from the media stream factory and set the local media stream.
157
+ * @param options - Session description handler options.
158
+ */
159
+ protected getLocalMediaStream(options?: SessionDescriptionHandlerOptions): Promise<void>;
160
+ /**
161
+ * Sets the peer connection's sender tracks and local media stream tracks.
162
+ *
163
+ * @remarks
164
+ * Only the first audio and video tracks of the provided MediaStream are utilized.
165
+ * Adds tracks if audio and/or video tracks are not already present, otherwise replaces tracks.
166
+ *
167
+ * @param stream - Media stream containing tracks to be utilized.
168
+ */
169
+ protected setLocalMediaStream(stream: MediaStream): Promise<void>;
170
+ /**
171
+ * Gets the peer connection's local session description.
172
+ */
173
+ protected getLocalSessionDescription(): Promise<RTCSessionDescription>;
174
+ /**
175
+ * Sets the peer connection's local session description.
176
+ * @param sessionDescription - sessionDescription The session description.
177
+ */
178
+ protected setLocalSessionDescription(sessionDescription: RTCSessionDescriptionInit): Promise<void>;
179
+ /**
180
+ * Sets the peer connection's remote session description.
181
+ * @param sessionDescription - The session description.
182
+ */
183
+ protected setRemoteSessionDescription(sessionDescription: RTCSessionDescriptionInit): Promise<void>;
184
+ /**
185
+ * Sets a remote media stream track.
186
+ *
187
+ * @remarks
188
+ * Adds tracks if audio and/or video tracks are not already present, otherwise replaces tracks.
189
+ *
190
+ * @param track - Media stream track to be utilized.
191
+ */
192
+ protected setRemoteTrack(track: MediaStreamTrack): void;
193
+ /**
194
+ * Depending on the current signaling state and the session hold state, update transceiver direction.
195
+ * @param options - Session description handler options.
196
+ */
197
+ protected updateDirection(options?: SessionDescriptionHandlerOptions): Promise<void>;
198
+ /**
199
+ * Called when ICE gathering completes and resolves any waiting promise.
200
+ */
201
+ protected iceGatheringComplete(): void;
202
+ /**
203
+ * Wait for ICE gathering to complete.
204
+ * @param restart - If true, waits if current state is "complete" (waits for transition to "complete").
205
+ * @param timeout - Milliseconds after which waiting times out. No timeout if 0.
206
+ */
207
+ protected waitForIceGatheringComplete(restart?: boolean, timeout?: number): Promise<void>;
208
+ /**
209
+ * Initializes the peer connection event handlers
210
+ */
211
+ private initPeerConnectionEventHandlers;
212
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * A simple SIP user implementation for web browsers.
3
+ * @packageDocumentation
4
+ */
5
+ export * from "./simple-user";
6
+ export * from "./simple-user-delegate";
7
+ export * from "./simple-user-options";