ue-softphone-sdk 4.0.3 → 4.0.5
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.
- package/dist/lib/types/lib/sip.js/api/ack.d.ts +12 -0
- package/dist/lib/types/lib/sip.js/api/bye.d.ts +16 -0
- package/dist/lib/types/lib/sip.js/api/dtmf.d.ts +15 -0
- package/dist/lib/types/lib/sip.js/api/emitter.d.ts +88 -0
- package/dist/lib/types/lib/sip.js/api/exceptions/content-type-unsupported.d.ts +8 -0
- package/dist/lib/types/lib/sip.js/api/exceptions/index.d.ts +5 -0
- package/dist/lib/types/lib/sip.js/api/exceptions/request-pending.d.ts +9 -0
- package/dist/lib/types/lib/sip.js/api/exceptions/session-description-handler.d.ts +8 -0
- package/dist/lib/types/lib/sip.js/api/exceptions/session-terminated.d.ts +8 -0
- package/dist/lib/types/lib/sip.js/api/exceptions/state-transition.d.ts +8 -0
- package/dist/lib/types/lib/sip.js/api/index.d.ts +59 -0
- package/dist/lib/types/lib/sip.js/api/info.d.ts +16 -0
- package/dist/lib/types/lib/sip.js/api/invitation-accept-options.d.ts +19 -0
- package/dist/lib/types/lib/sip.js/api/invitation-progress-options.d.ts +38 -0
- package/dist/lib/types/lib/sip.js/api/invitation-reject-options.d.ts +25 -0
- package/dist/lib/types/lib/sip.js/api/invitation.d.ts +179 -0
- package/dist/lib/types/lib/sip.js/api/inviter-cancel-options.d.ts +9 -0
- package/dist/lib/types/lib/sip.js/api/inviter-invite-options.d.ts +28 -0
- package/dist/lib/types/lib/sip.js/api/inviter-options.d.ts +43 -0
- package/dist/lib/types/lib/sip.js/api/inviter.d.ts +236 -0
- package/dist/lib/types/lib/sip.js/api/message.d.ts +16 -0
- package/dist/lib/types/lib/sip.js/api/messager-message-options.d.ts +11 -0
- package/dist/lib/types/lib/sip.js/api/messager-options.d.ts +17 -0
- package/dist/lib/types/lib/sip.js/api/messager.d.ts +26 -0
- package/dist/lib/types/lib/sip.js/api/notification.d.ts +16 -0
- package/dist/lib/types/lib/sip.js/api/notifier.d.ts +8 -0
- package/dist/lib/types/lib/sip.js/api/publisher-options.d.ts +33 -0
- package/dist/lib/types/lib/sip.js/api/publisher-publish-options.d.ts +6 -0
- package/dist/lib/types/lib/sip.js/api/publisher-state.d.ts +21 -0
- package/dist/lib/types/lib/sip.js/api/publisher-unpublish-options.d.ts +6 -0
- package/dist/lib/types/lib/sip.js/api/publisher.d.ts +65 -0
- package/dist/lib/types/lib/sip.js/api/referral.d.ts +38 -0
- package/dist/lib/types/lib/sip.js/api/registerer-options.d.ts +46 -0
- package/dist/lib/types/lib/sip.js/api/registerer-register-options.d.ts +11 -0
- package/dist/lib/types/lib/sip.js/api/registerer-state.d.ts +21 -0
- package/dist/lib/types/lib/sip.js/api/registerer-unregister-options.d.ts +16 -0
- package/dist/lib/types/lib/sip.js/api/registerer.d.ts +144 -0
- package/dist/lib/types/lib/sip.js/api/session-bye-options.d.ts +11 -0
- package/dist/lib/types/lib/sip.js/api/session-delegate.d.ts +79 -0
- package/dist/lib/types/lib/sip.js/api/session-description-handler-factory.d.ts +15 -0
- package/dist/lib/types/lib/sip.js/api/session-description-handler.d.ts +74 -0
- package/dist/lib/types/lib/sip.js/api/session-info-options.d.ts +11 -0
- package/dist/lib/types/lib/sip.js/api/session-invite-options.d.ts +28 -0
- package/dist/lib/types/lib/sip.js/api/session-message-options.d.ts +11 -0
- package/dist/lib/types/lib/sip.js/api/session-options.d.ts +8 -0
- package/dist/lib/types/lib/sip.js/api/session-refer-options.d.ts +14 -0
- package/dist/lib/types/lib/sip.js/api/session-state.d.ts +45 -0
- package/dist/lib/types/lib/sip.js/api/session.d.ts +359 -0
- package/dist/lib/types/lib/sip.js/api/subscriber-options.d.ts +11 -0
- package/dist/lib/types/lib/sip.js/api/subscriber-subscribe-options.d.ts +6 -0
- package/dist/lib/types/lib/sip.js/api/subscriber.d.ts +94 -0
- package/dist/lib/types/lib/sip.js/api/subscription-delegate.d.ts +12 -0
- package/dist/lib/types/lib/sip.js/api/subscription-options.d.ts +8 -0
- package/dist/lib/types/lib/sip.js/api/subscription-state.d.ts +19 -0
- package/dist/lib/types/lib/sip.js/api/subscription-subscribe-options.d.ts +6 -0
- package/dist/lib/types/lib/sip.js/api/subscription-unsubscribe-options.d.ts +6 -0
- package/dist/lib/types/lib/sip.js/api/subscription.d.ts +84 -0
- package/dist/lib/types/lib/sip.js/api/transport-state.d.ts +37 -0
- package/dist/lib/types/lib/sip.js/api/transport.d.ts +159 -0
- package/dist/lib/types/lib/sip.js/api/user-agent-delegate.d.ts +84 -0
- package/dist/lib/types/lib/sip.js/api/user-agent-options.d.ts +253 -0
- package/dist/lib/types/lib/sip.js/api/user-agent-state.d.ts +14 -0
- package/dist/lib/types/lib/sip.js/api/user-agent.d.ts +200 -0
- package/dist/lib/types/lib/sip.js/core/dialogs/dialog-state.d.ts +34 -0
- package/dist/lib/types/lib/sip.js/core/dialogs/dialog.d.ts +161 -0
- package/dist/lib/types/lib/sip.js/core/dialogs/index.d.ts +4 -0
- package/dist/lib/types/lib/sip.js/core/dialogs/session-dialog.d.ts +196 -0
- package/dist/lib/types/lib/sip.js/core/dialogs/subscription-dialog.d.ts +120 -0
- package/dist/lib/types/lib/sip.js/core/exceptions/exception.d.ts +8 -0
- package/dist/lib/types/lib/sip.js/core/exceptions/index.d.ts +3 -0
- package/dist/lib/types/lib/sip.js/core/exceptions/transaction-state-error.d.ts +8 -0
- package/dist/lib/types/lib/sip.js/core/exceptions/transport-error.d.ts +8 -0
- package/dist/lib/types/lib/sip.js/core/index.d.ts +15 -0
- package/dist/lib/types/lib/sip.js/core/log/index.d.ts +3 -0
- package/dist/lib/types/lib/sip.js/core/log/levels.d.ts +10 -0
- package/dist/lib/types/lib/sip.js/core/log/logger-factory.d.ts +21 -0
- package/dist/lib/types/lib/sip.js/core/log/logger.d.ts +19 -0
- package/dist/lib/types/lib/sip.js/core/messages/body.d.ts +64 -0
- package/dist/lib/types/lib/sip.js/core/messages/digest-authentication.d.ts +51 -0
- package/dist/lib/types/lib/sip.js/core/messages/incoming-message.d.ts +79 -0
- package/dist/lib/types/lib/sip.js/core/messages/incoming-request-message.d.ts +10 -0
- package/dist/lib/types/lib/sip.js/core/messages/incoming-request.d.ts +67 -0
- package/dist/lib/types/lib/sip.js/core/messages/incoming-response-message.d.ts +10 -0
- package/dist/lib/types/lib/sip.js/core/messages/incoming-response.d.ts +12 -0
- package/dist/lib/types/lib/sip.js/core/messages/index.d.ts +13 -0
- package/dist/lib/types/lib/sip.js/core/messages/md5.d.ts +32 -0
- package/dist/lib/types/lib/sip.js/core/messages/methods/ack.d.ts +18 -0
- package/dist/lib/types/lib/sip.js/core/messages/methods/bye.d.ts +21 -0
- package/dist/lib/types/lib/sip.js/core/messages/methods/cancel.d.ts +21 -0
- package/dist/lib/types/lib/sip.js/core/messages/methods/constants.d.ts +20 -0
- package/dist/lib/types/lib/sip.js/core/messages/methods/index.d.ts +13 -0
- package/dist/lib/types/lib/sip.js/core/messages/methods/info.d.ts +21 -0
- package/dist/lib/types/lib/sip.js/core/messages/methods/invite.d.ts +86 -0
- package/dist/lib/types/lib/sip.js/core/messages/methods/message.d.ts +21 -0
- package/dist/lib/types/lib/sip.js/core/messages/methods/notify.d.ts +21 -0
- package/dist/lib/types/lib/sip.js/core/messages/methods/prack.d.ts +21 -0
- package/dist/lib/types/lib/sip.js/core/messages/methods/publish.d.ts +21 -0
- package/dist/lib/types/lib/sip.js/core/messages/methods/refer.d.ts +21 -0
- package/dist/lib/types/lib/sip.js/core/messages/methods/register.d.ts +21 -0
- package/dist/lib/types/lib/sip.js/core/messages/methods/subscribe.d.ts +54 -0
- package/dist/lib/types/lib/sip.js/core/messages/outgoing-request-message.d.ts +94 -0
- package/dist/lib/types/lib/sip.js/core/messages/outgoing-request.d.ts +67 -0
- package/dist/lib/types/lib/sip.js/core/messages/outgoing-response.d.ts +42 -0
- package/dist/lib/types/lib/sip.js/core/messages/parser.d.ts +14 -0
- package/dist/lib/types/lib/sip.js/core/messages/utils.d.ts +24 -0
- package/dist/lib/types/lib/sip.js/core/session/index.d.ts +2 -0
- package/dist/lib/types/lib/sip.js/core/session/session-delegate.d.ts +70 -0
- package/dist/lib/types/lib/sip.js/core/session/session.d.ts +134 -0
- package/dist/lib/types/lib/sip.js/core/subscription/index.d.ts +2 -0
- package/dist/lib/types/lib/sip.js/core/subscription/subscription-delegate.d.ts +27 -0
- package/dist/lib/types/lib/sip.js/core/subscription/subscription.d.ts +55 -0
- package/dist/lib/types/lib/sip.js/core/timers.d.ts +20 -0
- package/dist/lib/types/lib/sip.js/core/transactions/client-transaction.d.ts +45 -0
- package/dist/lib/types/lib/sip.js/core/transactions/index.d.ts +10 -0
- package/dist/lib/types/lib/sip.js/core/transactions/invite-client-transaction.d.ts +116 -0
- package/dist/lib/types/lib/sip.js/core/transactions/invite-server-transaction.d.ts +127 -0
- package/dist/lib/types/lib/sip.js/core/transactions/non-invite-client-transaction.d.ts +69 -0
- package/dist/lib/types/lib/sip.js/core/transactions/non-invite-server-transaction.d.ts +57 -0
- package/dist/lib/types/lib/sip.js/core/transactions/server-transaction.d.ts +35 -0
- package/dist/lib/types/lib/sip.js/core/transactions/transaction-state.d.ts +13 -0
- package/dist/lib/types/lib/sip.js/core/transactions/transaction-user.d.ts +72 -0
- package/dist/lib/types/lib/sip.js/core/transactions/transaction.d.ts +79 -0
- package/dist/lib/types/lib/sip.js/core/transport.d.ts +31 -0
- package/dist/lib/types/lib/sip.js/core/user-agent-core/allowed-methods.d.ts +4 -0
- package/dist/lib/types/lib/sip.js/core/user-agent-core/index.d.ts +3 -0
- package/dist/lib/types/lib/sip.js/core/user-agent-core/user-agent-core-configuration.d.ts +99 -0
- package/dist/lib/types/lib/sip.js/core/user-agent-core/user-agent-core-delegate.d.ts +37 -0
- package/dist/lib/types/lib/sip.js/core/user-agent-core/user-agent-core.d.ts +179 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/bye-user-agent-client.d.ts +10 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/bye-user-agent-server.d.ts +10 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/cancel-user-agent-client.d.ts +10 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/index.d.ts +26 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/info-user-agent-client.d.ts +10 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/info-user-agent-server.d.ts +10 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/invite-user-agent-client.d.ts +35 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/invite-user-agent-server.d.ts +77 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/message-user-agent-client.d.ts +10 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/message-user-agent-server.d.ts +10 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/notify-user-agent-client.d.ts +10 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/notify-user-agent-server.d.ts +16 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/prack-user-agent-client.d.ts +10 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/prack-user-agent-server.d.ts +16 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/publish-user-agent-client.d.ts +10 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/re-invite-user-agent-client.d.ts +18 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/re-invite-user-agent-server.d.ts +41 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/re-subscribe-user-agent-client.d.ts +17 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/re-subscribe-user-agent-server.d.ts +10 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/refer-user-agent-client.d.ts +10 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/refer-user-agent-server.d.ts +16 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/register-user-agent-client.d.ts +10 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/register-user-agent-server.d.ts +11 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/subscribe-user-agent-client.d.ts +65 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/subscribe-user-agent-server.d.ts +11 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/user-agent-client.d.ts +103 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/user-agent-server.d.ts +79 -0
- package/dist/lib/types/lib/sip.js/grammar/grammar.d.ts +26 -0
- package/dist/lib/types/lib/sip.js/grammar/index.d.ts +4 -0
- package/dist/lib/types/lib/sip.js/grammar/name-addr-header.d.ts +24 -0
- package/dist/lib/types/lib/sip.js/grammar/parameters.d.ts +16 -0
- package/dist/lib/types/lib/sip.js/grammar/pegjs/dist/grammar.d.ts +50 -0
- package/dist/lib/types/lib/sip.js/grammar/uri.d.ts +62 -0
- package/dist/lib/types/lib/sip.js/index.d.ts +9 -0
- package/dist/lib/types/lib/sip.js/platform/web/index.d.ts +4 -0
- package/dist/lib/types/lib/sip.js/platform/web/modifiers/index.d.ts +5 -0
- package/dist/lib/types/lib/sip.js/platform/web/modifiers/modifiers.d.ts +41 -0
- package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/index.d.ts +14 -0
- package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/media-stream-factory-default.d.ts +6 -0
- package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/media-stream-factory.d.ts +6 -0
- package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/peer-connection-configuration-default.d.ts +5 -0
- package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/peer-connection-delegate.d.ts +63 -0
- package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/session-description-handler-configuration.d.ts +16 -0
- package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/session-description-handler-factory-default.d.ts +11 -0
- package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/session-description-handler-factory-options.d.ts +9 -0
- package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/session-description-handler-factory.d.ts +16 -0
- package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/session-description-handler-options.d.ts +47 -0
- package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/session-description-handler.d.ts +212 -0
- package/dist/lib/types/lib/sip.js/platform/web/simple-user/index.d.ts +7 -0
- package/dist/lib/types/lib/sip.js/platform/web/simple-user/simple-user-delegate.d.ts +72 -0
- package/dist/lib/types/lib/sip.js/platform/web/simple-user/simple-user-options.d.ts +90 -0
- package/dist/lib/types/lib/sip.js/platform/web/simple-user/simple-user.d.ts +226 -0
- package/dist/lib/types/lib/sip.js/platform/web/transport/index.d.ts +6 -0
- package/dist/lib/types/lib/sip.js/platform/web/transport/transport-options.d.ts +30 -0
- package/dist/lib/types/lib/sip.js/platform/web/transport/transport.d.ts +125 -0
- package/dist/lib/types/lib/sip.js/version.d.ts +1 -0
- package/dist/lib/types/webrtc/webrtc-method.d.ts +2 -0
- package/dist/lib/types/webrtc/webrtc.d.ts +38 -0
- package/dist/lib/ue-soft-phone.min.js +1 -22
- package/dist/ue-softphone-sdk.js +1 -7
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IncomingRequestMessage, IncomingAckRequest } from "../core";
|
|
2
|
+
/**
|
|
3
|
+
* A request to confirm a {@link Session} (incoming ACK).
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export declare class Ack {
|
|
7
|
+
private incomingAckRequest;
|
|
8
|
+
/** @internal */
|
|
9
|
+
constructor(incomingAckRequest: IncomingAckRequest);
|
|
10
|
+
/** Incoming ACK request message. */
|
|
11
|
+
get request(): IncomingRequestMessage;
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IncomingByeRequest, IncomingRequestMessage, ResponseOptions } from "../core";
|
|
2
|
+
/**
|
|
3
|
+
* A request to end a {@link Session} (incoming BYE).
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export declare class Bye {
|
|
7
|
+
private incomingByeRequest;
|
|
8
|
+
/** @internal */
|
|
9
|
+
constructor(incomingByeRequest: IncomingByeRequest);
|
|
10
|
+
/** Incoming BYE request message. */
|
|
11
|
+
get request(): IncomingRequestMessage;
|
|
12
|
+
/** Accept the request. */
|
|
13
|
+
accept(options?: ResponseOptions): Promise<void>;
|
|
14
|
+
/** Reject the request. */
|
|
15
|
+
reject(options?: ResponseOptions): Promise<void>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IncomingInfoRequest } from "../core";
|
|
2
|
+
import { Info } from "./info";
|
|
3
|
+
/**
|
|
4
|
+
* A DTMF signal (incoming INFO).
|
|
5
|
+
* @deprecated Use `Info`.
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare class DTMF extends Info {
|
|
9
|
+
private _tone;
|
|
10
|
+
private _duration;
|
|
11
|
+
/** @internal */
|
|
12
|
+
constructor(incomingInfoRequest: IncomingInfoRequest, tone: string, duration: number);
|
|
13
|
+
get tone(): string;
|
|
14
|
+
get duration(): number;
|
|
15
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generic observable.
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
export interface Emitter<T> {
|
|
6
|
+
/**
|
|
7
|
+
* Sets up a function that will be called whenever the target changes.
|
|
8
|
+
* @param listener - Callback function.
|
|
9
|
+
* @param options - An options object that specifies characteristics about the listener.
|
|
10
|
+
* If once true, indicates that the listener should be invoked at most once after being added.
|
|
11
|
+
* If once true, the listener would be automatically removed when invoked.
|
|
12
|
+
*/
|
|
13
|
+
addListener(listener: (data: T) => void, options?: {
|
|
14
|
+
once?: boolean;
|
|
15
|
+
}): void;
|
|
16
|
+
/**
|
|
17
|
+
* Removes from the listener previously registered with addListener.
|
|
18
|
+
* @param listener - Callback function.
|
|
19
|
+
*/
|
|
20
|
+
removeListener(listener: (data: T) => void): void;
|
|
21
|
+
/**
|
|
22
|
+
* Registers a listener.
|
|
23
|
+
* @param listener - Callback function.
|
|
24
|
+
* @deprecated Use addListener.
|
|
25
|
+
*/
|
|
26
|
+
on(listener: (data: T) => void): void;
|
|
27
|
+
/**
|
|
28
|
+
* Unregisters a listener.
|
|
29
|
+
* @param listener - Callback function.
|
|
30
|
+
* @deprecated Use removeListener.
|
|
31
|
+
*/
|
|
32
|
+
off(listener: (data: T) => void): void;
|
|
33
|
+
/**
|
|
34
|
+
* Registers a listener then unregisters the listener after one event emission.
|
|
35
|
+
* @param listener - Callback function.
|
|
36
|
+
* @deprecated Use addListener.
|
|
37
|
+
*/
|
|
38
|
+
once(listener: (data: T) => void): void;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* An {@link Emitter} implementation.
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
export declare class EmitterImpl<T> implements Emitter<T> {
|
|
45
|
+
private listeners;
|
|
46
|
+
/**
|
|
47
|
+
* Sets up a function that will be called whenever the target changes.
|
|
48
|
+
* @param listener - Callback function.
|
|
49
|
+
* @param options - An options object that specifies characteristics about the listener.
|
|
50
|
+
* If once true, indicates that the listener should be invoked at most once after being added.
|
|
51
|
+
* If once true, the listener would be automatically removed when invoked.
|
|
52
|
+
*/
|
|
53
|
+
addListener(listener: (data: T) => void, options?: {
|
|
54
|
+
once?: boolean;
|
|
55
|
+
}): void;
|
|
56
|
+
/**
|
|
57
|
+
* Emit change.
|
|
58
|
+
* @param data - Data to emit.
|
|
59
|
+
*/
|
|
60
|
+
emit(data: T): void;
|
|
61
|
+
/**
|
|
62
|
+
* Removes all listeners previously registered with addListener.
|
|
63
|
+
*/
|
|
64
|
+
removeAllListeners(): void;
|
|
65
|
+
/**
|
|
66
|
+
* Removes a listener previously registered with addListener.
|
|
67
|
+
* @param listener - Callback function.
|
|
68
|
+
*/
|
|
69
|
+
removeListener(listener: (data: T) => void): void;
|
|
70
|
+
/**
|
|
71
|
+
* Registers a listener.
|
|
72
|
+
* @param listener - Callback function.
|
|
73
|
+
* @deprecated Use addListener.
|
|
74
|
+
*/
|
|
75
|
+
on(listener: (data: T) => void): void;
|
|
76
|
+
/**
|
|
77
|
+
* Unregisters a listener.
|
|
78
|
+
* @param listener - Callback function.
|
|
79
|
+
* @deprecated Use removeListener.
|
|
80
|
+
*/
|
|
81
|
+
off(listener: (data: T) => void): void;
|
|
82
|
+
/**
|
|
83
|
+
* Registers a listener then unregisters the listener after one event emission.
|
|
84
|
+
* @param listener - Callback function.
|
|
85
|
+
* @deprecated Use addListener.
|
|
86
|
+
*/
|
|
87
|
+
once(listener: (data: T) => void): void;
|
|
88
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A simple yet powerful API which takes care of SIP signaling and WebRTC media sessions for you.
|
|
3
|
+
* @packageDocumentation
|
|
4
|
+
*/
|
|
5
|
+
export * from "./exceptions";
|
|
6
|
+
export * from "./ack";
|
|
7
|
+
export * from "./bye";
|
|
8
|
+
export * from "./emitter";
|
|
9
|
+
export * from "./info";
|
|
10
|
+
export * from "./invitation-accept-options";
|
|
11
|
+
export * from "./invitation-progress-options";
|
|
12
|
+
export * from "./invitation-reject-options";
|
|
13
|
+
export * from "./invitation";
|
|
14
|
+
export * from "./inviter-cancel-options";
|
|
15
|
+
export * from "./inviter-invite-options";
|
|
16
|
+
export * from "./inviter-options";
|
|
17
|
+
export * from "./inviter";
|
|
18
|
+
export * from "./message";
|
|
19
|
+
export * from "./messager-message-options";
|
|
20
|
+
export * from "./messager-options";
|
|
21
|
+
export * from "./messager";
|
|
22
|
+
export * from "./notification";
|
|
23
|
+
export * from "./publisher-options";
|
|
24
|
+
export * from "./publisher-publish-options";
|
|
25
|
+
export * from "./publisher-state";
|
|
26
|
+
export * from "./publisher-unpublish-options";
|
|
27
|
+
export * from "./publisher";
|
|
28
|
+
export * from "./referral";
|
|
29
|
+
export * from "./registerer-options";
|
|
30
|
+
export * from "./registerer-register-options";
|
|
31
|
+
export * from "./registerer-state";
|
|
32
|
+
export * from "./registerer-unregister-options";
|
|
33
|
+
export * from "./registerer";
|
|
34
|
+
export * from "./session-bye-options";
|
|
35
|
+
export * from "./session-delegate";
|
|
36
|
+
export * from "./session-description-handler-factory";
|
|
37
|
+
export * from "./session-description-handler";
|
|
38
|
+
export * from "./session-info-options";
|
|
39
|
+
export * from "./session-invite-options";
|
|
40
|
+
export * from "./session-message-options";
|
|
41
|
+
export * from "./session-options";
|
|
42
|
+
export * from "./session-refer-options";
|
|
43
|
+
export * from "./session-state";
|
|
44
|
+
export * from "./session";
|
|
45
|
+
export * from "./subscriber-options";
|
|
46
|
+
export * from "./subscriber-subscribe-options";
|
|
47
|
+
export * from "./subscriber";
|
|
48
|
+
export * from "./subscription-delegate";
|
|
49
|
+
export * from "./subscription-options";
|
|
50
|
+
export * from "./subscription-state";
|
|
51
|
+
export * from "./subscription-subscribe-options";
|
|
52
|
+
export * from "./subscription-unsubscribe-options";
|
|
53
|
+
export * from "./subscription";
|
|
54
|
+
export * from "./transport";
|
|
55
|
+
export * from "./transport-state";
|
|
56
|
+
export * from "./user-agent-delegate";
|
|
57
|
+
export * from "./user-agent-options";
|
|
58
|
+
export * from "./user-agent-state";
|
|
59
|
+
export * from "./user-agent";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IncomingInfoRequest, IncomingRequestMessage, ResponseOptions } from "../core";
|
|
2
|
+
/**
|
|
3
|
+
* An exchange of information (incoming INFO).
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export declare class Info {
|
|
7
|
+
private incomingInfoRequest;
|
|
8
|
+
/** @internal */
|
|
9
|
+
constructor(incomingInfoRequest: IncomingInfoRequest);
|
|
10
|
+
/** Incoming MESSAGE request message. */
|
|
11
|
+
get request(): IncomingRequestMessage;
|
|
12
|
+
/** Accept the request. */
|
|
13
|
+
accept(options?: ResponseOptions): Promise<void>;
|
|
14
|
+
/** Reject the request. */
|
|
15
|
+
reject(options?: ResponseOptions): Promise<void>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SessionDescriptionHandlerModifier, SessionDescriptionHandlerOptions } from "./session-description-handler";
|
|
2
|
+
/**
|
|
3
|
+
* Options for {@link Invitation.accept}.
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export interface InvitationAcceptOptions {
|
|
7
|
+
/**
|
|
8
|
+
* Array of extra headers added to the response.
|
|
9
|
+
*/
|
|
10
|
+
extraHeaders?: Array<string>;
|
|
11
|
+
/**
|
|
12
|
+
* Modifiers to pass to SessionDescriptionHandler during the initial INVITE transaction.
|
|
13
|
+
*/
|
|
14
|
+
sessionDescriptionHandlerModifiers?: Array<SessionDescriptionHandlerModifier>;
|
|
15
|
+
/**
|
|
16
|
+
* Options to pass to SessionDescriptionHandler during the initial INVITE transaction.
|
|
17
|
+
*/
|
|
18
|
+
sessionDescriptionHandlerOptions?: SessionDescriptionHandlerOptions;
|
|
19
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { SessionDescriptionHandlerModifier, SessionDescriptionHandlerOptions } from "./session-description-handler";
|
|
2
|
+
/**
|
|
3
|
+
* Options for {@link Invitation.progress}.
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export interface InvitationProgressOptions {
|
|
7
|
+
/**
|
|
8
|
+
* Body
|
|
9
|
+
*/
|
|
10
|
+
body?: string | {
|
|
11
|
+
body: string;
|
|
12
|
+
contentType: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Array of extra headers added to the response.
|
|
16
|
+
*/
|
|
17
|
+
extraHeaders?: Array<string>;
|
|
18
|
+
/**
|
|
19
|
+
* Modifiers to pass to SessionDescriptionHandler during the initial INVITE transaction.
|
|
20
|
+
*/
|
|
21
|
+
sessionDescriptionHandlerModifiers?: Array<SessionDescriptionHandlerModifier>;
|
|
22
|
+
/**
|
|
23
|
+
* Options to pass to SessionDescriptionHandler during the initial INVITE transaction.
|
|
24
|
+
*/
|
|
25
|
+
sessionDescriptionHandlerOptions?: SessionDescriptionHandlerOptions;
|
|
26
|
+
/**
|
|
27
|
+
* Status code for response.
|
|
28
|
+
*/
|
|
29
|
+
statusCode?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Reason phrase for response.
|
|
32
|
+
*/
|
|
33
|
+
reasonPhrase?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Send reliable response.
|
|
36
|
+
*/
|
|
37
|
+
rel100?: boolean;
|
|
38
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Options for {@link Invitation.reject}.
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
export interface InvitationRejectOptions {
|
|
6
|
+
/**
|
|
7
|
+
* Body
|
|
8
|
+
*/
|
|
9
|
+
body?: string | {
|
|
10
|
+
body: string;
|
|
11
|
+
contentType: string;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Array of extra headers added to the response.
|
|
15
|
+
*/
|
|
16
|
+
extraHeaders?: Array<string>;
|
|
17
|
+
/**
|
|
18
|
+
* Status code for response.
|
|
19
|
+
*/
|
|
20
|
+
statusCode?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Reason phrase for response.
|
|
23
|
+
*/
|
|
24
|
+
reasonPhrase?: string;
|
|
25
|
+
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { IncomingInviteRequest, IncomingRequestMessage, Logger, NameAddrHeader } from '../core';
|
|
2
|
+
import { InvitationAcceptOptions } from './invitation-accept-options';
|
|
3
|
+
import { InvitationProgressOptions } from './invitation-progress-options';
|
|
4
|
+
import { InvitationRejectOptions } from './invitation-reject-options';
|
|
5
|
+
import { Session } from './session';
|
|
6
|
+
import { UserAgent } from './user-agent';
|
|
7
|
+
/**
|
|
8
|
+
* An invitation is an offer to establish a {@link Session} (incoming INVITE).
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export declare class Invitation extends Session {
|
|
12
|
+
private incomingInviteRequest;
|
|
13
|
+
/**
|
|
14
|
+
* Logger.
|
|
15
|
+
*/
|
|
16
|
+
protected logger: Logger;
|
|
17
|
+
/** @internal */
|
|
18
|
+
protected _id: string;
|
|
19
|
+
/** True if dispose() has been called. */
|
|
20
|
+
private disposed;
|
|
21
|
+
/** INVITE will be rejected if not accepted within a certain period time. */
|
|
22
|
+
private expiresTimer;
|
|
23
|
+
/** True if this Session has been Terminated due to a CANCEL request. */
|
|
24
|
+
private isCanceled;
|
|
25
|
+
/** Are reliable provisional responses required or supported. */
|
|
26
|
+
private rel100;
|
|
27
|
+
/** The current RSeq header value. */
|
|
28
|
+
private rseq;
|
|
29
|
+
/** INVITE will be rejected if final response not sent in a certain period time. */
|
|
30
|
+
private userNoAnswerTimer;
|
|
31
|
+
/** True if waiting for a PRACK before sending a 200 Ok. */
|
|
32
|
+
private waitingForPrack;
|
|
33
|
+
/** A Promise providing a defer when waiting for a PRACK. */
|
|
34
|
+
private waitingForPrackPromise;
|
|
35
|
+
/** Function to resolve when PRACK arrives. */
|
|
36
|
+
private waitingForPrackResolve;
|
|
37
|
+
/** Function to reject when PRACK never arrives. */
|
|
38
|
+
private waitingForPrackReject;
|
|
39
|
+
/** @internal */
|
|
40
|
+
constructor(userAgent: UserAgent, incomingInviteRequest: IncomingInviteRequest);
|
|
41
|
+
/**
|
|
42
|
+
* Destructor.
|
|
43
|
+
*/
|
|
44
|
+
dispose(): Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* If true, a first provisional response after the 100 Trying
|
|
47
|
+
* will be sent automatically. This is false it the UAC required
|
|
48
|
+
* reliable provisional responses (100rel in Require header) or
|
|
49
|
+
* the user agent configuration has specified to not send an
|
|
50
|
+
* initial response, otherwise it is true. The provisional is sent by
|
|
51
|
+
* calling `progress()` without any options.
|
|
52
|
+
*/
|
|
53
|
+
get autoSendAnInitialProvisionalResponse(): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Initial incoming INVITE request message body.
|
|
56
|
+
*/
|
|
57
|
+
get body(): string | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* The identity of the local user.
|
|
60
|
+
*/
|
|
61
|
+
get localIdentity(): NameAddrHeader;
|
|
62
|
+
/**
|
|
63
|
+
* The identity of the remote user.
|
|
64
|
+
*/
|
|
65
|
+
get remoteIdentity(): NameAddrHeader;
|
|
66
|
+
/**
|
|
67
|
+
* Initial incoming INVITE request message.
|
|
68
|
+
*/
|
|
69
|
+
get request(): IncomingRequestMessage;
|
|
70
|
+
/**
|
|
71
|
+
* Accept the invitation.
|
|
72
|
+
*
|
|
73
|
+
* @remarks
|
|
74
|
+
* Accept the incoming INVITE request to start a Session.
|
|
75
|
+
* Replies to the INVITE request with a 200 Ok response.
|
|
76
|
+
* Resolves once the response sent, otherwise rejects.
|
|
77
|
+
*
|
|
78
|
+
* This method may reject for a variety of reasons including
|
|
79
|
+
* the receipt of a CANCEL request before `accept` is able
|
|
80
|
+
* to construct a response.
|
|
81
|
+
* @param options - Options bucket.
|
|
82
|
+
*/
|
|
83
|
+
accept(options?: InvitationAcceptOptions): Promise<void>;
|
|
84
|
+
/**
|
|
85
|
+
* Indicate progress processing the invitation.
|
|
86
|
+
*
|
|
87
|
+
* @remarks
|
|
88
|
+
* Report progress to the the caller.
|
|
89
|
+
* Replies to the INVITE request with a 1xx provisional response.
|
|
90
|
+
* Resolves once the response sent, otherwise rejects.
|
|
91
|
+
* @param options - Options bucket.
|
|
92
|
+
*/
|
|
93
|
+
progress(options?: InvitationProgressOptions): Promise<void>;
|
|
94
|
+
/**
|
|
95
|
+
* Reject the invitation.
|
|
96
|
+
*
|
|
97
|
+
* @remarks
|
|
98
|
+
* Replies to the INVITE request with a 4xx, 5xx, or 6xx final response.
|
|
99
|
+
* Resolves once the response sent, otherwise rejects.
|
|
100
|
+
*
|
|
101
|
+
* The expectation is that this method is used to reject an INVITE request.
|
|
102
|
+
* That is indeed the case - a call to `progress` followed by `reject` is
|
|
103
|
+
* a typical way to "decline" an incoming INVITE request. However it may
|
|
104
|
+
* also be called after calling `accept` (but only before it completes)
|
|
105
|
+
* which will reject the call and cause `accept` to reject.
|
|
106
|
+
* @param options - Options bucket.
|
|
107
|
+
*/
|
|
108
|
+
reject(options?: InvitationRejectOptions): Promise<void>;
|
|
109
|
+
/**
|
|
110
|
+
* Handle CANCEL request.
|
|
111
|
+
*
|
|
112
|
+
* @param message - CANCEL message.
|
|
113
|
+
* @internal
|
|
114
|
+
*/
|
|
115
|
+
_onCancel(message: IncomingRequestMessage): void;
|
|
116
|
+
/**
|
|
117
|
+
* Helper function to handle offer/answer in a PRACK.
|
|
118
|
+
*/
|
|
119
|
+
private handlePrackOfferAnswer;
|
|
120
|
+
/**
|
|
121
|
+
* A handler for errors which occur while attempting to send 1xx and 2xx responses.
|
|
122
|
+
* In all cases, an attempt is made to reject the request if it is still outstanding.
|
|
123
|
+
* And while there are a variety of things which can go wrong and we log something here
|
|
124
|
+
* for all errors, there are a handful of common exceptions we pay some extra attention to.
|
|
125
|
+
* @param error - The error which occurred.
|
|
126
|
+
*/
|
|
127
|
+
private handleResponseError;
|
|
128
|
+
/**
|
|
129
|
+
* Callback for when ACK for a 2xx response is never received.
|
|
130
|
+
* @param session - Session the ACK never arrived for.
|
|
131
|
+
*/
|
|
132
|
+
private onAckTimeout;
|
|
133
|
+
/**
|
|
134
|
+
* A version of `accept` which resolves a session when the 200 Ok response is sent.
|
|
135
|
+
* @param options - Options bucket.
|
|
136
|
+
*/
|
|
137
|
+
private sendAccept;
|
|
138
|
+
/**
|
|
139
|
+
* A version of `progress` which resolves when the provisional response is sent.
|
|
140
|
+
* @param options - Options bucket.
|
|
141
|
+
*/
|
|
142
|
+
private sendProgress;
|
|
143
|
+
/**
|
|
144
|
+
* A version of `progress` which resolves when the provisional response with sdp is sent.
|
|
145
|
+
* @param options - Options bucket.
|
|
146
|
+
*/
|
|
147
|
+
private sendProgressWithSDP;
|
|
148
|
+
/**
|
|
149
|
+
* A version of `progress` which resolves when the reliable provisional response is sent.
|
|
150
|
+
* @param options - Options bucket.
|
|
151
|
+
*/
|
|
152
|
+
private sendProgressReliable;
|
|
153
|
+
/**
|
|
154
|
+
* A version of `progress` which resolves when the reliable provisional response is acknowledged.
|
|
155
|
+
* @param options - Options bucket.
|
|
156
|
+
*/
|
|
157
|
+
private sendProgressReliableWaitForPrack;
|
|
158
|
+
/**
|
|
159
|
+
* A version of `progress` which resolves when a 100 Trying provisional response is sent.
|
|
160
|
+
*/
|
|
161
|
+
private sendProgressTrying;
|
|
162
|
+
/**
|
|
163
|
+
* When attempting to accept the INVITE, an invitation waits
|
|
164
|
+
* for any outstanding PRACK to arrive before sending the 200 Ok.
|
|
165
|
+
* It will be waiting on this Promise to resolve which lets it know
|
|
166
|
+
* the PRACK has arrived and it may proceed to send the 200 Ok.
|
|
167
|
+
*/
|
|
168
|
+
private waitForArrivalOfPrack;
|
|
169
|
+
/**
|
|
170
|
+
* Here we are resolving the promise which in turn will cause
|
|
171
|
+
* the accept to proceed (it may still fail for other reasons, but...).
|
|
172
|
+
*/
|
|
173
|
+
private prackArrived;
|
|
174
|
+
/**
|
|
175
|
+
* Here we are rejecting the promise which in turn will cause
|
|
176
|
+
* the accept to fail and the session to transition to "terminated".
|
|
177
|
+
*/
|
|
178
|
+
private prackNeverArrived;
|
|
179
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { OutgoingRequestDelegate, RequestOptions } from "../core";
|
|
2
|
+
import { SessionDescriptionHandlerModifier, SessionDescriptionHandlerOptions } from "./session-description-handler";
|
|
3
|
+
/**
|
|
4
|
+
* Options for {@link Inviter.invite}.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export interface InviterInviteOptions {
|
|
8
|
+
/**
|
|
9
|
+
* See `core` API.
|
|
10
|
+
*/
|
|
11
|
+
requestDelegate?: OutgoingRequestDelegate;
|
|
12
|
+
/**
|
|
13
|
+
* See `core` API.
|
|
14
|
+
*/
|
|
15
|
+
requestOptions?: RequestOptions;
|
|
16
|
+
/**
|
|
17
|
+
* Modifiers to pass to SessionDescriptionHandler during the initial INVITE transaction.
|
|
18
|
+
*/
|
|
19
|
+
sessionDescriptionHandlerModifiers?: Array<SessionDescriptionHandlerModifier>;
|
|
20
|
+
/**
|
|
21
|
+
* Options to pass to SessionDescriptionHandler during the initial INVITE transaction.
|
|
22
|
+
*/
|
|
23
|
+
sessionDescriptionHandlerOptions?: SessionDescriptionHandlerOptions;
|
|
24
|
+
/**
|
|
25
|
+
* If true, send INVITE without SDP. Default is false.
|
|
26
|
+
*/
|
|
27
|
+
withoutSdp?: boolean;
|
|
28
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { URI } from "../core";
|
|
2
|
+
import { SessionDescriptionHandlerModifier } from "./session-description-handler";
|
|
3
|
+
import { SessionDescriptionHandlerOptions } from "./session-description-handler";
|
|
4
|
+
import { SessionOptions } from "./session-options";
|
|
5
|
+
/**
|
|
6
|
+
* Options for {@link Inviter} constructor.
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export interface InviterOptions extends SessionOptions {
|
|
10
|
+
/** If true, an anonymous call. */
|
|
11
|
+
anonymous?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* If true, the first answer to the local offer is immediately utilized for media.
|
|
14
|
+
* Requires that the INVITE request MUST NOT fork.
|
|
15
|
+
* Has no effect if `inviteWithoutSdp` is true.
|
|
16
|
+
* Default is false.
|
|
17
|
+
*/
|
|
18
|
+
earlyMedia?: boolean;
|
|
19
|
+
/** Array of extra headers added to the INVITE. */
|
|
20
|
+
extraHeaders?: Array<string>;
|
|
21
|
+
/** If true, send INVITE without SDP. Default is false. */
|
|
22
|
+
inviteWithoutSdp?: boolean;
|
|
23
|
+
/** @deprecated TODO: provide alternative. */
|
|
24
|
+
params?: {
|
|
25
|
+
fromDisplayName?: string;
|
|
26
|
+
fromTag?: string;
|
|
27
|
+
fromUri?: string | URI;
|
|
28
|
+
toDisplayName?: string;
|
|
29
|
+
toUri?: string | URI;
|
|
30
|
+
};
|
|
31
|
+
/** @deprecated TODO: provide alternative. */
|
|
32
|
+
renderbody?: string;
|
|
33
|
+
/** @deprecated TODO: provide alternative. */
|
|
34
|
+
rendertype?: string;
|
|
35
|
+
/** Modifiers to pass to SessionDescriptionHandler during the initial INVITE transaction. */
|
|
36
|
+
sessionDescriptionHandlerModifiers?: Array<SessionDescriptionHandlerModifier>;
|
|
37
|
+
/** Options to pass to SessionDescriptionHandler during the initial INVITE transaction. */
|
|
38
|
+
sessionDescriptionHandlerOptions?: SessionDescriptionHandlerOptions;
|
|
39
|
+
/** Modifiers to pass to SessionDescriptionHandler during re-INVITE transactions. */
|
|
40
|
+
sessionDescriptionHandlerModifiersReInvite?: Array<SessionDescriptionHandlerModifier>;
|
|
41
|
+
/** Options to pass to SessionDescriptionHandler during re-INVITE transactions. */
|
|
42
|
+
sessionDescriptionHandlerOptionsReInvite?: SessionDescriptionHandlerOptions;
|
|
43
|
+
}
|