ue-softphone-sdk 2.2.3 → 2.2.4
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/api/bye.d.ts +16 -0
- package/dist/api/dtmf.d.ts +15 -0
- package/dist/api/emitter.d.ts +88 -0
- package/dist/api/exceptions/content-type-unsupported.d.ts +8 -0
- package/dist/api/exceptions/index.d.ts +5 -0
- package/dist/api/exceptions/request-pending.d.ts +9 -0
- package/dist/api/exceptions/session-description-handler.d.ts +8 -0
- package/dist/api/exceptions/session-terminated.d.ts +8 -0
- package/dist/api/exceptions/state-transition.d.ts +8 -0
- package/dist/api/index.d.ts +58 -0
- package/dist/api/info.d.ts +16 -0
- package/dist/api/invitation-accept-options.d.ts +19 -0
- package/dist/api/invitation-progress-options.d.ts +38 -0
- package/dist/api/invitation-reject-options.d.ts +25 -0
- package/dist/api/invitation.d.ts +179 -0
- package/dist/api/inviter-cancel-options.d.ts +9 -0
- package/dist/api/inviter-invite-options.d.ts +28 -0
- package/dist/api/inviter-options.d.ts +43 -0
- package/dist/api/inviter.d.ts +236 -0
- package/dist/api/message.d.ts +16 -0
- package/dist/api/messager-message-options.d.ts +11 -0
- package/dist/api/messager-options.d.ts +17 -0
- package/dist/api/messager.d.ts +26 -0
- package/dist/api/notification.d.ts +16 -0
- package/dist/api/notifier.d.ts +8 -0
- package/dist/api/publisher-options.d.ts +33 -0
- package/dist/api/publisher-publish-options.d.ts +6 -0
- package/dist/api/publisher-state.d.ts +21 -0
- package/dist/api/publisher-unpublish-options.d.ts +6 -0
- package/dist/api/publisher.d.ts +65 -0
- package/dist/api/referral.d.ts +38 -0
- package/dist/api/registerer-options.d.ts +46 -0
- package/dist/api/registerer-register-options.d.ts +11 -0
- package/dist/api/registerer-state.d.ts +21 -0
- package/dist/api/registerer-unregister-options.d.ts +16 -0
- package/dist/api/registerer.d.ts +144 -0
- package/dist/api/session-bye-options.d.ts +11 -0
- package/dist/api/session-delegate.d.ts +73 -0
- package/dist/api/session-description-handler-factory.d.ts +15 -0
- package/dist/api/session-description-handler.d.ts +74 -0
- package/dist/api/session-info-options.d.ts +11 -0
- package/dist/api/session-invite-options.d.ts +28 -0
- package/dist/api/session-message-options.d.ts +11 -0
- package/dist/api/session-options.d.ts +8 -0
- package/dist/api/session-refer-options.d.ts +14 -0
- package/dist/api/session-state.d.ts +45 -0
- package/dist/api/session.d.ts +359 -0
- package/dist/api/subscriber-options.d.ts +11 -0
- package/dist/api/subscriber-subscribe-options.d.ts +6 -0
- package/dist/api/subscriber.d.ts +94 -0
- package/dist/api/subscription-delegate.d.ts +12 -0
- package/dist/api/subscription-options.d.ts +8 -0
- package/dist/api/subscription-state.d.ts +19 -0
- package/dist/api/subscription-subscribe-options.d.ts +6 -0
- package/dist/api/subscription-unsubscribe-options.d.ts +6 -0
- package/dist/api/subscription.d.ts +84 -0
- package/dist/api/transport-state.d.ts +37 -0
- package/dist/api/transport.d.ts +159 -0
- package/dist/api/user-agent-delegate.d.ts +84 -0
- package/dist/api/user-agent-options.d.ts +253 -0
- package/dist/api/user-agent-state.d.ts +14 -0
- package/dist/api/user-agent.d.ts +200 -0
- package/dist/core/dialogs/dialog-state.d.ts +34 -0
- package/dist/core/dialogs/dialog.d.ts +161 -0
- package/dist/core/dialogs/index.d.ts +4 -0
- package/dist/core/dialogs/session-dialog.d.ts +196 -0
- package/dist/core/dialogs/subscription-dialog.d.ts +120 -0
- package/dist/core/exceptions/exception.d.ts +8 -0
- package/dist/core/exceptions/index.d.ts +3 -0
- package/dist/core/exceptions/transaction-state-error.d.ts +8 -0
- package/dist/core/exceptions/transport-error.d.ts +8 -0
- package/dist/core/index.d.ts +15 -0
- package/dist/core/log/index.d.ts +3 -0
- package/dist/core/log/levels.d.ts +10 -0
- package/dist/core/log/logger-factory.d.ts +21 -0
- package/dist/core/log/logger.d.ts +19 -0
- package/dist/core/messages/body.d.ts +64 -0
- package/dist/core/messages/digest-authentication.d.ts +51 -0
- package/dist/core/messages/incoming-message.d.ts +79 -0
- package/dist/core/messages/incoming-request-message.d.ts +10 -0
- package/dist/core/messages/incoming-request.d.ts +67 -0
- package/dist/core/messages/incoming-response-message.d.ts +10 -0
- package/dist/core/messages/incoming-response.d.ts +12 -0
- package/dist/core/messages/index.d.ts +13 -0
- package/dist/core/messages/md5.d.ts +32 -0
- package/dist/core/messages/methods/ack.d.ts +18 -0
- package/dist/core/messages/methods/bye.d.ts +21 -0
- package/dist/core/messages/methods/cancel.d.ts +21 -0
- package/dist/core/messages/methods/constants.d.ts +20 -0
- package/dist/core/messages/methods/index.d.ts +13 -0
- package/dist/core/messages/methods/info.d.ts +21 -0
- package/dist/core/messages/methods/invite.d.ts +86 -0
- package/dist/core/messages/methods/message.d.ts +21 -0
- package/dist/core/messages/methods/notify.d.ts +21 -0
- package/dist/core/messages/methods/prack.d.ts +21 -0
- package/dist/core/messages/methods/publish.d.ts +21 -0
- package/dist/core/messages/methods/refer.d.ts +21 -0
- package/dist/core/messages/methods/register.d.ts +21 -0
- package/dist/core/messages/methods/subscribe.d.ts +54 -0
- package/dist/core/messages/outgoing-request-message.d.ts +94 -0
- package/dist/core/messages/outgoing-request.d.ts +67 -0
- package/dist/core/messages/outgoing-response.d.ts +42 -0
- package/dist/core/messages/parser.d.ts +14 -0
- package/dist/core/messages/utils.d.ts +24 -0
- package/dist/core/session/index.d.ts +2 -0
- package/dist/core/session/session-delegate.d.ts +70 -0
- package/dist/core/session/session.d.ts +134 -0
- package/dist/core/subscription/index.d.ts +2 -0
- package/dist/core/subscription/subscription-delegate.d.ts +27 -0
- package/dist/core/subscription/subscription.d.ts +55 -0
- package/dist/core/timers.d.ts +20 -0
- package/dist/core/transactions/client-transaction.d.ts +45 -0
- package/dist/core/transactions/index.d.ts +10 -0
- package/dist/core/transactions/invite-client-transaction.d.ts +116 -0
- package/dist/core/transactions/invite-server-transaction.d.ts +127 -0
- package/dist/core/transactions/non-invite-client-transaction.d.ts +69 -0
- package/dist/core/transactions/non-invite-server-transaction.d.ts +57 -0
- package/dist/core/transactions/server-transaction.d.ts +35 -0
- package/dist/core/transactions/transaction-state.d.ts +13 -0
- package/dist/core/transactions/transaction-user.d.ts +72 -0
- package/dist/core/transactions/transaction.d.ts +79 -0
- package/dist/core/transport.d.ts +31 -0
- package/dist/core/user-agent-core/allowed-methods.d.ts +4 -0
- package/dist/core/user-agent-core/index.d.ts +3 -0
- package/dist/core/user-agent-core/user-agent-core-configuration.d.ts +99 -0
- package/dist/core/user-agent-core/user-agent-core-delegate.d.ts +37 -0
- package/dist/core/user-agent-core/user-agent-core.d.ts +179 -0
- package/dist/core/user-agents/bye-user-agent-client.d.ts +10 -0
- package/dist/core/user-agents/bye-user-agent-server.d.ts +10 -0
- package/dist/core/user-agents/cancel-user-agent-client.d.ts +10 -0
- package/dist/core/user-agents/index.d.ts +26 -0
- package/dist/core/user-agents/info-user-agent-client.d.ts +10 -0
- package/dist/core/user-agents/info-user-agent-server.d.ts +10 -0
- package/dist/core/user-agents/invite-user-agent-client.d.ts +35 -0
- package/dist/core/user-agents/invite-user-agent-server.d.ts +77 -0
- package/dist/core/user-agents/message-user-agent-client.d.ts +10 -0
- package/dist/core/user-agents/message-user-agent-server.d.ts +10 -0
- package/dist/core/user-agents/notify-user-agent-client.d.ts +10 -0
- package/dist/core/user-agents/notify-user-agent-server.d.ts +16 -0
- package/dist/core/user-agents/prack-user-agent-client.d.ts +10 -0
- package/dist/core/user-agents/prack-user-agent-server.d.ts +16 -0
- package/dist/core/user-agents/publish-user-agent-client.d.ts +10 -0
- package/dist/core/user-agents/re-invite-user-agent-client.d.ts +18 -0
- package/dist/core/user-agents/re-invite-user-agent-server.d.ts +41 -0
- package/dist/core/user-agents/re-subscribe-user-agent-client.d.ts +17 -0
- package/dist/core/user-agents/re-subscribe-user-agent-server.d.ts +10 -0
- package/dist/core/user-agents/refer-user-agent-client.d.ts +10 -0
- package/dist/core/user-agents/refer-user-agent-server.d.ts +16 -0
- package/dist/core/user-agents/register-user-agent-client.d.ts +10 -0
- package/dist/core/user-agents/register-user-agent-server.d.ts +11 -0
- package/dist/core/user-agents/subscribe-user-agent-client.d.ts +65 -0
- package/dist/core/user-agents/subscribe-user-agent-server.d.ts +11 -0
- package/dist/core/user-agents/user-agent-client.d.ts +103 -0
- package/dist/core/user-agents/user-agent-server.d.ts +79 -0
- package/dist/grammar/grammar.d.ts +26 -0
- package/dist/grammar/index.d.ts +4 -0
- package/dist/grammar/name-addr-header.d.ts +24 -0
- package/dist/grammar/parameters.d.ts +16 -0
- package/dist/grammar/pegjs/dist/grammar.d.ts +50 -0
- package/dist/grammar/uri.d.ts +62 -0
- package/dist/{types/index.d.ts → index.d.ts} +7 -3
- package/dist/main.d.ts +9 -0
- package/dist/new-index.d.ts +199 -0
- package/dist/platform/web/index.d.ts +4 -0
- package/dist/platform/web/modifiers/index.d.ts +5 -0
- package/dist/platform/web/modifiers/modifiers.d.ts +41 -0
- package/dist/platform/web/session-description-handler/index.d.ts +14 -0
- package/dist/platform/web/session-description-handler/media-stream-factory-default.d.ts +6 -0
- package/dist/platform/web/session-description-handler/media-stream-factory.d.ts +6 -0
- package/dist/platform/web/session-description-handler/peer-connection-configuration-default.d.ts +5 -0
- package/dist/platform/web/session-description-handler/peer-connection-delegate.d.ts +63 -0
- package/dist/platform/web/session-description-handler/session-description-handler-configuration.d.ts +16 -0
- package/dist/platform/web/session-description-handler/session-description-handler-factory-default.d.ts +11 -0
- package/dist/platform/web/session-description-handler/session-description-handler-factory-options.d.ts +9 -0
- package/dist/platform/web/session-description-handler/session-description-handler-factory.d.ts +16 -0
- package/dist/platform/web/session-description-handler/session-description-handler-options.d.ts +47 -0
- package/dist/platform/web/session-description-handler/session-description-handler.d.ts +212 -0
- package/dist/platform/web/simple-user/index.d.ts +7 -0
- package/dist/platform/web/simple-user/simple-user-delegate.d.ts +72 -0
- package/dist/platform/web/simple-user/simple-user-options.d.ts +90 -0
- package/dist/platform/web/simple-user/simple-user.d.ts +226 -0
- package/dist/platform/web/transport/index.d.ts +6 -0
- package/dist/platform/web/transport/transport-options.d.ts +30 -0
- package/dist/platform/web/transport/transport.d.ts +125 -0
- package/dist/ue-softphone-sdk.js +2 -1
- package/dist/ue-softphone-sdk.js.map +1 -0
- package/dist/version.d.ts +1 -0
- package/dist/webPhoneSdk.d.ts +24 -0
- package/dist/webrtc.d.ts +17 -0
- package/{rollup-new.config.mjs → new-rollup.config.mjs} +1 -1
- package/package.json +6 -6
- package/rollup.config.js +15 -14
- package/src/api/api-extractor.json +358 -0
- package/src/api/bye.ts +27 -0
- package/src/api/dtmf.ts +27 -0
- package/src/api/emitter.ts +110 -0
- package/src/api/exceptions/content-type-unsupported.ts +11 -0
- package/src/api/exceptions/index.ts +5 -0
- package/src/api/exceptions/request-pending.ts +12 -0
- package/src/api/exceptions/session-description-handler.ts +11 -0
- package/src/api/exceptions/session-terminated.ts +11 -0
- package/src/api/exceptions/state-transition.ts +11 -0
- package/src/api/index.ts +58 -0
- package/src/api/info.ts +27 -0
- package/src/api/invitation-accept-options.ts +20 -0
- package/src/api/invitation-progress-options.ts +36 -0
- package/src/api/invitation-reject-options.ts +22 -0
- package/src/api/invitation.ts +816 -0
- package/src/api/inviter-cancel-options.ts +9 -0
- package/src/api/inviter-invite-options.ts +29 -0
- package/src/api/inviter-options.ts +44 -0
- package/src/api/inviter.ts +1126 -0
- package/src/api/message.ts +27 -0
- package/src/api/messager-message-options.ts +12 -0
- package/src/api/messager-options.ts +18 -0
- package/src/api/messager.ts +89 -0
- package/src/api/notification.ts +27 -0
- package/src/api/notifier.ts +7 -0
- package/src/api/publisher-options.ts +34 -0
- package/src/api/publisher-publish-options.ts +6 -0
- package/src/api/publisher-state.ts +21 -0
- package/src/api/publisher-unpublish-options.ts +6 -0
- package/src/api/publisher.ts +418 -0
- package/src/api/referral.ts +89 -0
- package/src/api/registerer-options.ts +55 -0
- package/src/api/registerer-register-options.ts +12 -0
- package/src/api/registerer-state.ts +21 -0
- package/src/api/registerer-unregister-options.ts +17 -0
- package/src/api/registerer.ts +814 -0
- package/src/api/session-bye-options.ts +12 -0
- package/src/api/session-delegate.ts +80 -0
- package/src/api/session-description-handler-factory.ts +16 -0
- package/src/api/session-description-handler.ts +89 -0
- package/src/api/session-info-options.ts +12 -0
- package/src/api/session-invite-options.ts +29 -0
- package/src/api/session-message-options.ts +12 -0
- package/src/api/session-options.ts +8 -0
- package/src/api/session-refer-options.ts +15 -0
- package/src/api/session-state.ts +45 -0
- package/src/api/session.ts +1448 -0
- package/src/api/subscriber-options.ts +12 -0
- package/src/api/subscriber-subscribe-options.ts +6 -0
- package/src/api/subscriber.ts +536 -0
- package/src/api/subscription-delegate.ts +13 -0
- package/src/api/subscription-options.ts +8 -0
- package/src/api/subscription-state.ts +19 -0
- package/src/api/subscription-subscribe-options.ts +6 -0
- package/src/api/subscription-unsubscribe-options.ts +6 -0
- package/src/api/subscription.ts +161 -0
- package/src/api/transport-state.ts +37 -0
- package/src/api/transport.ts +169 -0
- package/src/api/user-agent-delegate.ts +95 -0
- package/src/api/user-agent-options.ts +322 -0
- package/src/api/user-agent-state.ts +14 -0
- package/src/api/user-agent.ts +1014 -0
- package/src/core/api-extractor.json +358 -0
- package/src/core/dialogs/dialog-state.ts +35 -0
- package/src/core/dialogs/dialog.ts +605 -0
- package/src/core/dialogs/index.ts +4 -0
- package/src/core/dialogs/session-dialog.ts +996 -0
- package/src/core/dialogs/subscription-dialog.ts +557 -0
- package/src/core/exceptions/exception.ts +11 -0
- package/src/core/exceptions/index.ts +3 -0
- package/src/core/exceptions/transaction-state-error.ts +11 -0
- package/src/core/exceptions/transport-error.ts +11 -0
- package/src/core/index.ts +19 -0
- package/src/core/log/index.ts +3 -0
- package/src/core/log/levels.ts +10 -0
- package/src/core/log/logger-factory.ts +119 -0
- package/src/core/log/logger.ts +42 -0
- package/src/core/messages/body.ts +171 -0
- package/src/core/messages/digest-authentication.ts +190 -0
- package/src/core/messages/incoming-message.ts +152 -0
- package/src/core/messages/incoming-request-message.ts +14 -0
- package/src/core/messages/incoming-request.ts +75 -0
- package/src/core/messages/incoming-response-message.ts +14 -0
- package/src/core/messages/incoming-response.ts +13 -0
- package/src/core/messages/index.ts +18 -0
- package/src/core/messages/md5.ts +437 -0
- package/src/core/messages/methods/ack.ts +22 -0
- package/src/core/messages/methods/bye.ts +22 -0
- package/src/core/messages/methods/cancel.ts +22 -0
- package/src/core/messages/methods/constants.ts +21 -0
- package/src/core/messages/methods/index.ts +13 -0
- package/src/core/messages/methods/info.ts +22 -0
- package/src/core/messages/methods/invite.ts +104 -0
- package/src/core/messages/methods/message.ts +22 -0
- package/src/core/messages/methods/notify.ts +22 -0
- package/src/core/messages/methods/prack.ts +22 -0
- package/src/core/messages/methods/publish.ts +22 -0
- package/src/core/messages/methods/refer.ts +22 -0
- package/src/core/messages/methods/register.ts +22 -0
- package/src/core/messages/methods/subscribe.ts +59 -0
- package/src/core/messages/outgoing-request-message.ts +299 -0
- package/src/core/messages/outgoing-request.ts +77 -0
- package/src/core/messages/outgoing-response.ts +174 -0
- package/src/core/messages/parser.ts +265 -0
- package/src/core/messages/utils.ts +144 -0
- package/src/core/session/index.ts +2 -0
- package/src/core/session/session-delegate.ts +88 -0
- package/src/core/session/session.ts +158 -0
- package/src/core/subscription/index.ts +2 -0
- package/src/core/subscription/subscription-delegate.ts +30 -0
- package/src/core/subscription/subscription.ts +61 -0
- package/src/core/timers.ts +24 -0
- package/src/core/transactions/client-transaction.ts +78 -0
- package/src/core/transactions/index.ts +10 -0
- package/src/core/transactions/invite-client-transaction.ts +504 -0
- package/src/core/transactions/invite-server-transaction.ts +432 -0
- package/src/core/transactions/non-invite-client-transaction.ts +257 -0
- package/src/core/transactions/non-invite-server-transaction.ts +241 -0
- package/src/core/transactions/server-transaction.ts +47 -0
- package/src/core/transactions/transaction-state.ts +13 -0
- package/src/core/transactions/transaction-user.ts +82 -0
- package/src/core/transactions/transaction.ts +149 -0
- package/src/core/transport.ts +32 -0
- package/src/core/user-agent-core/allowed-methods.ts +19 -0
- package/src/core/user-agent-core/index.ts +3 -0
- package/src/core/user-agent-core/user-agent-core-configuration.ts +111 -0
- package/src/core/user-agent-core/user-agent-core-delegate.ts +50 -0
- package/src/core/user-agent-core/user-agent-core.ts +905 -0
- package/src/core/user-agents/bye-user-agent-client.ts +16 -0
- package/src/core/user-agents/bye-user-agent-server.ts +14 -0
- package/src/core/user-agents/cancel-user-agent-client.ts +14 -0
- package/src/core/user-agents/index.ts +26 -0
- package/src/core/user-agents/info-user-agent-client.ts +15 -0
- package/src/core/user-agents/info-user-agent-server.ts +14 -0
- package/src/core/user-agents/invite-user-agent-client.ts +405 -0
- package/src/core/user-agents/invite-user-agent-server.ts +269 -0
- package/src/core/user-agents/message-user-agent-client.ts +14 -0
- package/src/core/user-agents/message-user-agent-server.ts +14 -0
- package/src/core/user-agents/notify-user-agent-client.ts +15 -0
- package/src/core/user-agents/notify-user-agent-server.ts +30 -0
- package/src/core/user-agents/prack-user-agent-client.ts +16 -0
- package/src/core/user-agents/prack-user-agent-server.ts +37 -0
- package/src/core/user-agents/publish-user-agent-client.ts +14 -0
- package/src/core/user-agents/re-invite-user-agent-client.ts +127 -0
- package/src/core/user-agents/re-invite-user-agent-server.ts +109 -0
- package/src/core/user-agents/re-subscribe-user-agent-client.ts +78 -0
- package/src/core/user-agents/re-subscribe-user-agent-server.ts +14 -0
- package/src/core/user-agents/refer-user-agent-client.ts +15 -0
- package/src/core/user-agents/refer-user-agent-server.ts +30 -0
- package/src/core/user-agents/register-user-agent-client.ts +14 -0
- package/src/core/user-agents/register-user-agent-server.ts +14 -0
- package/src/core/user-agents/subscribe-user-agent-client.ts +341 -0
- package/src/core/user-agents/subscribe-user-agent-server.ts +14 -0
- package/src/core/user-agents/user-agent-client.ts +378 -0
- package/src/core/user-agents/user-agent-server.ts +276 -0
- package/src/grammar/grammar.ts +55 -0
- package/src/grammar/index.ts +4 -0
- package/src/grammar/name-addr-header.ts +58 -0
- package/src/grammar/parameters.ts +45 -0
- package/src/grammar/pegjs/README.md +9 -0
- package/src/grammar/pegjs/dist/grammar.ts +1557 -0
- package/src/grammar/pegjs/src/grammar.pegjs +1009 -0
- package/src/grammar/uri.ts +370 -0
- package/src/index.ts +49 -26
- package/src/lib/socket.io.esm.min.js +7 -0
- package/src/main.ts +26 -0
- package/src/new-index.ts +2478 -0
- package/src/platform/react/README.md +1 -0
- package/src/platform/web/index.ts +4 -0
- package/src/platform/web/modifiers/index.ts +5 -0
- package/src/platform/web/modifiers/modifiers.ts +180 -0
- package/src/platform/web/session-description-handler/api-extractor.json +358 -0
- package/src/platform/web/session-description-handler/index.ts +14 -0
- package/src/platform/web/session-description-handler/media-stream-factory-default.ts +22 -0
- package/src/platform/web/session-description-handler/media-stream-factory.ts +10 -0
- package/src/platform/web/session-description-handler/peer-connection-configuration-default.ts +17 -0
- package/src/platform/web/session-description-handler/peer-connection-delegate.ts +72 -0
- package/src/platform/web/session-description-handler/session-description-handler-configuration.ts +17 -0
- package/src/platform/web/session-description-handler/session-description-handler-factory-default.ts +45 -0
- package/src/platform/web/session-description-handler/session-description-handler-factory-options.ts +10 -0
- package/src/platform/web/session-description-handler/session-description-handler-factory.ts +17 -0
- package/src/platform/web/session-description-handler/session-description-handler-options.ts +56 -0
- package/src/platform/web/session-description-handler/session-description-handler.ts +938 -0
- package/src/platform/web/simple-user/api-extractor.json +358 -0
- package/src/platform/web/simple-user/index.ts +7 -0
- package/src/platform/web/simple-user/simple-user-delegate.ts +82 -0
- package/src/platform/web/simple-user/simple-user-options.ts +102 -0
- package/src/platform/web/simple-user/simple-user.ts +1099 -0
- package/src/platform/web/transport/api-extractor.json +358 -0
- package/src/platform/web/transport/index.ts +6 -0
- package/src/platform/web/transport/transport-options.ts +34 -0
- package/src/platform/web/transport/transport.ts +742 -0
- package/src/version.ts +8 -0
- package/src/webPhoneSdk.ts +67 -0
- package/src/webrtc.ts +318 -0
- package/tsconfig.json +26 -10
- /package/dist/{types/config.d.ts → config.d.ts} +0 -0
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Body,
|
|
3
|
+
OutgoingByeRequest,
|
|
4
|
+
OutgoingInfoRequest,
|
|
5
|
+
OutgoingInviteRequest,
|
|
6
|
+
OutgoingInviteRequestDelegate,
|
|
7
|
+
OutgoingMessageRequest,
|
|
8
|
+
OutgoingNotifyRequest,
|
|
9
|
+
OutgoingPrackRequest,
|
|
10
|
+
OutgoingReferRequest,
|
|
11
|
+
OutgoingRequestDelegate,
|
|
12
|
+
RequestOptions,
|
|
13
|
+
URI
|
|
14
|
+
} from "../messages";
|
|
15
|
+
import { SessionDelegate } from "./session-delegate";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Session.
|
|
19
|
+
* @remarks
|
|
20
|
+
* https://tools.ietf.org/html/rfc3261#section-13
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
export interface Session {
|
|
24
|
+
/** Session delegate. */
|
|
25
|
+
delegate: SessionDelegate | undefined;
|
|
26
|
+
/** The session id. Equal to callId + localTag + remoteTag. */
|
|
27
|
+
readonly id: string;
|
|
28
|
+
/** Call Id. */
|
|
29
|
+
readonly callId: string;
|
|
30
|
+
/** Local Tag. */
|
|
31
|
+
readonly localTag: string;
|
|
32
|
+
/** Local URI. */
|
|
33
|
+
readonly localURI: URI;
|
|
34
|
+
/** Remote Tag. */
|
|
35
|
+
readonly remoteTag: string;
|
|
36
|
+
/** Remote Target. */
|
|
37
|
+
readonly remoteTarget: URI;
|
|
38
|
+
/** Remote URI. */
|
|
39
|
+
readonly remoteURI: URI;
|
|
40
|
+
/** Session state. */
|
|
41
|
+
readonly sessionState: SessionState;
|
|
42
|
+
/** Current state of the offer/answer exchange. */
|
|
43
|
+
readonly signalingState: SignalingState;
|
|
44
|
+
/** The current answer if signalingState is stable. Otherwise undefined. */
|
|
45
|
+
readonly answer: Body | undefined;
|
|
46
|
+
/** The current offer if signalingState is not initial or closed. Otherwise undefined. */
|
|
47
|
+
readonly offer: Body | undefined;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Destroy session.
|
|
51
|
+
*/
|
|
52
|
+
dispose(): void;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Send a BYE request.
|
|
56
|
+
* Terminating a session.
|
|
57
|
+
* https://tools.ietf.org/html/rfc3261#section-15
|
|
58
|
+
* @param delegate - Request delegate.
|
|
59
|
+
* @param options - Options bucket.
|
|
60
|
+
*/
|
|
61
|
+
bye(delegate?: OutgoingRequestDelegate, options?: RequestOptions): OutgoingByeRequest;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Send an INFO request.
|
|
65
|
+
* Exchange information during a session.
|
|
66
|
+
* https://tools.ietf.org/html/rfc6086#section-4.2.1
|
|
67
|
+
* @param delegate - Request delegate.
|
|
68
|
+
* @param options - Options bucket.
|
|
69
|
+
*/
|
|
70
|
+
info(delegate?: OutgoingRequestDelegate, options?: RequestOptions): OutgoingInfoRequest;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Send re-INVITE request.
|
|
74
|
+
* Modifying a session.
|
|
75
|
+
* https://tools.ietf.org/html/rfc3261#section-14.1
|
|
76
|
+
* @param delegate - Request delegate.
|
|
77
|
+
* @param options - Options bucket.
|
|
78
|
+
*/
|
|
79
|
+
invite(delegate?: OutgoingInviteRequestDelegate, options?: RequestOptions): OutgoingInviteRequest;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Send MESSAGE request.
|
|
83
|
+
* Deliver a message during a session.
|
|
84
|
+
* https://tools.ietf.org/html/rfc3428#section-4
|
|
85
|
+
* @param delegate - Request delegate.
|
|
86
|
+
* @param options - Options bucket.
|
|
87
|
+
*/
|
|
88
|
+
message(delegate?: OutgoingRequestDelegate, options?: RequestOptions): OutgoingMessageRequest;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Send NOTIFY request.
|
|
92
|
+
* Inform referrer of transfer progress.
|
|
93
|
+
* The use of this is limited to the implicit creation of subscription by REFER (historical).
|
|
94
|
+
* Otherwise, notifiers MUST NOT create subscriptions except upon receipt of a SUBSCRIBE request.
|
|
95
|
+
* https://tools.ietf.org/html/rfc3515#section-3.7
|
|
96
|
+
* @param delegate - Request delegate.
|
|
97
|
+
* @param options - Options bucket.
|
|
98
|
+
*/
|
|
99
|
+
notify(delegate?: OutgoingRequestDelegate, options?: RequestOptions): OutgoingNotifyRequest;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Send PRACK request.
|
|
103
|
+
* Acknowledge a reliable provisional response.
|
|
104
|
+
* https://tools.ietf.org/html/rfc3262#section-4
|
|
105
|
+
* @param delegate - Request delegate.
|
|
106
|
+
* @param options - Options bucket.
|
|
107
|
+
*/
|
|
108
|
+
prack(delegate?: OutgoingRequestDelegate, options?: RequestOptions): OutgoingPrackRequest;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Send REFER request.
|
|
112
|
+
* Transfer a session.
|
|
113
|
+
* https://tools.ietf.org/html/rfc3515#section-2.4.1
|
|
114
|
+
* @param delegate - Request delegate.
|
|
115
|
+
* @param options - Options bucket.
|
|
116
|
+
*/
|
|
117
|
+
refer(delegate?: OutgoingRequestDelegate, options?: RequestOptions): OutgoingReferRequest;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Session state.
|
|
122
|
+
* @remarks
|
|
123
|
+
* https://tools.ietf.org/html/rfc3261#section-13
|
|
124
|
+
* @public
|
|
125
|
+
*/
|
|
126
|
+
export enum SessionState {
|
|
127
|
+
Initial = "Initial",
|
|
128
|
+
Early = "Early",
|
|
129
|
+
AckWait = "AckWait",
|
|
130
|
+
Confirmed = "Confirmed",
|
|
131
|
+
Terminated = "Terminated"
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Offer/Answer state.
|
|
136
|
+
* @remarks
|
|
137
|
+
* ```txt
|
|
138
|
+
* Offer Answer RFC Ini Est Early
|
|
139
|
+
* -------------------------------------------------------------------
|
|
140
|
+
* 1. INVITE Req. 2xx INVITE Resp. RFC 3261 Y Y N
|
|
141
|
+
* 2. 2xx INVITE Resp. ACK Req. RFC 3261 Y Y N
|
|
142
|
+
* 3. INVITE Req. 1xx-rel INVITE Resp. RFC 3262 Y Y N
|
|
143
|
+
* 4. 1xx-rel INVITE Resp. PRACK Req. RFC 3262 Y Y N
|
|
144
|
+
* 5. PRACK Req. 200 PRACK Resp. RFC 3262 N Y Y
|
|
145
|
+
* 6. UPDATE Req. 2xx UPDATE Resp. RFC 3311 N Y Y
|
|
146
|
+
*
|
|
147
|
+
* Table 1: Summary of SIP Usage of the Offer/Answer Model
|
|
148
|
+
* ```
|
|
149
|
+
* https://tools.ietf.org/html/rfc6337#section-2.2
|
|
150
|
+
* @public
|
|
151
|
+
*/
|
|
152
|
+
export enum SignalingState {
|
|
153
|
+
Initial = "Initial", // Initial state
|
|
154
|
+
HaveLocalOffer = "HaveLocalOffer", // Patterns 1, 3, 5, 6
|
|
155
|
+
HaveRemoteOffer = "HaveRemoteOffer", // Patterns 2, 4
|
|
156
|
+
Stable = "Stable",
|
|
157
|
+
Closed = "Closed"
|
|
158
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { IncomingNotifyRequest, OutgoingSubscribeRequest } from "../messages";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Subscription delegate.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export interface SubscriptionDelegate {
|
|
8
|
+
/**
|
|
9
|
+
* Receive NOTIFY request. This includes in dialog NOTIFY requests only.
|
|
10
|
+
* Thus the first NOTIFY (the subscription creating NOTIFY) will not be provided.
|
|
11
|
+
* https://tools.ietf.org/html/rfc6665#section-4.1.3
|
|
12
|
+
* @param request - Incoming NOTIFY request.
|
|
13
|
+
*/
|
|
14
|
+
onNotify?(request: IncomingNotifyRequest): void;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Sent a SUBSCRIBE request. This includes "auto refresh" in dialog SUBSCRIBE requests only.
|
|
18
|
+
* Thus SUBSCRIBE requests triggered by calls to `refresh()` or `subscribe()` will not be provided.
|
|
19
|
+
* Thus the first SUBSCRIBE (the subscription creating SUBSCRIBE) will not be provided.
|
|
20
|
+
* @param request - Outgoing SUBSCRIBE request.
|
|
21
|
+
*/
|
|
22
|
+
onRefresh?(request: OutgoingSubscribeRequest): void;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Subscription termination. This includes non-NOTIFY termination causes only.
|
|
26
|
+
* Thus this will not be called if a NOTIFY is the cause of termination.
|
|
27
|
+
* https://tools.ietf.org/html/rfc6665#section-4.4.1
|
|
28
|
+
*/
|
|
29
|
+
onTerminated?(): void;
|
|
30
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { OutgoingSubscribeRequest, OutgoingSubscribeRequestDelegate, RequestOptions } from "../messages";
|
|
2
|
+
import { SubscriptionDelegate } from "./subscription-delegate";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Subscription.
|
|
6
|
+
* @remarks
|
|
7
|
+
* https://tools.ietf.org/html/rfc6665
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
export interface Subscription {
|
|
11
|
+
/** Subscription delegate. */
|
|
12
|
+
delegate: SubscriptionDelegate | undefined;
|
|
13
|
+
/** The subscription id. */
|
|
14
|
+
readonly id: string;
|
|
15
|
+
/** Subscription expires. Number of seconds until the subscription expires. */
|
|
16
|
+
readonly subscriptionExpires: number;
|
|
17
|
+
/** Subscription state. */
|
|
18
|
+
readonly subscriptionState: SubscriptionState;
|
|
19
|
+
/** If true, refresh subscription prior to expiration. Default is false. */
|
|
20
|
+
autoRefresh: boolean;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Destroy subscription.
|
|
24
|
+
*/
|
|
25
|
+
dispose(): void;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Send re-SUBSCRIBE request.
|
|
29
|
+
* Refreshing a subscription and unsubscribing.
|
|
30
|
+
* https://tools.ietf.org/html/rfc6665#section-4.1.2.2
|
|
31
|
+
* @param delegate - Request delegate.
|
|
32
|
+
* @param options - Options bucket
|
|
33
|
+
*/
|
|
34
|
+
subscribe(delegate?: OutgoingSubscribeRequestDelegate, options?: RequestOptions): OutgoingSubscribeRequest;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* 4.1.2.2. Refreshing of Subscriptions
|
|
38
|
+
* https://tools.ietf.org/html/rfc6665#section-4.1.2.2
|
|
39
|
+
*/
|
|
40
|
+
refresh(): OutgoingSubscribeRequest;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* 4.1.2.3. Unsubscribing
|
|
44
|
+
* https://tools.ietf.org/html/rfc6665#section-4.1.2.3
|
|
45
|
+
*/
|
|
46
|
+
unsubscribe(): OutgoingSubscribeRequest;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Subscription state.
|
|
51
|
+
* @remarks
|
|
52
|
+
* https://tools.ietf.org/html/rfc6665#section-4.1.2
|
|
53
|
+
* @public
|
|
54
|
+
*/
|
|
55
|
+
export enum SubscriptionState {
|
|
56
|
+
Initial = "Initial",
|
|
57
|
+
NotifyWait = "NotifyWait",
|
|
58
|
+
Pending = "Pending",
|
|
59
|
+
Active = "Active",
|
|
60
|
+
Terminated = "Terminated"
|
|
61
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const T1 = 500;
|
|
2
|
+
const T2 = 4000;
|
|
3
|
+
const T4 = 5000;
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Timers.
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export const Timers = {
|
|
10
|
+
T1,
|
|
11
|
+
T2,
|
|
12
|
+
T4,
|
|
13
|
+
TIMER_B: 64 * T1,
|
|
14
|
+
TIMER_D: 0 * T1, // Not correct for unreliable transports
|
|
15
|
+
TIMER_F: 64 * T1,
|
|
16
|
+
TIMER_H: 64 * T1,
|
|
17
|
+
TIMER_I: 0 * T4, // Not correct for unreliable transports
|
|
18
|
+
TIMER_J: 0 * T1, // Not correct for unreliable transports
|
|
19
|
+
TIMER_K: 0 * T4, // Not correct for unreliable transports
|
|
20
|
+
TIMER_L: 64 * T1,
|
|
21
|
+
TIMER_M: 64 * T1,
|
|
22
|
+
TIMER_N: 64 * T1,
|
|
23
|
+
PROVISIONAL_RESPONSE_INTERVAL: 60000 // See RFC 3261 Section 13.3.1.1
|
|
24
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { IncomingResponseMessage, OutgoingRequestMessage } from "../messages";
|
|
2
|
+
import { Transport } from "../transport";
|
|
3
|
+
import { Transaction } from "./transaction";
|
|
4
|
+
import { TransactionState } from "./transaction-state";
|
|
5
|
+
import { ClientTransactionUser } from "./transaction-user";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Client Transaction.
|
|
9
|
+
* @remarks
|
|
10
|
+
* The client transaction provides its functionality through the
|
|
11
|
+
* maintenance of a state machine.
|
|
12
|
+
*
|
|
13
|
+
* The TU communicates with the client transaction through a simple
|
|
14
|
+
* interface. When the TU wishes to initiate a new transaction, it
|
|
15
|
+
* creates a client transaction and passes it the SIP request to send
|
|
16
|
+
* and an IP address, port, and transport to which to send it. The
|
|
17
|
+
* client transaction begins execution of its state machine. Valid
|
|
18
|
+
* responses are passed up to the TU from the client transaction.
|
|
19
|
+
* https://tools.ietf.org/html/rfc3261#section-17.1
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
export abstract class ClientTransaction extends Transaction {
|
|
23
|
+
protected constructor(
|
|
24
|
+
private _request: OutgoingRequestMessage,
|
|
25
|
+
transport: Transport,
|
|
26
|
+
protected user: ClientTransactionUser,
|
|
27
|
+
state: TransactionState,
|
|
28
|
+
loggerCategory: string
|
|
29
|
+
) {
|
|
30
|
+
super(transport, user, ClientTransaction.makeId(_request), state, loggerCategory);
|
|
31
|
+
// The Via header field indicates the transport used for the transaction
|
|
32
|
+
// and identifies the location where the response is to be sent. A Via
|
|
33
|
+
// header field value is added only after the transport that will be
|
|
34
|
+
// used to reach the next hop has been selected (which may involve the
|
|
35
|
+
// usage of the procedures in [4]).
|
|
36
|
+
// https://tools.ietf.org/html/rfc3261#section-8.1.1.7
|
|
37
|
+
_request.setViaHeader(this.id, transport.protocol);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
private static makeId(request: OutgoingRequestMessage): string {
|
|
41
|
+
if (request.method === "CANCEL") {
|
|
42
|
+
if (!request.branch) {
|
|
43
|
+
throw new Error("Outgoing CANCEL request without a branch.");
|
|
44
|
+
}
|
|
45
|
+
return request.branch;
|
|
46
|
+
} else {
|
|
47
|
+
return "z9hG4bK" + Math.floor(Math.random() * 10000000);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** The outgoing request the transaction handling. */
|
|
52
|
+
get request(): OutgoingRequestMessage {
|
|
53
|
+
return this._request;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* A 408 to non-INVITE will always arrive too late to be useful ([3]),
|
|
58
|
+
* The client already has full knowledge of the timeout. The only
|
|
59
|
+
* information this message would convey is whether or not the server
|
|
60
|
+
* believed the transaction timed out. However, with the current design
|
|
61
|
+
* of the NIT, a client cannot do anything with this knowledge. Thus,
|
|
62
|
+
* the 408 is simply wasting network resources and contributes to the
|
|
63
|
+
* response bombardment illustrated in [3].
|
|
64
|
+
* https://tools.ietf.org/html/rfc4320#section-4.1
|
|
65
|
+
*/
|
|
66
|
+
protected onRequestTimeout(): void {
|
|
67
|
+
if (this.user.onRequestTimeout) {
|
|
68
|
+
this.user.onRequestTimeout();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Receive incoming responses from the transport which match this transaction.
|
|
74
|
+
* Responses will be delivered to the transaction user as necessary.
|
|
75
|
+
* @param response - The incoming response.
|
|
76
|
+
*/
|
|
77
|
+
public abstract receiveResponse(response: IncomingResponseMessage): void;
|
|
78
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "./client-transaction";
|
|
2
|
+
export * from "./invite-client-transaction";
|
|
3
|
+
export * from "./invite-server-transaction";
|
|
4
|
+
export * from "./non-invite-client-transaction";
|
|
5
|
+
export * from "./non-invite-server-transaction";
|
|
6
|
+
export * from "./invite-client-transaction";
|
|
7
|
+
export * from "./server-transaction";
|
|
8
|
+
export * from "./transaction-state";
|
|
9
|
+
export * from "./transaction-user";
|
|
10
|
+
export * from "./transaction";
|