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,35 @@
|
|
|
1
|
+
import { IncomingRequestMessage } from "../messages";
|
|
2
|
+
import { Transport } from "../transport";
|
|
3
|
+
import { Transaction } from "./transaction";
|
|
4
|
+
import { TransactionState } from "./transaction-state";
|
|
5
|
+
import { ServerTransactionUser } from "./transaction-user";
|
|
6
|
+
/**
|
|
7
|
+
* Server Transaction.
|
|
8
|
+
* @remarks
|
|
9
|
+
* The server transaction is responsible for the delivery of requests to
|
|
10
|
+
* the TU and the reliable transmission of responses. It accomplishes
|
|
11
|
+
* this through a state machine. Server transactions are created by the
|
|
12
|
+
* core when a request is received, and transaction handling is desired
|
|
13
|
+
* for that request (this is not always the case).
|
|
14
|
+
* https://tools.ietf.org/html/rfc3261#section-17.2
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
export declare abstract class ServerTransaction extends Transaction {
|
|
18
|
+
private _request;
|
|
19
|
+
protected user: ServerTransactionUser;
|
|
20
|
+
protected constructor(_request: IncomingRequestMessage, transport: Transport, user: ServerTransactionUser, state: TransactionState, loggerCategory: string);
|
|
21
|
+
/** The incoming request the transaction handling. */
|
|
22
|
+
get request(): IncomingRequestMessage;
|
|
23
|
+
/**
|
|
24
|
+
* Receive incoming requests from the transport which match this transaction.
|
|
25
|
+
* @param request - The incoming request.
|
|
26
|
+
*/
|
|
27
|
+
abstract receiveRequest(request: IncomingRequestMessage): void;
|
|
28
|
+
/**
|
|
29
|
+
* Receive outgoing responses to this request from the transaction user.
|
|
30
|
+
* Responses will be delivered to the transport as necessary.
|
|
31
|
+
* @param statusCode - Response status code.
|
|
32
|
+
* @param response - Response.
|
|
33
|
+
*/
|
|
34
|
+
abstract receiveResponse(statusCode: number, response: string): void;
|
|
35
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transaction state.
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
export declare enum TransactionState {
|
|
6
|
+
Accepted = "Accepted",
|
|
7
|
+
Calling = "Calling",
|
|
8
|
+
Completed = "Completed",
|
|
9
|
+
Confirmed = "Confirmed",
|
|
10
|
+
Proceeding = "Proceeding",
|
|
11
|
+
Terminated = "Terminated",
|
|
12
|
+
Trying = "Trying"
|
|
13
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { TransportError } from "../exceptions";
|
|
2
|
+
import { LoggerFactory } from "../log";
|
|
3
|
+
import { IncomingResponseMessage } from "../messages";
|
|
4
|
+
import { TransactionState } from "./transaction-state";
|
|
5
|
+
/**
|
|
6
|
+
* Transaction User (TU).
|
|
7
|
+
* @remarks
|
|
8
|
+
* The layer of protocol processing that resides above the transaction layer.
|
|
9
|
+
* Transaction users include the UAC core, UAS core, and proxy core.
|
|
10
|
+
* https://tools.ietf.org/html/rfc3261#section-5
|
|
11
|
+
* https://tools.ietf.org/html/rfc3261#section-6
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
export interface TransactionUser {
|
|
15
|
+
/**
|
|
16
|
+
* Logger factory.
|
|
17
|
+
*/
|
|
18
|
+
loggerFactory: LoggerFactory;
|
|
19
|
+
/**
|
|
20
|
+
* Callback for notification of transaction state changes.
|
|
21
|
+
*
|
|
22
|
+
* Not called when transaction is constructed, so there is
|
|
23
|
+
* no notification of entering the initial transaction state.
|
|
24
|
+
* Otherwise, called once for each transaction state change.
|
|
25
|
+
* State changes adhere to the following RFCs.
|
|
26
|
+
* https://tools.ietf.org/html/rfc3261#section-17
|
|
27
|
+
* https://tools.ietf.org/html/rfc6026
|
|
28
|
+
*/
|
|
29
|
+
onStateChange?: (newState: TransactionState) => void;
|
|
30
|
+
/**
|
|
31
|
+
* Callback for notification of a transport error.
|
|
32
|
+
*
|
|
33
|
+
* If a fatal transport error is reported by the transport layer
|
|
34
|
+
* (generally, due to fatal ICMP errors in UDP or connection failures in
|
|
35
|
+
* TCP), the condition MUST be treated as a 503 (Service Unavailable)
|
|
36
|
+
* status code.
|
|
37
|
+
* https://tools.ietf.org/html/rfc3261#section-8.1.3.1
|
|
38
|
+
* https://tools.ietf.org/html/rfc3261#section-17.1.4
|
|
39
|
+
* https://tools.ietf.org/html/rfc3261#section-17.2.4
|
|
40
|
+
* https://tools.ietf.org/html/rfc6026
|
|
41
|
+
*/
|
|
42
|
+
onTransportError?: (error: TransportError) => void;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* UAC Core Transaction User.
|
|
46
|
+
* @public
|
|
47
|
+
*/
|
|
48
|
+
export interface ClientTransactionUser extends TransactionUser {
|
|
49
|
+
/**
|
|
50
|
+
* Callback for request timeout error.
|
|
51
|
+
*
|
|
52
|
+
* When a timeout error is received from the transaction layer, it MUST be
|
|
53
|
+
* treated as if a 408 (Request Timeout) status code has been received.
|
|
54
|
+
* https://tools.ietf.org/html/rfc3261#section-8.1.3.1
|
|
55
|
+
* TU MUST be informed of a timeout.
|
|
56
|
+
* https://tools.ietf.org/html/rfc3261#section-17.1.2.2
|
|
57
|
+
*/
|
|
58
|
+
onRequestTimeout?: () => void;
|
|
59
|
+
/**
|
|
60
|
+
* Callback for delegation of valid response handling.
|
|
61
|
+
*
|
|
62
|
+
* Valid responses are passed up to the TU from the client transaction.
|
|
63
|
+
* https://tools.ietf.org/html/rfc3261#section-17.1
|
|
64
|
+
*/
|
|
65
|
+
receiveResponse?: (response: IncomingResponseMessage) => void;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* UAS Core Transaction User.
|
|
69
|
+
* @public
|
|
70
|
+
*/
|
|
71
|
+
export interface ServerTransactionUser extends TransactionUser {
|
|
72
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { TransportError } from "../exceptions";
|
|
2
|
+
import { Logger } from "../log";
|
|
3
|
+
import { Transport } from "../transport";
|
|
4
|
+
import { TransactionState } from "./transaction-state";
|
|
5
|
+
import { TransactionUser } from "./transaction-user";
|
|
6
|
+
/**
|
|
7
|
+
* Transaction.
|
|
8
|
+
* @remarks
|
|
9
|
+
* SIP is a transactional protocol: interactions between components take
|
|
10
|
+
* place in a series of independent message exchanges. Specifically, a
|
|
11
|
+
* SIP transaction consists of a single request and any responses to
|
|
12
|
+
* that request, which include zero or more provisional responses and
|
|
13
|
+
* one or more final responses. In the case of a transaction where the
|
|
14
|
+
* request was an INVITE (known as an INVITE transaction), the
|
|
15
|
+
* transaction also includes the ACK only if the final response was not
|
|
16
|
+
* a 2xx response. If the response was a 2xx, the ACK is not considered
|
|
17
|
+
* part of the transaction.
|
|
18
|
+
* https://tools.ietf.org/html/rfc3261#section-17
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
export declare abstract class Transaction {
|
|
22
|
+
private _transport;
|
|
23
|
+
private _user;
|
|
24
|
+
private _id;
|
|
25
|
+
private _state;
|
|
26
|
+
protected logger: Logger;
|
|
27
|
+
private listeners;
|
|
28
|
+
protected constructor(_transport: Transport, _user: TransactionUser, _id: string, _state: TransactionState, loggerCategory: string);
|
|
29
|
+
/**
|
|
30
|
+
* Destructor.
|
|
31
|
+
* Once the transaction is in the "terminated" state, it is destroyed
|
|
32
|
+
* immediately and there is no need to call `dispose`. However, if a
|
|
33
|
+
* transaction needs to be ended prematurely, the transaction user may
|
|
34
|
+
* do so by calling this method (for example, perhaps the UA is shutting down).
|
|
35
|
+
* No state transition will occur upon calling this method, all outstanding
|
|
36
|
+
* transmission timers will be cancelled, and use of the transaction after
|
|
37
|
+
* calling `dispose` is undefined.
|
|
38
|
+
*/
|
|
39
|
+
dispose(): void;
|
|
40
|
+
/** Transaction id. */
|
|
41
|
+
get id(): string;
|
|
42
|
+
/** Transaction kind. Deprecated. */
|
|
43
|
+
get kind(): string;
|
|
44
|
+
/** Transaction state. */
|
|
45
|
+
get state(): TransactionState;
|
|
46
|
+
/** Transaction transport. */
|
|
47
|
+
get transport(): Transport;
|
|
48
|
+
/**
|
|
49
|
+
* Sets up a function that will be called whenever the transaction state changes.
|
|
50
|
+
* @param listener - Callback function.
|
|
51
|
+
* @param options - An options object that specifies characteristics about the listener.
|
|
52
|
+
* If once true, indicates that the listener should be invoked at most once after being added.
|
|
53
|
+
* If once true, the listener would be automatically removed when invoked.
|
|
54
|
+
*/
|
|
55
|
+
addStateChangeListener(listener: () => void, options?: {
|
|
56
|
+
once?: boolean;
|
|
57
|
+
}): void;
|
|
58
|
+
/**
|
|
59
|
+
* This is currently public so tests may spy on it.
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
62
|
+
notifyStateChangeListeners(): void;
|
|
63
|
+
/**
|
|
64
|
+
* Removes a listener previously registered with addStateListener.
|
|
65
|
+
* @param listener - Callback function.
|
|
66
|
+
*/
|
|
67
|
+
removeStateChangeListener(listener: () => void): void;
|
|
68
|
+
protected logTransportError(error: TransportError, message: string): void;
|
|
69
|
+
/**
|
|
70
|
+
* Pass message to transport for transmission. If transport fails,
|
|
71
|
+
* the transaction user is notified by callback to onTransportError().
|
|
72
|
+
* @returns
|
|
73
|
+
* Rejects with `TransportError` if transport fails.
|
|
74
|
+
*/
|
|
75
|
+
protected send(message: string): Promise<void>;
|
|
76
|
+
protected setState(state: TransactionState): void;
|
|
77
|
+
protected typeToString(): string;
|
|
78
|
+
protected abstract onTransportError(error: TransportError): void;
|
|
79
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transport layer interface expected by the user agent core.
|
|
3
|
+
*
|
|
4
|
+
* @remarks
|
|
5
|
+
* The transport layer is responsible for the actual transmission of
|
|
6
|
+
* requests and responses over network transports. This includes
|
|
7
|
+
* determination of the connection to use for a request or response in
|
|
8
|
+
* the case of connection-oriented transports.
|
|
9
|
+
* https://tools.ietf.org/html/rfc3261#section-18
|
|
10
|
+
*
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
export interface Transport {
|
|
14
|
+
/**
|
|
15
|
+
* The transport protocol.
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* Formatted as defined for the Via header sent-protocol transport.
|
|
19
|
+
* https://tools.ietf.org/html/rfc3261#section-20.42
|
|
20
|
+
*/
|
|
21
|
+
readonly protocol: string;
|
|
22
|
+
/**
|
|
23
|
+
* Send a message.
|
|
24
|
+
*
|
|
25
|
+
* @remarks
|
|
26
|
+
* Resolves once message is sent. Otherwise rejects with an Error.
|
|
27
|
+
*
|
|
28
|
+
* @param message - Message to send.
|
|
29
|
+
*/
|
|
30
|
+
send(message: string): Promise<void>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { LoggerFactory } from "../log";
|
|
2
|
+
import { DigestAuthentication, URI } from "../messages";
|
|
3
|
+
import { Transport } from "../transport";
|
|
4
|
+
/**
|
|
5
|
+
* Contact.
|
|
6
|
+
* @remarks
|
|
7
|
+
* https://tools.ietf.org/html/rfc3261#section-8.1.1.8
|
|
8
|
+
* This is ported from UA.contact.
|
|
9
|
+
* FIXME: TODO: This is not a great rep for Contact
|
|
10
|
+
* and is used in a kinda hacky way herein.
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
export interface Contact {
|
|
14
|
+
pubGruu: URI | undefined;
|
|
15
|
+
tempGruu: URI | undefined;
|
|
16
|
+
uri: URI;
|
|
17
|
+
toString: (options?: {
|
|
18
|
+
anonymous?: boolean;
|
|
19
|
+
outbound?: boolean;
|
|
20
|
+
}) => string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* User Agent Core configuration.
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
export interface UserAgentCoreConfiguration {
|
|
27
|
+
/**
|
|
28
|
+
* Address-of-Record (AOR).
|
|
29
|
+
* @remarks
|
|
30
|
+
* https://tools.ietf.org/html/rfc3261#section-6
|
|
31
|
+
*/
|
|
32
|
+
aor: URI;
|
|
33
|
+
/**
|
|
34
|
+
* Contact.
|
|
35
|
+
* @remarks
|
|
36
|
+
* https://tools.ietf.org/html/rfc3261#section-8.1.1.8
|
|
37
|
+
*/
|
|
38
|
+
contact: Contact;
|
|
39
|
+
/**
|
|
40
|
+
* From header display name.
|
|
41
|
+
*/
|
|
42
|
+
displayName: string;
|
|
43
|
+
/**
|
|
44
|
+
* Logger factory.
|
|
45
|
+
*/
|
|
46
|
+
loggerFactory: LoggerFactory;
|
|
47
|
+
/**
|
|
48
|
+
* Force Via header field transport to TCP.
|
|
49
|
+
*/
|
|
50
|
+
hackViaTcp: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Preloaded route set.
|
|
53
|
+
*/
|
|
54
|
+
routeSet: Array<string>;
|
|
55
|
+
/**
|
|
56
|
+
* Unique instance id.
|
|
57
|
+
*/
|
|
58
|
+
sipjsId: string;
|
|
59
|
+
/**
|
|
60
|
+
* Option tags of supported SIP extensions.
|
|
61
|
+
*/
|
|
62
|
+
supportedOptionTags: Array<string>;
|
|
63
|
+
/**
|
|
64
|
+
* Option tags of supported SIP extensions.
|
|
65
|
+
* Used in responses.
|
|
66
|
+
* @remarks
|
|
67
|
+
* FIXME: Make this go away.
|
|
68
|
+
*/
|
|
69
|
+
supportedOptionTagsResponse: Array<string>;
|
|
70
|
+
/**
|
|
71
|
+
* User-Agent header field value.
|
|
72
|
+
* @remarks
|
|
73
|
+
* https://tools.ietf.org/html/rfc3261#section-20.41
|
|
74
|
+
*/
|
|
75
|
+
userAgentHeaderFieldValue: string | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* Force use of "rport" Via header field parameter.
|
|
78
|
+
* @remarks
|
|
79
|
+
* https://www.ietf.org/rfc/rfc3581.txt
|
|
80
|
+
*/
|
|
81
|
+
viaForceRport: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Via header field host name or network address.
|
|
84
|
+
* @remarks
|
|
85
|
+
* The Via header field indicates the path taken by the request so far
|
|
86
|
+
* and indicates the path that should be followed in routing responses.
|
|
87
|
+
*/
|
|
88
|
+
viaHost: string;
|
|
89
|
+
/**
|
|
90
|
+
* DEPRECATED
|
|
91
|
+
* Authentication factory function.
|
|
92
|
+
*/
|
|
93
|
+
authenticationFactory(): DigestAuthentication | undefined;
|
|
94
|
+
/**
|
|
95
|
+
* DEPRECATED: This is a hack to get around `Transport`
|
|
96
|
+
* requiring the `UA` to start for construction.
|
|
97
|
+
*/
|
|
98
|
+
transportAccessor(): Transport | undefined;
|
|
99
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { IncomingInviteRequest, IncomingMessageRequest, IncomingNotifyRequest, IncomingReferRequest, IncomingRegisterRequest, IncomingSubscribeRequest } from "../messages";
|
|
2
|
+
/**
|
|
3
|
+
* User Agent Core delegate.
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export interface UserAgentCoreDelegate {
|
|
7
|
+
/**
|
|
8
|
+
* Receive INVITE request.
|
|
9
|
+
* @param request - Incoming INVITE request.
|
|
10
|
+
*/
|
|
11
|
+
onInvite?(request: IncomingInviteRequest): void;
|
|
12
|
+
/**
|
|
13
|
+
* Receive MESSAGE request.
|
|
14
|
+
* @param request - Incoming MESSAGE request.
|
|
15
|
+
*/
|
|
16
|
+
onMessage?(request: IncomingMessageRequest): void;
|
|
17
|
+
/**
|
|
18
|
+
* DEPRECATED. Receive NOTIFY request.
|
|
19
|
+
* @param message - Incoming NOTIFY request.
|
|
20
|
+
*/
|
|
21
|
+
onNotify?(request: IncomingNotifyRequest): void;
|
|
22
|
+
/**
|
|
23
|
+
* Receive REFER request.
|
|
24
|
+
* @param request - Incoming REFER request.
|
|
25
|
+
*/
|
|
26
|
+
onRefer?(request: IncomingReferRequest): void;
|
|
27
|
+
/**
|
|
28
|
+
* Receive REGISTER request.
|
|
29
|
+
* @param request - Incoming REGISTER request.
|
|
30
|
+
*/
|
|
31
|
+
onRegister?(request: IncomingRegisterRequest): void;
|
|
32
|
+
/**
|
|
33
|
+
* Receive SUBSCRIBE request.
|
|
34
|
+
* @param request - Incoming SUBSCRIBE request.
|
|
35
|
+
*/
|
|
36
|
+
onSubscribe?(request: IncomingSubscribeRequest): void;
|
|
37
|
+
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { Dialog } from "../dialogs";
|
|
2
|
+
import { LoggerFactory } from "../log";
|
|
3
|
+
import { Body, IncomingRequestMessage, IncomingResponseMessage, OutgoingInviteRequest, OutgoingInviteRequestDelegate, OutgoingMessageRequest, OutgoingPublishRequest, OutgoingRegisterRequest, OutgoingRequest, OutgoingRequestDelegate, OutgoingRequestMessage, OutgoingRequestMessageOptions, OutgoingResponse, OutgoingSubscribeRequest, OutgoingSubscribeRequestDelegate, ResponseOptions, URI } from "../messages";
|
|
4
|
+
import { Transport } from "../transport";
|
|
5
|
+
import { SubscribeUserAgentClient, UserAgentClient, UserAgentServer } from "../user-agents";
|
|
6
|
+
import { UserAgentCoreConfiguration } from "./user-agent-core-configuration";
|
|
7
|
+
import { UserAgentCoreDelegate } from "./user-agent-core-delegate";
|
|
8
|
+
/**
|
|
9
|
+
* User Agent Core.
|
|
10
|
+
* @remarks
|
|
11
|
+
* Core designates the functions specific to a particular type
|
|
12
|
+
* of SIP entity, i.e., specific to either a stateful or stateless
|
|
13
|
+
* proxy, a user agent or registrar. All cores, except those for
|
|
14
|
+
* the stateless proxy, are transaction users.
|
|
15
|
+
* https://tools.ietf.org/html/rfc3261#section-6
|
|
16
|
+
*
|
|
17
|
+
* UAC Core: The set of processing functions required of a UAC that
|
|
18
|
+
* reside above the transaction and transport layers.
|
|
19
|
+
* https://tools.ietf.org/html/rfc3261#section-6
|
|
20
|
+
*
|
|
21
|
+
* UAS Core: The set of processing functions required at a UAS that
|
|
22
|
+
* resides above the transaction and transport layers.
|
|
23
|
+
* https://tools.ietf.org/html/rfc3261#section-6
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
export declare class UserAgentCore {
|
|
27
|
+
/** Configuration. */
|
|
28
|
+
configuration: UserAgentCoreConfiguration;
|
|
29
|
+
/** Delegate. */
|
|
30
|
+
delegate: UserAgentCoreDelegate;
|
|
31
|
+
/** Dialogs. */
|
|
32
|
+
dialogs: Map<string, Dialog>;
|
|
33
|
+
/** Subscribers. */
|
|
34
|
+
subscribers: Map<string, SubscribeUserAgentClient>;
|
|
35
|
+
/** UACs. */
|
|
36
|
+
userAgentClients: Map<string, UserAgentClient>;
|
|
37
|
+
/** UASs. */
|
|
38
|
+
userAgentServers: Map<string, UserAgentServer>;
|
|
39
|
+
private logger;
|
|
40
|
+
/**
|
|
41
|
+
* Constructor.
|
|
42
|
+
* @param configuration - Configuration.
|
|
43
|
+
* @param delegate - Delegate.
|
|
44
|
+
*/
|
|
45
|
+
constructor(configuration: UserAgentCoreConfiguration, delegate?: UserAgentCoreDelegate);
|
|
46
|
+
/** Destructor. */
|
|
47
|
+
dispose(): void;
|
|
48
|
+
/** Reset. */
|
|
49
|
+
reset(): void;
|
|
50
|
+
/** Logger factory. */
|
|
51
|
+
get loggerFactory(): LoggerFactory;
|
|
52
|
+
/** Transport. */
|
|
53
|
+
get transport(): Transport;
|
|
54
|
+
/**
|
|
55
|
+
* Send INVITE.
|
|
56
|
+
* @param request - Outgoing request.
|
|
57
|
+
* @param delegate - Request delegate.
|
|
58
|
+
*/
|
|
59
|
+
invite(request: OutgoingRequestMessage, delegate?: OutgoingInviteRequestDelegate): OutgoingInviteRequest;
|
|
60
|
+
/**
|
|
61
|
+
* Send MESSAGE.
|
|
62
|
+
* @param request - Outgoing request.
|
|
63
|
+
* @param delegate - Request delegate.
|
|
64
|
+
*/
|
|
65
|
+
message(request: OutgoingRequestMessage, delegate?: OutgoingRequestDelegate): OutgoingMessageRequest;
|
|
66
|
+
/**
|
|
67
|
+
* Send PUBLISH.
|
|
68
|
+
* @param request - Outgoing request.
|
|
69
|
+
* @param delegate - Request delegate.
|
|
70
|
+
*/
|
|
71
|
+
publish(request: OutgoingRequestMessage, delegate?: OutgoingRequestDelegate): OutgoingPublishRequest;
|
|
72
|
+
/**
|
|
73
|
+
* Send REGISTER.
|
|
74
|
+
* @param request - Outgoing request.
|
|
75
|
+
* @param delegate - Request delegate.
|
|
76
|
+
*/
|
|
77
|
+
register(request: OutgoingRequestMessage, delegate?: OutgoingRequestDelegate): OutgoingRegisterRequest;
|
|
78
|
+
/**
|
|
79
|
+
* Send SUBSCRIBE.
|
|
80
|
+
* @param request - Outgoing request.
|
|
81
|
+
* @param delegate - Request delegate.
|
|
82
|
+
*/
|
|
83
|
+
subscribe(request: OutgoingRequestMessage, delegate?: OutgoingSubscribeRequestDelegate): OutgoingSubscribeRequest;
|
|
84
|
+
/**
|
|
85
|
+
* Send a request.
|
|
86
|
+
* @param request - Outgoing request.
|
|
87
|
+
* @param delegate - Request delegate.
|
|
88
|
+
*/
|
|
89
|
+
request(request: OutgoingRequestMessage, delegate?: OutgoingRequestDelegate): OutgoingRequest;
|
|
90
|
+
/**
|
|
91
|
+
* Outgoing request message factory function.
|
|
92
|
+
* @param method - Method.
|
|
93
|
+
* @param requestURI - Request-URI.
|
|
94
|
+
* @param fromURI - From URI.
|
|
95
|
+
* @param toURI - To URI.
|
|
96
|
+
* @param options - Request options.
|
|
97
|
+
* @param extraHeaders - Extra headers to add.
|
|
98
|
+
* @param body - Message body.
|
|
99
|
+
*/
|
|
100
|
+
makeOutgoingRequestMessage(method: string, requestURI: URI, fromURI: URI, toURI: URI, options: OutgoingRequestMessageOptions, extraHeaders?: Array<string>, body?: Body): OutgoingRequestMessage;
|
|
101
|
+
/**
|
|
102
|
+
* Handle an incoming request message from the transport.
|
|
103
|
+
* @param message - Incoming request message from transport layer.
|
|
104
|
+
*/
|
|
105
|
+
receiveIncomingRequestFromTransport(message: IncomingRequestMessage): void;
|
|
106
|
+
/**
|
|
107
|
+
* Handle an incoming response message from the transport.
|
|
108
|
+
* @param message - Incoming response message from transport layer.
|
|
109
|
+
*/
|
|
110
|
+
receiveIncomingResponseFromTransport(message: IncomingResponseMessage): void;
|
|
111
|
+
/**
|
|
112
|
+
* A stateless UAS is a UAS that does not maintain transaction state.
|
|
113
|
+
* It replies to requests normally, but discards any state that would
|
|
114
|
+
* ordinarily be retained by a UAS after a response has been sent. If a
|
|
115
|
+
* stateless UAS receives a retransmission of a request, it regenerates
|
|
116
|
+
* the response and re-sends it, just as if it were replying to the first
|
|
117
|
+
* instance of the request. A UAS cannot be stateless unless the request
|
|
118
|
+
* processing for that method would always result in the same response
|
|
119
|
+
* if the requests are identical. This rules out stateless registrars,
|
|
120
|
+
* for example. Stateless UASs do not use a transaction layer; they
|
|
121
|
+
* receive requests directly from the transport layer and send responses
|
|
122
|
+
* directly to the transport layer.
|
|
123
|
+
* https://tools.ietf.org/html/rfc3261#section-8.2.7
|
|
124
|
+
* @param message - Incoming request message to reply to.
|
|
125
|
+
* @param statusCode - Status code to reply with.
|
|
126
|
+
*/
|
|
127
|
+
replyStateless(message: IncomingRequestMessage, options: ResponseOptions): OutgoingResponse;
|
|
128
|
+
/**
|
|
129
|
+
* In Section 18.2.1, replace the last paragraph with:
|
|
130
|
+
*
|
|
131
|
+
* Next, the server transport attempts to match the request to a
|
|
132
|
+
* server transaction. It does so using the matching rules described
|
|
133
|
+
* in Section 17.2.3. If a matching server transaction is found, the
|
|
134
|
+
* request is passed to that transaction for processing. If no match
|
|
135
|
+
* is found, the request is passed to the core, which may decide to
|
|
136
|
+
* construct a new server transaction for that request.
|
|
137
|
+
* https://tools.ietf.org/html/rfc6026#section-8.10
|
|
138
|
+
* @param message - Incoming request message from transport layer.
|
|
139
|
+
*/
|
|
140
|
+
private receiveRequestFromTransport;
|
|
141
|
+
/**
|
|
142
|
+
* UAC and UAS procedures depend strongly on two factors. First, based
|
|
143
|
+
* on whether the request or response is inside or outside of a dialog,
|
|
144
|
+
* and second, based on the method of a request. Dialogs are discussed
|
|
145
|
+
* thoroughly in Section 12; they represent a peer-to-peer relationship
|
|
146
|
+
* between user agents and are established by specific SIP methods, such
|
|
147
|
+
* as INVITE.
|
|
148
|
+
* @param message - Incoming request message.
|
|
149
|
+
*/
|
|
150
|
+
private receiveRequest;
|
|
151
|
+
/**
|
|
152
|
+
* Once a dialog has been established between two UAs, either of them
|
|
153
|
+
* MAY initiate new transactions as needed within the dialog. The UA
|
|
154
|
+
* sending the request will take the UAC role for the transaction. The
|
|
155
|
+
* UA receiving the request will take the UAS role. Note that these may
|
|
156
|
+
* be different roles than the UAs held during the transaction that
|
|
157
|
+
* established the dialog.
|
|
158
|
+
* https://tools.ietf.org/html/rfc3261#section-12.2
|
|
159
|
+
* @param message - Incoming request message.
|
|
160
|
+
*/
|
|
161
|
+
private receiveInsideDialogRequest;
|
|
162
|
+
/**
|
|
163
|
+
* Assuming all of the checks in the previous subsections are passed,
|
|
164
|
+
* the UAS processing becomes method-specific.
|
|
165
|
+
* https://tools.ietf.org/html/rfc3261#section-8.2.5
|
|
166
|
+
* @param message - Incoming request message.
|
|
167
|
+
*/
|
|
168
|
+
private receiveOutsideDialogRequest;
|
|
169
|
+
/**
|
|
170
|
+
* Responses are first processed by the transport layer and then passed
|
|
171
|
+
* up to the transaction layer. The transaction layer performs its
|
|
172
|
+
* processing and then passes the response up to the TU. The majority
|
|
173
|
+
* of response processing in the TU is method specific. However, there
|
|
174
|
+
* are some general behaviors independent of the method.
|
|
175
|
+
* https://tools.ietf.org/html/rfc3261#section-8.1.3
|
|
176
|
+
* @param message - Incoming response message from transport layer.
|
|
177
|
+
*/
|
|
178
|
+
private receiveResponseFromTransport;
|
|
179
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SessionDialog } from "../dialogs";
|
|
2
|
+
import { OutgoingByeRequest, OutgoingRequestDelegate, RequestOptions } from "../messages";
|
|
3
|
+
import { UserAgentClient } from "./user-agent-client";
|
|
4
|
+
/**
|
|
5
|
+
* BYE UAC.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare class ByeUserAgentClient extends UserAgentClient implements OutgoingByeRequest {
|
|
9
|
+
constructor(dialog: SessionDialog, delegate?: OutgoingRequestDelegate, options?: RequestOptions);
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SessionDialog } from "../dialogs";
|
|
2
|
+
import { IncomingByeRequest, IncomingRequestDelegate, IncomingRequestMessage } from "../messages";
|
|
3
|
+
import { UserAgentServer } from "./user-agent-server";
|
|
4
|
+
/**
|
|
5
|
+
* BYE UAS.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare class ByeUserAgentServer extends UserAgentServer implements IncomingByeRequest {
|
|
9
|
+
constructor(dialog: SessionDialog, message: IncomingRequestMessage, delegate?: IncomingRequestDelegate);
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { OutgoingCancelRequest, OutgoingRequestDelegate, OutgoingRequestMessage } from "../messages";
|
|
2
|
+
import { UserAgentCore } from "../user-agent-core";
|
|
3
|
+
import { UserAgentClient } from "./user-agent-client";
|
|
4
|
+
/**
|
|
5
|
+
* CANCEL UAC.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare class CancelUserAgentClient extends UserAgentClient implements OutgoingCancelRequest {
|
|
9
|
+
constructor(core: UserAgentCore, message: OutgoingRequestMessage, delegate?: OutgoingRequestDelegate);
|
|
10
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export * from "./bye-user-agent-client";
|
|
2
|
+
export * from "./bye-user-agent-server";
|
|
3
|
+
export * from "./cancel-user-agent-client";
|
|
4
|
+
export * from "./info-user-agent-client";
|
|
5
|
+
export * from "./info-user-agent-server";
|
|
6
|
+
export * from "./invite-user-agent-client";
|
|
7
|
+
export * from "./invite-user-agent-server";
|
|
8
|
+
export * from "./message-user-agent-client";
|
|
9
|
+
export * from "./message-user-agent-server";
|
|
10
|
+
export * from "./notify-user-agent-client";
|
|
11
|
+
export * from "./notify-user-agent-server";
|
|
12
|
+
export * from "./publish-user-agent-client";
|
|
13
|
+
export * from "./prack-user-agent-client";
|
|
14
|
+
export * from "./prack-user-agent-server";
|
|
15
|
+
export * from "./re-invite-user-agent-client";
|
|
16
|
+
export * from "./re-invite-user-agent-server";
|
|
17
|
+
export * from "./re-subscribe-user-agent-client";
|
|
18
|
+
export * from "./re-subscribe-user-agent-server";
|
|
19
|
+
export * from "./refer-user-agent-client";
|
|
20
|
+
export * from "./refer-user-agent-server";
|
|
21
|
+
export * from "./register-user-agent-client";
|
|
22
|
+
export * from "./register-user-agent-server";
|
|
23
|
+
export * from "./subscribe-user-agent-client";
|
|
24
|
+
export * from "./subscribe-user-agent-server";
|
|
25
|
+
export * from "./user-agent-client";
|
|
26
|
+
export * from "./user-agent-server";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SessionDialog } from "../dialogs";
|
|
2
|
+
import { OutgoingInfoRequest, OutgoingRequestDelegate, RequestOptions } from "../messages";
|
|
3
|
+
import { UserAgentClient } from "./user-agent-client";
|
|
4
|
+
/**
|
|
5
|
+
* INFO UAC.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare class InfoUserAgentClient extends UserAgentClient implements OutgoingInfoRequest {
|
|
9
|
+
constructor(dialog: SessionDialog, delegate?: OutgoingRequestDelegate, options?: RequestOptions);
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SessionDialog } from "../dialogs";
|
|
2
|
+
import { IncomingInfoRequest, IncomingRequestDelegate, IncomingRequestMessage } from "../messages";
|
|
3
|
+
import { UserAgentServer } from "./user-agent-server";
|
|
4
|
+
/**
|
|
5
|
+
* INFO UAS.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare class InfoUserAgentServer extends UserAgentServer implements IncomingInfoRequest {
|
|
9
|
+
constructor(dialog: SessionDialog, message: IncomingRequestMessage, delegate?: IncomingRequestDelegate);
|
|
10
|
+
}
|