ue-softphone-sdk 2.2.4 → 2.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index.d.ts → types/index.d.ts} +3 -7
- package/dist/ue-softphone-sdk.js +7 -2
- package/package.json +5 -6
- package/{new-rollup.config.mjs → rollup-new.config.mjs} +1 -1
- package/rollup.config.js +14 -15
- package/src/index.ts +28 -53
- package/tsconfig.json +10 -26
- package/dist/api/bye.d.ts +0 -16
- package/dist/api/dtmf.d.ts +0 -15
- package/dist/api/emitter.d.ts +0 -88
- package/dist/api/exceptions/content-type-unsupported.d.ts +0 -8
- package/dist/api/exceptions/index.d.ts +0 -5
- package/dist/api/exceptions/request-pending.d.ts +0 -9
- package/dist/api/exceptions/session-description-handler.d.ts +0 -8
- package/dist/api/exceptions/session-terminated.d.ts +0 -8
- package/dist/api/exceptions/state-transition.d.ts +0 -8
- package/dist/api/index.d.ts +0 -58
- package/dist/api/info.d.ts +0 -16
- package/dist/api/invitation-accept-options.d.ts +0 -19
- package/dist/api/invitation-progress-options.d.ts +0 -38
- package/dist/api/invitation-reject-options.d.ts +0 -25
- package/dist/api/invitation.d.ts +0 -179
- package/dist/api/inviter-cancel-options.d.ts +0 -9
- package/dist/api/inviter-invite-options.d.ts +0 -28
- package/dist/api/inviter-options.d.ts +0 -43
- package/dist/api/inviter.d.ts +0 -236
- package/dist/api/message.d.ts +0 -16
- package/dist/api/messager-message-options.d.ts +0 -11
- package/dist/api/messager-options.d.ts +0 -17
- package/dist/api/messager.d.ts +0 -26
- package/dist/api/notification.d.ts +0 -16
- package/dist/api/notifier.d.ts +0 -8
- package/dist/api/publisher-options.d.ts +0 -33
- package/dist/api/publisher-publish-options.d.ts +0 -6
- package/dist/api/publisher-state.d.ts +0 -21
- package/dist/api/publisher-unpublish-options.d.ts +0 -6
- package/dist/api/publisher.d.ts +0 -65
- package/dist/api/referral.d.ts +0 -38
- package/dist/api/registerer-options.d.ts +0 -46
- package/dist/api/registerer-register-options.d.ts +0 -11
- package/dist/api/registerer-state.d.ts +0 -21
- package/dist/api/registerer-unregister-options.d.ts +0 -16
- package/dist/api/registerer.d.ts +0 -144
- package/dist/api/session-bye-options.d.ts +0 -11
- package/dist/api/session-delegate.d.ts +0 -73
- package/dist/api/session-description-handler-factory.d.ts +0 -15
- package/dist/api/session-description-handler.d.ts +0 -74
- package/dist/api/session-info-options.d.ts +0 -11
- package/dist/api/session-invite-options.d.ts +0 -28
- package/dist/api/session-message-options.d.ts +0 -11
- package/dist/api/session-options.d.ts +0 -8
- package/dist/api/session-refer-options.d.ts +0 -14
- package/dist/api/session-state.d.ts +0 -45
- package/dist/api/session.d.ts +0 -359
- package/dist/api/subscriber-options.d.ts +0 -11
- package/dist/api/subscriber-subscribe-options.d.ts +0 -6
- package/dist/api/subscriber.d.ts +0 -94
- package/dist/api/subscription-delegate.d.ts +0 -12
- package/dist/api/subscription-options.d.ts +0 -8
- package/dist/api/subscription-state.d.ts +0 -19
- package/dist/api/subscription-subscribe-options.d.ts +0 -6
- package/dist/api/subscription-unsubscribe-options.d.ts +0 -6
- package/dist/api/subscription.d.ts +0 -84
- package/dist/api/transport-state.d.ts +0 -37
- package/dist/api/transport.d.ts +0 -159
- package/dist/api/user-agent-delegate.d.ts +0 -84
- package/dist/api/user-agent-options.d.ts +0 -253
- package/dist/api/user-agent-state.d.ts +0 -14
- package/dist/api/user-agent.d.ts +0 -200
- package/dist/core/dialogs/dialog-state.d.ts +0 -34
- package/dist/core/dialogs/dialog.d.ts +0 -161
- package/dist/core/dialogs/index.d.ts +0 -4
- package/dist/core/dialogs/session-dialog.d.ts +0 -196
- package/dist/core/dialogs/subscription-dialog.d.ts +0 -120
- package/dist/core/exceptions/exception.d.ts +0 -8
- package/dist/core/exceptions/index.d.ts +0 -3
- package/dist/core/exceptions/transaction-state-error.d.ts +0 -8
- package/dist/core/exceptions/transport-error.d.ts +0 -8
- package/dist/core/index.d.ts +0 -15
- package/dist/core/log/index.d.ts +0 -3
- package/dist/core/log/levels.d.ts +0 -10
- package/dist/core/log/logger-factory.d.ts +0 -21
- package/dist/core/log/logger.d.ts +0 -19
- package/dist/core/messages/body.d.ts +0 -64
- package/dist/core/messages/digest-authentication.d.ts +0 -51
- package/dist/core/messages/incoming-message.d.ts +0 -79
- package/dist/core/messages/incoming-request-message.d.ts +0 -10
- package/dist/core/messages/incoming-request.d.ts +0 -67
- package/dist/core/messages/incoming-response-message.d.ts +0 -10
- package/dist/core/messages/incoming-response.d.ts +0 -12
- package/dist/core/messages/index.d.ts +0 -13
- package/dist/core/messages/md5.d.ts +0 -32
- package/dist/core/messages/methods/ack.d.ts +0 -18
- package/dist/core/messages/methods/bye.d.ts +0 -21
- package/dist/core/messages/methods/cancel.d.ts +0 -21
- package/dist/core/messages/methods/constants.d.ts +0 -20
- package/dist/core/messages/methods/index.d.ts +0 -13
- package/dist/core/messages/methods/info.d.ts +0 -21
- package/dist/core/messages/methods/invite.d.ts +0 -86
- package/dist/core/messages/methods/message.d.ts +0 -21
- package/dist/core/messages/methods/notify.d.ts +0 -21
- package/dist/core/messages/methods/prack.d.ts +0 -21
- package/dist/core/messages/methods/publish.d.ts +0 -21
- package/dist/core/messages/methods/refer.d.ts +0 -21
- package/dist/core/messages/methods/register.d.ts +0 -21
- package/dist/core/messages/methods/subscribe.d.ts +0 -54
- package/dist/core/messages/outgoing-request-message.d.ts +0 -94
- package/dist/core/messages/outgoing-request.d.ts +0 -67
- package/dist/core/messages/outgoing-response.d.ts +0 -42
- package/dist/core/messages/parser.d.ts +0 -14
- package/dist/core/messages/utils.d.ts +0 -24
- package/dist/core/session/index.d.ts +0 -2
- package/dist/core/session/session-delegate.d.ts +0 -70
- package/dist/core/session/session.d.ts +0 -134
- package/dist/core/subscription/index.d.ts +0 -2
- package/dist/core/subscription/subscription-delegate.d.ts +0 -27
- package/dist/core/subscription/subscription.d.ts +0 -55
- package/dist/core/timers.d.ts +0 -20
- package/dist/core/transactions/client-transaction.d.ts +0 -45
- package/dist/core/transactions/index.d.ts +0 -10
- package/dist/core/transactions/invite-client-transaction.d.ts +0 -116
- package/dist/core/transactions/invite-server-transaction.d.ts +0 -127
- package/dist/core/transactions/non-invite-client-transaction.d.ts +0 -69
- package/dist/core/transactions/non-invite-server-transaction.d.ts +0 -57
- package/dist/core/transactions/server-transaction.d.ts +0 -35
- package/dist/core/transactions/transaction-state.d.ts +0 -13
- package/dist/core/transactions/transaction-user.d.ts +0 -72
- package/dist/core/transactions/transaction.d.ts +0 -79
- package/dist/core/transport.d.ts +0 -31
- package/dist/core/user-agent-core/allowed-methods.d.ts +0 -4
- package/dist/core/user-agent-core/index.d.ts +0 -3
- package/dist/core/user-agent-core/user-agent-core-configuration.d.ts +0 -99
- package/dist/core/user-agent-core/user-agent-core-delegate.d.ts +0 -37
- package/dist/core/user-agent-core/user-agent-core.d.ts +0 -179
- package/dist/core/user-agents/bye-user-agent-client.d.ts +0 -10
- package/dist/core/user-agents/bye-user-agent-server.d.ts +0 -10
- package/dist/core/user-agents/cancel-user-agent-client.d.ts +0 -10
- package/dist/core/user-agents/index.d.ts +0 -26
- package/dist/core/user-agents/info-user-agent-client.d.ts +0 -10
- package/dist/core/user-agents/info-user-agent-server.d.ts +0 -10
- package/dist/core/user-agents/invite-user-agent-client.d.ts +0 -35
- package/dist/core/user-agents/invite-user-agent-server.d.ts +0 -77
- package/dist/core/user-agents/message-user-agent-client.d.ts +0 -10
- package/dist/core/user-agents/message-user-agent-server.d.ts +0 -10
- package/dist/core/user-agents/notify-user-agent-client.d.ts +0 -10
- package/dist/core/user-agents/notify-user-agent-server.d.ts +0 -16
- package/dist/core/user-agents/prack-user-agent-client.d.ts +0 -10
- package/dist/core/user-agents/prack-user-agent-server.d.ts +0 -16
- package/dist/core/user-agents/publish-user-agent-client.d.ts +0 -10
- package/dist/core/user-agents/re-invite-user-agent-client.d.ts +0 -18
- package/dist/core/user-agents/re-invite-user-agent-server.d.ts +0 -41
- package/dist/core/user-agents/re-subscribe-user-agent-client.d.ts +0 -17
- package/dist/core/user-agents/re-subscribe-user-agent-server.d.ts +0 -10
- package/dist/core/user-agents/refer-user-agent-client.d.ts +0 -10
- package/dist/core/user-agents/refer-user-agent-server.d.ts +0 -16
- package/dist/core/user-agents/register-user-agent-client.d.ts +0 -10
- package/dist/core/user-agents/register-user-agent-server.d.ts +0 -11
- package/dist/core/user-agents/subscribe-user-agent-client.d.ts +0 -65
- package/dist/core/user-agents/subscribe-user-agent-server.d.ts +0 -11
- package/dist/core/user-agents/user-agent-client.d.ts +0 -103
- package/dist/core/user-agents/user-agent-server.d.ts +0 -79
- package/dist/grammar/grammar.d.ts +0 -26
- package/dist/grammar/index.d.ts +0 -4
- package/dist/grammar/name-addr-header.d.ts +0 -24
- package/dist/grammar/parameters.d.ts +0 -16
- package/dist/grammar/pegjs/dist/grammar.d.ts +0 -50
- package/dist/grammar/uri.d.ts +0 -62
- package/dist/main.d.ts +0 -9
- package/dist/new-index.d.ts +0 -199
- package/dist/platform/web/index.d.ts +0 -4
- package/dist/platform/web/modifiers/index.d.ts +0 -5
- package/dist/platform/web/modifiers/modifiers.d.ts +0 -41
- package/dist/platform/web/session-description-handler/index.d.ts +0 -14
- package/dist/platform/web/session-description-handler/media-stream-factory-default.d.ts +0 -6
- package/dist/platform/web/session-description-handler/media-stream-factory.d.ts +0 -6
- package/dist/platform/web/session-description-handler/peer-connection-configuration-default.d.ts +0 -5
- package/dist/platform/web/session-description-handler/peer-connection-delegate.d.ts +0 -63
- package/dist/platform/web/session-description-handler/session-description-handler-configuration.d.ts +0 -16
- package/dist/platform/web/session-description-handler/session-description-handler-factory-default.d.ts +0 -11
- package/dist/platform/web/session-description-handler/session-description-handler-factory-options.d.ts +0 -9
- package/dist/platform/web/session-description-handler/session-description-handler-factory.d.ts +0 -16
- package/dist/platform/web/session-description-handler/session-description-handler-options.d.ts +0 -47
- package/dist/platform/web/session-description-handler/session-description-handler.d.ts +0 -212
- package/dist/platform/web/simple-user/index.d.ts +0 -7
- package/dist/platform/web/simple-user/simple-user-delegate.d.ts +0 -72
- package/dist/platform/web/simple-user/simple-user-options.d.ts +0 -90
- package/dist/platform/web/simple-user/simple-user.d.ts +0 -226
- package/dist/platform/web/transport/index.d.ts +0 -6
- package/dist/platform/web/transport/transport-options.d.ts +0 -30
- package/dist/platform/web/transport/transport.d.ts +0 -125
- package/dist/ue-softphone-sdk.js.map +0 -1
- package/dist/version.d.ts +0 -1
- package/dist/webPhoneSdk.d.ts +0 -24
- package/dist/webrtc.d.ts +0 -17
- package/src/api/api-extractor.json +0 -358
- package/src/api/bye.ts +0 -27
- package/src/api/dtmf.ts +0 -27
- package/src/api/emitter.ts +0 -110
- package/src/api/exceptions/content-type-unsupported.ts +0 -11
- package/src/api/exceptions/index.ts +0 -5
- package/src/api/exceptions/request-pending.ts +0 -12
- package/src/api/exceptions/session-description-handler.ts +0 -11
- package/src/api/exceptions/session-terminated.ts +0 -11
- package/src/api/exceptions/state-transition.ts +0 -11
- package/src/api/index.ts +0 -58
- package/src/api/info.ts +0 -27
- package/src/api/invitation-accept-options.ts +0 -20
- package/src/api/invitation-progress-options.ts +0 -36
- package/src/api/invitation-reject-options.ts +0 -22
- package/src/api/invitation.ts +0 -816
- package/src/api/inviter-cancel-options.ts +0 -9
- package/src/api/inviter-invite-options.ts +0 -29
- package/src/api/inviter-options.ts +0 -44
- package/src/api/inviter.ts +0 -1126
- package/src/api/message.ts +0 -27
- package/src/api/messager-message-options.ts +0 -12
- package/src/api/messager-options.ts +0 -18
- package/src/api/messager.ts +0 -89
- package/src/api/notification.ts +0 -27
- package/src/api/notifier.ts +0 -7
- package/src/api/publisher-options.ts +0 -34
- package/src/api/publisher-publish-options.ts +0 -6
- package/src/api/publisher-state.ts +0 -21
- package/src/api/publisher-unpublish-options.ts +0 -6
- package/src/api/publisher.ts +0 -418
- package/src/api/referral.ts +0 -89
- package/src/api/registerer-options.ts +0 -55
- package/src/api/registerer-register-options.ts +0 -12
- package/src/api/registerer-state.ts +0 -21
- package/src/api/registerer-unregister-options.ts +0 -17
- package/src/api/registerer.ts +0 -814
- package/src/api/session-bye-options.ts +0 -12
- package/src/api/session-delegate.ts +0 -80
- package/src/api/session-description-handler-factory.ts +0 -16
- package/src/api/session-description-handler.ts +0 -89
- package/src/api/session-info-options.ts +0 -12
- package/src/api/session-invite-options.ts +0 -29
- package/src/api/session-message-options.ts +0 -12
- package/src/api/session-options.ts +0 -8
- package/src/api/session-refer-options.ts +0 -15
- package/src/api/session-state.ts +0 -45
- package/src/api/session.ts +0 -1448
- package/src/api/subscriber-options.ts +0 -12
- package/src/api/subscriber-subscribe-options.ts +0 -6
- package/src/api/subscriber.ts +0 -536
- package/src/api/subscription-delegate.ts +0 -13
- package/src/api/subscription-options.ts +0 -8
- package/src/api/subscription-state.ts +0 -19
- package/src/api/subscription-subscribe-options.ts +0 -6
- package/src/api/subscription-unsubscribe-options.ts +0 -6
- package/src/api/subscription.ts +0 -161
- package/src/api/transport-state.ts +0 -37
- package/src/api/transport.ts +0 -169
- package/src/api/user-agent-delegate.ts +0 -95
- package/src/api/user-agent-options.ts +0 -322
- package/src/api/user-agent-state.ts +0 -14
- package/src/api/user-agent.ts +0 -1014
- package/src/core/api-extractor.json +0 -358
- package/src/core/dialogs/dialog-state.ts +0 -35
- package/src/core/dialogs/dialog.ts +0 -605
- package/src/core/dialogs/index.ts +0 -4
- package/src/core/dialogs/session-dialog.ts +0 -996
- package/src/core/dialogs/subscription-dialog.ts +0 -557
- package/src/core/exceptions/exception.ts +0 -11
- package/src/core/exceptions/index.ts +0 -3
- package/src/core/exceptions/transaction-state-error.ts +0 -11
- package/src/core/exceptions/transport-error.ts +0 -11
- package/src/core/index.ts +0 -19
- package/src/core/log/index.ts +0 -3
- package/src/core/log/levels.ts +0 -10
- package/src/core/log/logger-factory.ts +0 -119
- package/src/core/log/logger.ts +0 -42
- package/src/core/messages/body.ts +0 -171
- package/src/core/messages/digest-authentication.ts +0 -190
- package/src/core/messages/incoming-message.ts +0 -152
- package/src/core/messages/incoming-request-message.ts +0 -14
- package/src/core/messages/incoming-request.ts +0 -75
- package/src/core/messages/incoming-response-message.ts +0 -14
- package/src/core/messages/incoming-response.ts +0 -13
- package/src/core/messages/index.ts +0 -18
- package/src/core/messages/md5.ts +0 -437
- package/src/core/messages/methods/ack.ts +0 -22
- package/src/core/messages/methods/bye.ts +0 -22
- package/src/core/messages/methods/cancel.ts +0 -22
- package/src/core/messages/methods/constants.ts +0 -21
- package/src/core/messages/methods/index.ts +0 -13
- package/src/core/messages/methods/info.ts +0 -22
- package/src/core/messages/methods/invite.ts +0 -104
- package/src/core/messages/methods/message.ts +0 -22
- package/src/core/messages/methods/notify.ts +0 -22
- package/src/core/messages/methods/prack.ts +0 -22
- package/src/core/messages/methods/publish.ts +0 -22
- package/src/core/messages/methods/refer.ts +0 -22
- package/src/core/messages/methods/register.ts +0 -22
- package/src/core/messages/methods/subscribe.ts +0 -59
- package/src/core/messages/outgoing-request-message.ts +0 -299
- package/src/core/messages/outgoing-request.ts +0 -77
- package/src/core/messages/outgoing-response.ts +0 -174
- package/src/core/messages/parser.ts +0 -265
- package/src/core/messages/utils.ts +0 -144
- package/src/core/session/index.ts +0 -2
- package/src/core/session/session-delegate.ts +0 -88
- package/src/core/session/session.ts +0 -158
- package/src/core/subscription/index.ts +0 -2
- package/src/core/subscription/subscription-delegate.ts +0 -30
- package/src/core/subscription/subscription.ts +0 -61
- package/src/core/timers.ts +0 -24
- package/src/core/transactions/client-transaction.ts +0 -78
- package/src/core/transactions/index.ts +0 -10
- package/src/core/transactions/invite-client-transaction.ts +0 -504
- package/src/core/transactions/invite-server-transaction.ts +0 -432
- package/src/core/transactions/non-invite-client-transaction.ts +0 -257
- package/src/core/transactions/non-invite-server-transaction.ts +0 -241
- package/src/core/transactions/server-transaction.ts +0 -47
- package/src/core/transactions/transaction-state.ts +0 -13
- package/src/core/transactions/transaction-user.ts +0 -82
- package/src/core/transactions/transaction.ts +0 -149
- package/src/core/transport.ts +0 -32
- package/src/core/user-agent-core/allowed-methods.ts +0 -19
- package/src/core/user-agent-core/index.ts +0 -3
- package/src/core/user-agent-core/user-agent-core-configuration.ts +0 -111
- package/src/core/user-agent-core/user-agent-core-delegate.ts +0 -50
- package/src/core/user-agent-core/user-agent-core.ts +0 -905
- package/src/core/user-agents/bye-user-agent-client.ts +0 -16
- package/src/core/user-agents/bye-user-agent-server.ts +0 -14
- package/src/core/user-agents/cancel-user-agent-client.ts +0 -14
- package/src/core/user-agents/index.ts +0 -26
- package/src/core/user-agents/info-user-agent-client.ts +0 -15
- package/src/core/user-agents/info-user-agent-server.ts +0 -14
- package/src/core/user-agents/invite-user-agent-client.ts +0 -405
- package/src/core/user-agents/invite-user-agent-server.ts +0 -269
- package/src/core/user-agents/message-user-agent-client.ts +0 -14
- package/src/core/user-agents/message-user-agent-server.ts +0 -14
- package/src/core/user-agents/notify-user-agent-client.ts +0 -15
- package/src/core/user-agents/notify-user-agent-server.ts +0 -30
- package/src/core/user-agents/prack-user-agent-client.ts +0 -16
- package/src/core/user-agents/prack-user-agent-server.ts +0 -37
- package/src/core/user-agents/publish-user-agent-client.ts +0 -14
- package/src/core/user-agents/re-invite-user-agent-client.ts +0 -127
- package/src/core/user-agents/re-invite-user-agent-server.ts +0 -109
- package/src/core/user-agents/re-subscribe-user-agent-client.ts +0 -78
- package/src/core/user-agents/re-subscribe-user-agent-server.ts +0 -14
- package/src/core/user-agents/refer-user-agent-client.ts +0 -15
- package/src/core/user-agents/refer-user-agent-server.ts +0 -30
- package/src/core/user-agents/register-user-agent-client.ts +0 -14
- package/src/core/user-agents/register-user-agent-server.ts +0 -14
- package/src/core/user-agents/subscribe-user-agent-client.ts +0 -341
- package/src/core/user-agents/subscribe-user-agent-server.ts +0 -14
- package/src/core/user-agents/user-agent-client.ts +0 -378
- package/src/core/user-agents/user-agent-server.ts +0 -276
- package/src/grammar/grammar.ts +0 -55
- package/src/grammar/index.ts +0 -4
- package/src/grammar/name-addr-header.ts +0 -58
- package/src/grammar/parameters.ts +0 -45
- package/src/grammar/pegjs/README.md +0 -9
- package/src/grammar/pegjs/dist/grammar.ts +0 -1557
- package/src/grammar/pegjs/src/grammar.pegjs +0 -1009
- package/src/grammar/uri.ts +0 -370
- package/src/main.ts +0 -26
- package/src/new-index.ts +0 -2478
- package/src/platform/react/README.md +0 -1
- package/src/platform/web/index.ts +0 -4
- package/src/platform/web/modifiers/index.ts +0 -5
- package/src/platform/web/modifiers/modifiers.ts +0 -180
- package/src/platform/web/session-description-handler/api-extractor.json +0 -358
- package/src/platform/web/session-description-handler/index.ts +0 -14
- package/src/platform/web/session-description-handler/media-stream-factory-default.ts +0 -22
- package/src/platform/web/session-description-handler/media-stream-factory.ts +0 -10
- package/src/platform/web/session-description-handler/peer-connection-configuration-default.ts +0 -17
- package/src/platform/web/session-description-handler/peer-connection-delegate.ts +0 -72
- package/src/platform/web/session-description-handler/session-description-handler-configuration.ts +0 -17
- package/src/platform/web/session-description-handler/session-description-handler-factory-default.ts +0 -45
- package/src/platform/web/session-description-handler/session-description-handler-factory-options.ts +0 -10
- package/src/platform/web/session-description-handler/session-description-handler-factory.ts +0 -17
- package/src/platform/web/session-description-handler/session-description-handler-options.ts +0 -56
- package/src/platform/web/session-description-handler/session-description-handler.ts +0 -938
- package/src/platform/web/simple-user/api-extractor.json +0 -358
- package/src/platform/web/simple-user/index.ts +0 -7
- package/src/platform/web/simple-user/simple-user-delegate.ts +0 -82
- package/src/platform/web/simple-user/simple-user-options.ts +0 -102
- package/src/platform/web/simple-user/simple-user.ts +0 -1099
- package/src/platform/web/transport/api-extractor.json +0 -358
- package/src/platform/web/transport/index.ts +0 -6
- package/src/platform/web/transport/transport-options.ts +0 -34
- package/src/platform/web/transport/transport.ts +0 -742
- package/src/version.ts +0 -8
- package/src/webPhoneSdk.ts +0 -67
- package/src/webrtc.ts +0 -318
- /package/dist/{config.d.ts → types/config.d.ts} +0 -0
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* {@link Session} state.
|
|
3
|
-
*
|
|
4
|
-
* @remarks
|
|
5
|
-
* The {@link Session} behaves in a deterministic manner according to the following
|
|
6
|
-
* Finite State Machine (FSM).
|
|
7
|
-
* ```txt
|
|
8
|
-
* ___________________________________________________________
|
|
9
|
-
* | ____________________________________________ |
|
|
10
|
-
* | | ____________________________ | |
|
|
11
|
-
* Session | | | v v v
|
|
12
|
-
* Constructed -> Initial -> Establishing -> Established -> Terminating -> Terminated
|
|
13
|
-
* | |___________________________^ ^
|
|
14
|
-
* |_______________________________________________|
|
|
15
|
-
* ```
|
|
16
|
-
* @public
|
|
17
|
-
*/
|
|
18
|
-
export declare enum SessionState {
|
|
19
|
-
/**
|
|
20
|
-
* If `Inviter`, INVITE not sent yet.
|
|
21
|
-
* If `Invitation`, received INVITE (but no final response sent yet).
|
|
22
|
-
*/
|
|
23
|
-
Initial = "Initial",
|
|
24
|
-
/**
|
|
25
|
-
* If `Inviter`, sent INVITE and waiting for a final response.
|
|
26
|
-
* If `Invitation`, received INVITE and attempting to send 200 final response (but has not sent it yet).
|
|
27
|
-
*/
|
|
28
|
-
Establishing = "Establishing",
|
|
29
|
-
/**
|
|
30
|
-
* If `Inviter`, sent INVITE and received 200 final response and sent ACK.
|
|
31
|
-
* If `Invitation`, received INVITE and sent 200 final response.
|
|
32
|
-
*/
|
|
33
|
-
Established = "Established",
|
|
34
|
-
/**
|
|
35
|
-
* If `Inviter`, sent INVITE, sent CANCEL and now waiting for 487 final response to ACK (or 200 to ACK & BYE).
|
|
36
|
-
* If `Invitation`, received INVITE, sent 200 final response and now waiting on ACK and upon receipt will attempt BYE
|
|
37
|
-
* (as the protocol specification requires, before sending a BYE we must receive the ACK - so we are waiting).
|
|
38
|
-
*/
|
|
39
|
-
Terminating = "Terminating",
|
|
40
|
-
/**
|
|
41
|
-
* If `Inviter`, sent INVITE and received non-200 final response (or sent/received BYE after receiving 200).
|
|
42
|
-
* If `Invitation`, received INVITE and sent non-200 final response (or sent/received BYE after sending 200).
|
|
43
|
-
*/
|
|
44
|
-
Terminated = "Terminated"
|
|
45
|
-
}
|
package/dist/api/session.d.ts
DELETED
|
@@ -1,359 +0,0 @@
|
|
|
1
|
-
import { AckableIncomingResponseWithSession, Body, IncomingAckRequest, IncomingByeRequest, IncomingInfoRequest, IncomingInviteRequest, IncomingMessageRequest, IncomingNotifyRequest, IncomingPrackRequest, IncomingReferRequest, Logger, NameAddrHeader, OutgoingByeRequest, OutgoingInfoRequest, OutgoingInviteRequest, OutgoingMessageRequest, OutgoingReferRequest, OutgoingRequestDelegate, RequestOptions, Session as SessionDialog, URI } from "../core";
|
|
2
|
-
import { Emitter } from "./emitter";
|
|
3
|
-
import { Inviter } from "./inviter";
|
|
4
|
-
import { InviterOptions } from "./inviter-options";
|
|
5
|
-
import { Notification } from "./notification";
|
|
6
|
-
import { SessionByeOptions } from "./session-bye-options";
|
|
7
|
-
import { SessionDelegate } from "./session-delegate";
|
|
8
|
-
import { SessionDescriptionHandler, SessionDescriptionHandlerModifier, SessionDescriptionHandlerOptions } from "./session-description-handler";
|
|
9
|
-
import { SessionDescriptionHandlerFactory } from "./session-description-handler-factory";
|
|
10
|
-
import { SessionInfoOptions } from "./session-info-options";
|
|
11
|
-
import { SessionInviteOptions } from "./session-invite-options";
|
|
12
|
-
import { SessionMessageOptions } from "./session-message-options";
|
|
13
|
-
import { SessionOptions } from "./session-options";
|
|
14
|
-
import { SessionReferOptions } from "./session-refer-options";
|
|
15
|
-
import { SessionState } from "./session-state";
|
|
16
|
-
import { UserAgent } from "./user-agent";
|
|
17
|
-
/**
|
|
18
|
-
* A session provides real time communication between one or more participants.
|
|
19
|
-
*
|
|
20
|
-
* @remarks
|
|
21
|
-
* The transport behaves in a deterministic manner according to the
|
|
22
|
-
* the state defined in {@link SessionState}.
|
|
23
|
-
* @public
|
|
24
|
-
*/
|
|
25
|
-
export declare abstract class Session {
|
|
26
|
-
/**
|
|
27
|
-
* Property reserved for use by instance owner.
|
|
28
|
-
* @defaultValue `undefined`
|
|
29
|
-
*/
|
|
30
|
-
data: unknown;
|
|
31
|
-
/**
|
|
32
|
-
* The session delegate.
|
|
33
|
-
* @defaultValue `undefined`
|
|
34
|
-
*/
|
|
35
|
-
delegate: SessionDelegate | undefined;
|
|
36
|
-
/** @internal */
|
|
37
|
-
_contact: string | undefined;
|
|
38
|
-
/** @internal */
|
|
39
|
-
_referral: Inviter | undefined;
|
|
40
|
-
/** @internal */
|
|
41
|
-
_replacee: Session | undefined;
|
|
42
|
-
/** @internal */
|
|
43
|
-
protected _assertedIdentity: NameAddrHeader | undefined;
|
|
44
|
-
/** @internal */
|
|
45
|
-
protected _dialog: SessionDialog | undefined;
|
|
46
|
-
/** @internal */
|
|
47
|
-
protected _referralInviterOptions: InviterOptions | undefined;
|
|
48
|
-
/** @internal */
|
|
49
|
-
protected _renderbody: string | undefined;
|
|
50
|
-
/** @internal */
|
|
51
|
-
protected _rendertype: string | undefined;
|
|
52
|
-
/** If defined, NOTIFYs associated with a REFER subscription are delivered here. */
|
|
53
|
-
private onNotify;
|
|
54
|
-
/** True if there is an outgoing re-INVITE request outstanding. */
|
|
55
|
-
private pendingReinvite;
|
|
56
|
-
/** True if there is an incoming re-INVITE ACK request outstanding. */
|
|
57
|
-
private pendingReinviteAck;
|
|
58
|
-
/** Dialogs session description handler. */
|
|
59
|
-
private _sessionDescriptionHandler;
|
|
60
|
-
/** SDH modifiers for the initial INVITE transaction. */
|
|
61
|
-
private _sessionDescriptionHandlerModifiers;
|
|
62
|
-
/** SDH options for the initial INVITE transaction. */
|
|
63
|
-
private _sessionDescriptionHandlerOptions;
|
|
64
|
-
/** SDH modifiers for re-INVITE transactions. */
|
|
65
|
-
private _sessionDescriptionHandlerModifiersReInvite;
|
|
66
|
-
/** SDH options for re-NVITE transactions.*/
|
|
67
|
-
private _sessionDescriptionHandlerOptionsReInvite;
|
|
68
|
-
/** Session state. */
|
|
69
|
-
private _state;
|
|
70
|
-
/** Session state emitter. */
|
|
71
|
-
private _stateEventEmitter;
|
|
72
|
-
/** User agent. */
|
|
73
|
-
private _userAgent;
|
|
74
|
-
/**
|
|
75
|
-
* The identity of the local user.
|
|
76
|
-
*/
|
|
77
|
-
abstract readonly localIdentity: NameAddrHeader;
|
|
78
|
-
/**
|
|
79
|
-
* The identity of the remote user.
|
|
80
|
-
*/
|
|
81
|
-
abstract readonly remoteIdentity: NameAddrHeader;
|
|
82
|
-
/**
|
|
83
|
-
* Logger.
|
|
84
|
-
*/
|
|
85
|
-
protected abstract logger: Logger;
|
|
86
|
-
/** @internal */
|
|
87
|
-
protected abstract _id: string;
|
|
88
|
-
/**
|
|
89
|
-
* Constructor.
|
|
90
|
-
* @param userAgent - User agent. See {@link UserAgent} for details.
|
|
91
|
-
* @internal
|
|
92
|
-
*/
|
|
93
|
-
protected constructor(userAgent: UserAgent, options?: SessionOptions);
|
|
94
|
-
/**
|
|
95
|
-
* Destructor.
|
|
96
|
-
*/
|
|
97
|
-
dispose(): Promise<void>;
|
|
98
|
-
/**
|
|
99
|
-
* The asserted identity of the remote user.
|
|
100
|
-
*/
|
|
101
|
-
get assertedIdentity(): NameAddrHeader | undefined;
|
|
102
|
-
/**
|
|
103
|
-
* The confirmed session dialog.
|
|
104
|
-
*/
|
|
105
|
-
get dialog(): SessionDialog | undefined;
|
|
106
|
-
/**
|
|
107
|
-
* A unique identifier for this session.
|
|
108
|
-
*/
|
|
109
|
-
get id(): string;
|
|
110
|
-
/**
|
|
111
|
-
* The session being replace by this one.
|
|
112
|
-
*/
|
|
113
|
-
get replacee(): Session | undefined;
|
|
114
|
-
/**
|
|
115
|
-
* Session description handler.
|
|
116
|
-
* @remarks
|
|
117
|
-
* If `this` is an instance of `Invitation`,
|
|
118
|
-
* `sessionDescriptionHandler` will be defined when the session state changes to "established".
|
|
119
|
-
* If `this` is an instance of `Inviter` and an offer was sent in the INVITE,
|
|
120
|
-
* `sessionDescriptionHandler` will be defined when the session state changes to "establishing".
|
|
121
|
-
* If `this` is an instance of `Inviter` and an offer was not sent in the INVITE,
|
|
122
|
-
* `sessionDescriptionHandler` will be defined when the session state changes to "established".
|
|
123
|
-
* Otherwise `undefined`.
|
|
124
|
-
*/
|
|
125
|
-
get sessionDescriptionHandler(): SessionDescriptionHandler | undefined;
|
|
126
|
-
/**
|
|
127
|
-
* Session description handler factory.
|
|
128
|
-
*/
|
|
129
|
-
get sessionDescriptionHandlerFactory(): SessionDescriptionHandlerFactory;
|
|
130
|
-
/**
|
|
131
|
-
* SDH modifiers for the initial INVITE transaction.
|
|
132
|
-
* @remarks
|
|
133
|
-
* Used in all cases when handling the initial INVITE transaction as either UAC or UAS.
|
|
134
|
-
* May be set directly at anytime.
|
|
135
|
-
* May optionally be set via constructor option.
|
|
136
|
-
* May optionally be set via options passed to Inviter.invite() or Invitation.accept().
|
|
137
|
-
*/
|
|
138
|
-
get sessionDescriptionHandlerModifiers(): Array<SessionDescriptionHandlerModifier>;
|
|
139
|
-
set sessionDescriptionHandlerModifiers(modifiers: Array<SessionDescriptionHandlerModifier>);
|
|
140
|
-
/**
|
|
141
|
-
* SDH options for the initial INVITE transaction.
|
|
142
|
-
* @remarks
|
|
143
|
-
* Used in all cases when handling the initial INVITE transaction as either UAC or UAS.
|
|
144
|
-
* May be set directly at anytime.
|
|
145
|
-
* May optionally be set via constructor option.
|
|
146
|
-
* May optionally be set via options passed to Inviter.invite() or Invitation.accept().
|
|
147
|
-
*/
|
|
148
|
-
get sessionDescriptionHandlerOptions(): SessionDescriptionHandlerOptions;
|
|
149
|
-
set sessionDescriptionHandlerOptions(options: SessionDescriptionHandlerOptions);
|
|
150
|
-
/**
|
|
151
|
-
* SDH modifiers for re-INVITE transactions.
|
|
152
|
-
* @remarks
|
|
153
|
-
* Used in all cases when handling a re-INVITE transaction as either UAC or UAS.
|
|
154
|
-
* May be set directly at anytime.
|
|
155
|
-
* May optionally be set via constructor option.
|
|
156
|
-
* May optionally be set via options passed to Session.invite().
|
|
157
|
-
*/
|
|
158
|
-
get sessionDescriptionHandlerModifiersReInvite(): Array<SessionDescriptionHandlerModifier>;
|
|
159
|
-
set sessionDescriptionHandlerModifiersReInvite(modifiers: Array<SessionDescriptionHandlerModifier>);
|
|
160
|
-
/**
|
|
161
|
-
* SDH options for re-INVITE transactions.
|
|
162
|
-
* @remarks
|
|
163
|
-
* Used in all cases when handling a re-INVITE transaction as either UAC or UAS.
|
|
164
|
-
* May be set directly at anytime.
|
|
165
|
-
* May optionally be set via constructor option.
|
|
166
|
-
* May optionally be set via options passed to Session.invite().
|
|
167
|
-
*/
|
|
168
|
-
get sessionDescriptionHandlerOptionsReInvite(): SessionDescriptionHandlerOptions;
|
|
169
|
-
set sessionDescriptionHandlerOptionsReInvite(options: SessionDescriptionHandlerOptions);
|
|
170
|
-
/**
|
|
171
|
-
* Session state.
|
|
172
|
-
*/
|
|
173
|
-
get state(): SessionState;
|
|
174
|
-
/**
|
|
175
|
-
* Session state change emitter.
|
|
176
|
-
*/
|
|
177
|
-
get stateChange(): Emitter<SessionState>;
|
|
178
|
-
/**
|
|
179
|
-
* The user agent.
|
|
180
|
-
*/
|
|
181
|
-
get userAgent(): UserAgent;
|
|
182
|
-
/**
|
|
183
|
-
* End the {@link Session}. Sends a BYE.
|
|
184
|
-
* @param options - Options bucket. See {@link SessionByeOptions} for details.
|
|
185
|
-
*/
|
|
186
|
-
bye(options?: SessionByeOptions): Promise<OutgoingByeRequest>;
|
|
187
|
-
/**
|
|
188
|
-
* Share {@link Info} with peer. Sends an INFO.
|
|
189
|
-
* @param options - Options bucket. See {@link SessionInfoOptions} for details.
|
|
190
|
-
*/
|
|
191
|
-
info(options?: SessionInfoOptions): Promise<OutgoingInfoRequest>;
|
|
192
|
-
/**
|
|
193
|
-
* Renegotiate the session. Sends a re-INVITE.
|
|
194
|
-
* @param options - Options bucket. See {@link SessionInviteOptions} for details.
|
|
195
|
-
*/
|
|
196
|
-
invite(options?: SessionInviteOptions): Promise<OutgoingInviteRequest>;
|
|
197
|
-
/**
|
|
198
|
-
* Deliver a {@link Message}. Sends a MESSAGE.
|
|
199
|
-
* @param options - Options bucket. See {@link SessionMessageOptions} for details.
|
|
200
|
-
*/
|
|
201
|
-
message(options?: SessionMessageOptions): Promise<OutgoingMessageRequest>;
|
|
202
|
-
/**
|
|
203
|
-
* Proffer a {@link Referral}. Send a REFER.
|
|
204
|
-
* @param referTo - The referral target. If a `Session`, a REFER w/Replaces is sent.
|
|
205
|
-
* @param options - Options bucket. See {@link SessionReferOptions} for details.
|
|
206
|
-
*/
|
|
207
|
-
refer(referTo: URI | Session, options?: SessionReferOptions): Promise<OutgoingReferRequest>;
|
|
208
|
-
/**
|
|
209
|
-
* Send BYE.
|
|
210
|
-
* @param delegate - Request delegate.
|
|
211
|
-
* @param options - Request options bucket.
|
|
212
|
-
* @internal
|
|
213
|
-
*/
|
|
214
|
-
_bye(delegate?: OutgoingRequestDelegate, options?: RequestOptions): Promise<OutgoingByeRequest>;
|
|
215
|
-
/**
|
|
216
|
-
* Send INFO.
|
|
217
|
-
* @param delegate - Request delegate.
|
|
218
|
-
* @param options - Request options bucket.
|
|
219
|
-
* @internal
|
|
220
|
-
*/
|
|
221
|
-
_info(delegate?: OutgoingRequestDelegate, options?: RequestOptions): Promise<OutgoingInfoRequest>;
|
|
222
|
-
/**
|
|
223
|
-
* Send MESSAGE.
|
|
224
|
-
* @param delegate - Request delegate.
|
|
225
|
-
* @param options - Request options bucket.
|
|
226
|
-
* @internal
|
|
227
|
-
*/
|
|
228
|
-
_message(delegate?: OutgoingRequestDelegate, options?: RequestOptions): Promise<OutgoingMessageRequest>;
|
|
229
|
-
/**
|
|
230
|
-
* Send REFER.
|
|
231
|
-
* @param onNotify - Notification callback.
|
|
232
|
-
* @param delegate - Request delegate.
|
|
233
|
-
* @param options - Request options bucket.
|
|
234
|
-
* @internal
|
|
235
|
-
*/
|
|
236
|
-
_refer(onNotify?: (notification: Notification) => void, delegate?: OutgoingRequestDelegate, options?: RequestOptions): Promise<OutgoingByeRequest>;
|
|
237
|
-
/**
|
|
238
|
-
* Send ACK and then BYE. There are unrecoverable errors which can occur
|
|
239
|
-
* while handling dialog forming and in-dialog INVITE responses and when
|
|
240
|
-
* they occur we ACK the response and send a BYE.
|
|
241
|
-
* Note that the BYE is sent in the dialog associated with the response
|
|
242
|
-
* which is not necessarily `this.dialog`. And, accordingly, the
|
|
243
|
-
* session state is not transitioned to terminated and session is not closed.
|
|
244
|
-
* @param inviteResponse - The response causing the error.
|
|
245
|
-
* @param statusCode - Status code for he reason phrase.
|
|
246
|
-
* @param reasonPhrase - Reason phrase for the BYE.
|
|
247
|
-
* @internal
|
|
248
|
-
*/
|
|
249
|
-
protected ackAndBye(response: AckableIncomingResponseWithSession, statusCode?: number, reasonPhrase?: string): void;
|
|
250
|
-
/**
|
|
251
|
-
* Handle in dialog ACK request.
|
|
252
|
-
* @internal
|
|
253
|
-
*/
|
|
254
|
-
protected onAckRequest(request: IncomingAckRequest): Promise<void>;
|
|
255
|
-
/**
|
|
256
|
-
* Handle in dialog BYE request.
|
|
257
|
-
* @internal
|
|
258
|
-
*/
|
|
259
|
-
protected onByeRequest(request: IncomingByeRequest): void;
|
|
260
|
-
/**
|
|
261
|
-
* Handle in dialog INFO request.
|
|
262
|
-
* @internal
|
|
263
|
-
*/
|
|
264
|
-
protected onInfoRequest(request: IncomingInfoRequest): void;
|
|
265
|
-
/**
|
|
266
|
-
* Handle in dialog INVITE request.
|
|
267
|
-
* @internal
|
|
268
|
-
*/
|
|
269
|
-
protected onInviteRequest(request: IncomingInviteRequest): void;
|
|
270
|
-
/**
|
|
271
|
-
* Handle in dialog MESSAGE request.
|
|
272
|
-
* @internal
|
|
273
|
-
*/
|
|
274
|
-
protected onMessageRequest(request: IncomingMessageRequest): void;
|
|
275
|
-
/**
|
|
276
|
-
* Handle in dialog NOTIFY request.
|
|
277
|
-
* @internal
|
|
278
|
-
*/
|
|
279
|
-
protected onNotifyRequest(request: IncomingNotifyRequest): void;
|
|
280
|
-
/**
|
|
281
|
-
* Handle in dialog PRACK request.
|
|
282
|
-
* @internal
|
|
283
|
-
*/
|
|
284
|
-
protected onPrackRequest(request: IncomingPrackRequest): void;
|
|
285
|
-
/**
|
|
286
|
-
* Handle in dialog REFER request.
|
|
287
|
-
* @internal
|
|
288
|
-
*/
|
|
289
|
-
protected onReferRequest(request: IncomingReferRequest): void;
|
|
290
|
-
/**
|
|
291
|
-
* Generate an offer or answer for a response to an INVITE request.
|
|
292
|
-
* If a remote offer was provided in the request, set the remote
|
|
293
|
-
* description and get a local answer. If a remote offer was not
|
|
294
|
-
* provided, generates a local offer.
|
|
295
|
-
* @internal
|
|
296
|
-
*/
|
|
297
|
-
protected generateResponseOfferAnswer(request: IncomingInviteRequest, options: {
|
|
298
|
-
sessionDescriptionHandlerOptions?: SessionDescriptionHandlerOptions;
|
|
299
|
-
sessionDescriptionHandlerModifiers?: Array<SessionDescriptionHandlerModifier>;
|
|
300
|
-
}): Promise<Body | undefined>;
|
|
301
|
-
/**
|
|
302
|
-
* Generate an offer or answer for a response to an INVITE request
|
|
303
|
-
* when a dialog (early or otherwise) has already been established.
|
|
304
|
-
* This method may NOT be called if a dialog has yet to be established.
|
|
305
|
-
* @internal
|
|
306
|
-
*/
|
|
307
|
-
protected generateResponseOfferAnswerInDialog(options: {
|
|
308
|
-
sessionDescriptionHandlerOptions?: SessionDescriptionHandlerOptions;
|
|
309
|
-
sessionDescriptionHandlerModifiers?: Array<SessionDescriptionHandlerModifier>;
|
|
310
|
-
}): Promise<Body | undefined>;
|
|
311
|
-
/**
|
|
312
|
-
* Get local offer.
|
|
313
|
-
* @internal
|
|
314
|
-
*/
|
|
315
|
-
protected getOffer(options: {
|
|
316
|
-
sessionDescriptionHandlerOptions?: SessionDescriptionHandlerOptions;
|
|
317
|
-
sessionDescriptionHandlerModifiers?: Array<SessionDescriptionHandlerModifier>;
|
|
318
|
-
}): Promise<Body>;
|
|
319
|
-
/**
|
|
320
|
-
* Rollback local/remote offer.
|
|
321
|
-
* @internal
|
|
322
|
-
*/
|
|
323
|
-
protected rollbackOffer(): Promise<void>;
|
|
324
|
-
/**
|
|
325
|
-
* Set remote answer.
|
|
326
|
-
* @internal
|
|
327
|
-
*/
|
|
328
|
-
protected setAnswer(answer: Body, options: {
|
|
329
|
-
sessionDescriptionHandlerOptions?: SessionDescriptionHandlerOptions;
|
|
330
|
-
sessionDescriptionHandlerModifiers?: Array<SessionDescriptionHandlerModifier>;
|
|
331
|
-
}): Promise<void>;
|
|
332
|
-
/**
|
|
333
|
-
* Set remote offer and get local answer.
|
|
334
|
-
* @internal
|
|
335
|
-
*/
|
|
336
|
-
protected setOfferAndGetAnswer(offer: Body, options: {
|
|
337
|
-
sessionDescriptionHandlerOptions?: SessionDescriptionHandlerOptions;
|
|
338
|
-
sessionDescriptionHandlerModifiers?: Array<SessionDescriptionHandlerModifier>;
|
|
339
|
-
}): Promise<Body>;
|
|
340
|
-
/**
|
|
341
|
-
* SDH for confirmed dialog.
|
|
342
|
-
* @internal
|
|
343
|
-
*/
|
|
344
|
-
protected setSessionDescriptionHandler(sdh: SessionDescriptionHandler): void;
|
|
345
|
-
/**
|
|
346
|
-
* SDH for confirmed dialog.
|
|
347
|
-
* @internal
|
|
348
|
-
*/
|
|
349
|
-
protected setupSessionDescriptionHandler(): SessionDescriptionHandler;
|
|
350
|
-
/**
|
|
351
|
-
* Transition session state.
|
|
352
|
-
* @internal
|
|
353
|
-
*/
|
|
354
|
-
protected stateTransition(newState: SessionState): void;
|
|
355
|
-
private copyRequestOptions;
|
|
356
|
-
private getReasonHeaderValue;
|
|
357
|
-
private referExtraHeaders;
|
|
358
|
-
private referToString;
|
|
359
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { SubscriptionOptions } from "./subscription-options";
|
|
2
|
-
/**
|
|
3
|
-
* Options for {@link Subscriber} constructor.
|
|
4
|
-
* @public
|
|
5
|
-
*/
|
|
6
|
-
export interface SubscriberOptions extends SubscriptionOptions {
|
|
7
|
-
expires?: number;
|
|
8
|
-
extraHeaders?: Array<string>;
|
|
9
|
-
body?: string;
|
|
10
|
-
contentType?: string;
|
|
11
|
-
}
|
package/dist/api/subscriber.d.ts
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { IncomingNotifyRequest, IncomingResponse, OutgoingSubscribeRequest, URI } from "../core";
|
|
2
|
-
import { SubscriberOptions } from "./subscriber-options";
|
|
3
|
-
import { SubscriberSubscribeOptions } from "./subscriber-subscribe-options";
|
|
4
|
-
import { Subscription } from "./subscription";
|
|
5
|
-
import { SubscriptionUnsubscribeOptions } from "./subscription-unsubscribe-options";
|
|
6
|
-
import { UserAgent } from "./user-agent";
|
|
7
|
-
/**
|
|
8
|
-
* A subscriber establishes a {@link Subscription} (outgoing SUBSCRIBE).
|
|
9
|
-
*
|
|
10
|
-
* @remarks
|
|
11
|
-
* This is (more or less) an implementation of a "subscriber" as
|
|
12
|
-
* defined in RFC 6665 "SIP-Specific Event Notifications".
|
|
13
|
-
* https://tools.ietf.org/html/rfc6665
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```ts
|
|
17
|
-
* // Create a new subscriber.
|
|
18
|
-
* const targetURI = new URI("sip", "alice", "example.com");
|
|
19
|
-
* const eventType = "example-name"; // https://www.iana.org/assignments/sip-events/sip-events.xhtml
|
|
20
|
-
* const subscriber = new Subscriber(userAgent, targetURI, eventType);
|
|
21
|
-
*
|
|
22
|
-
* // Add delegate to handle event notifications.
|
|
23
|
-
* subscriber.delegate = {
|
|
24
|
-
* onNotify: (notification: Notification) => {
|
|
25
|
-
* // handle notification here
|
|
26
|
-
* }
|
|
27
|
-
* };
|
|
28
|
-
*
|
|
29
|
-
* // Monitor subscription state changes.
|
|
30
|
-
* subscriber.stateChange.addListener((newState: SubscriptionState) => {
|
|
31
|
-
* if (newState === SubscriptionState.Terminated) {
|
|
32
|
-
* // handle state change here
|
|
33
|
-
* }
|
|
34
|
-
* });
|
|
35
|
-
*
|
|
36
|
-
* // Attempt to establish the subscription
|
|
37
|
-
* subscriber.subscribe();
|
|
38
|
-
*
|
|
39
|
-
* // Sometime later when done with subscription
|
|
40
|
-
* subscriber.unsubscribe();
|
|
41
|
-
* ```
|
|
42
|
-
*
|
|
43
|
-
* @public
|
|
44
|
-
*/
|
|
45
|
-
export declare class Subscriber extends Subscription {
|
|
46
|
-
private id;
|
|
47
|
-
private body;
|
|
48
|
-
private event;
|
|
49
|
-
private expires;
|
|
50
|
-
private extraHeaders;
|
|
51
|
-
private logger;
|
|
52
|
-
private outgoingRequestMessage;
|
|
53
|
-
private retryAfterTimer;
|
|
54
|
-
private subscriberRequest;
|
|
55
|
-
private targetURI;
|
|
56
|
-
/**
|
|
57
|
-
* Constructor.
|
|
58
|
-
* @param userAgent - User agent. See {@link UserAgent} for details.
|
|
59
|
-
* @param targetURI - The request URI identifying the subscribed event.
|
|
60
|
-
* @param eventType - The event type identifying the subscribed event.
|
|
61
|
-
* @param options - Options bucket. See {@link SubscriberOptions} for details.
|
|
62
|
-
*/
|
|
63
|
-
constructor(userAgent: UserAgent, targetURI: URI, eventType: string, options?: SubscriberOptions);
|
|
64
|
-
/**
|
|
65
|
-
* Destructor.
|
|
66
|
-
* @internal
|
|
67
|
-
*/
|
|
68
|
-
dispose(): Promise<void>;
|
|
69
|
-
/**
|
|
70
|
-
* Subscribe to event notifications.
|
|
71
|
-
*
|
|
72
|
-
* @remarks
|
|
73
|
-
* Send an initial SUBSCRIBE request if no subscription as been established.
|
|
74
|
-
* Sends a re-SUBSCRIBE request if the subscription is "active".
|
|
75
|
-
*/
|
|
76
|
-
subscribe(options?: SubscriberSubscribeOptions): Promise<void>;
|
|
77
|
-
/**
|
|
78
|
-
* {@inheritDoc Subscription.unsubscribe}
|
|
79
|
-
*/
|
|
80
|
-
unsubscribe(options?: SubscriptionUnsubscribeOptions): Promise<void>;
|
|
81
|
-
/**
|
|
82
|
-
* Sends a re-SUBSCRIBE request if the subscription is "active".
|
|
83
|
-
* @deprecated Use `subscribe` instead.
|
|
84
|
-
* @internal
|
|
85
|
-
*/
|
|
86
|
-
_refresh(): Promise<void>;
|
|
87
|
-
/** @internal */
|
|
88
|
-
protected onAccepted(response: IncomingResponse): void;
|
|
89
|
-
/** @internal */
|
|
90
|
-
protected onNotify(request: IncomingNotifyRequest): void;
|
|
91
|
-
/** @internal */
|
|
92
|
-
protected onRefresh(request: OutgoingSubscribeRequest): void;
|
|
93
|
-
private initSubscriberRequest;
|
|
94
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Notification } from "./notification";
|
|
2
|
-
/**
|
|
3
|
-
* Delegate for {@link Subscription}.
|
|
4
|
-
* @public
|
|
5
|
-
*/
|
|
6
|
-
export interface SubscriptionDelegate {
|
|
7
|
-
/**
|
|
8
|
-
* Called upon receiving an incoming NOTIFY request.
|
|
9
|
-
* @param notification - A notification. See {@link Notification} for details.
|
|
10
|
-
*/
|
|
11
|
-
onNotify(notification: Notification): void;
|
|
12
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* {@link Subscription} state.
|
|
3
|
-
* @remarks
|
|
4
|
-
* The {@link Subscription} behaves in a deterministic manner according to the following
|
|
5
|
-
* Finite State Machine (FSM).
|
|
6
|
-
* ```txt
|
|
7
|
-
* _______________________________________
|
|
8
|
-
* Subscription | v
|
|
9
|
-
* Constructed -> Initial -> NotifyWait -> Subscribed -> Terminated
|
|
10
|
-
* |____________________________^
|
|
11
|
-
* ```
|
|
12
|
-
* @public
|
|
13
|
-
*/
|
|
14
|
-
export declare enum SubscriptionState {
|
|
15
|
-
Initial = "Initial",
|
|
16
|
-
NotifyWait = "NotifyWait",
|
|
17
|
-
Subscribed = "Subscribed",
|
|
18
|
-
Terminated = "Terminated"
|
|
19
|
-
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { Subscription as SubscriptionDialog } from "../core";
|
|
2
|
-
import { Emitter } from "./emitter";
|
|
3
|
-
import { SubscriptionDelegate } from "./subscription-delegate";
|
|
4
|
-
import { SubscriptionOptions } from "./subscription-options";
|
|
5
|
-
import { SubscriptionState } from "./subscription-state";
|
|
6
|
-
import { SubscriptionSubscribeOptions } from "./subscription-subscribe-options";
|
|
7
|
-
import { SubscriptionUnsubscribeOptions } from "./subscription-unsubscribe-options";
|
|
8
|
-
import { UserAgent } from "./user-agent";
|
|
9
|
-
/**
|
|
10
|
-
* A subscription provides {@link Notification} of events.
|
|
11
|
-
*
|
|
12
|
-
* @remarks
|
|
13
|
-
* See {@link Subscriber} for details on establishing a subscription.
|
|
14
|
-
*
|
|
15
|
-
* @public
|
|
16
|
-
*/
|
|
17
|
-
export declare abstract class Subscription {
|
|
18
|
-
/**
|
|
19
|
-
* Property reserved for use by instance owner.
|
|
20
|
-
* @defaultValue `undefined`
|
|
21
|
-
*/
|
|
22
|
-
data: unknown;
|
|
23
|
-
/**
|
|
24
|
-
* Subscription delegate. See {@link SubscriptionDelegate} for details.
|
|
25
|
-
* @defaultValue `undefined`
|
|
26
|
-
*/
|
|
27
|
-
delegate: SubscriptionDelegate | undefined;
|
|
28
|
-
/**
|
|
29
|
-
* If the subscription state is SubscriptionState.Subscribed, the associated subscription dialog. Otherwise undefined.
|
|
30
|
-
* @internal
|
|
31
|
-
*/
|
|
32
|
-
protected _dialog: SubscriptionDialog | undefined;
|
|
33
|
-
/**
|
|
34
|
-
* Our user agent.
|
|
35
|
-
* @internal
|
|
36
|
-
*/
|
|
37
|
-
protected _userAgent: UserAgent;
|
|
38
|
-
private _disposed;
|
|
39
|
-
private _logger;
|
|
40
|
-
private _state;
|
|
41
|
-
private _stateEventEmitter;
|
|
42
|
-
/**
|
|
43
|
-
* Constructor.
|
|
44
|
-
* @param userAgent - User agent. See {@link UserAgent} for details.
|
|
45
|
-
* @internal
|
|
46
|
-
*/
|
|
47
|
-
protected constructor(userAgent: UserAgent, options?: SubscriptionOptions);
|
|
48
|
-
/**
|
|
49
|
-
* Destructor.
|
|
50
|
-
*/
|
|
51
|
-
dispose(): Promise<void>;
|
|
52
|
-
/**
|
|
53
|
-
* The subscribed subscription dialog.
|
|
54
|
-
*/
|
|
55
|
-
get dialog(): SubscriptionDialog | undefined;
|
|
56
|
-
/**
|
|
57
|
-
* True if disposed.
|
|
58
|
-
* @internal
|
|
59
|
-
*/
|
|
60
|
-
get disposed(): boolean;
|
|
61
|
-
/**
|
|
62
|
-
* Subscription state. See {@link SubscriptionState} for details.
|
|
63
|
-
*/
|
|
64
|
-
get state(): SubscriptionState;
|
|
65
|
-
/**
|
|
66
|
-
* Emits when the subscription `state` property changes.
|
|
67
|
-
*/
|
|
68
|
-
get stateChange(): Emitter<SubscriptionState>;
|
|
69
|
-
/** @internal */
|
|
70
|
-
protected stateTransition(newState: SubscriptionState): void;
|
|
71
|
-
/**
|
|
72
|
-
* Sends a re-SUBSCRIBE request if the subscription is "active".
|
|
73
|
-
*/
|
|
74
|
-
abstract subscribe(options?: SubscriptionSubscribeOptions): Promise<void>;
|
|
75
|
-
/**
|
|
76
|
-
* Unsubscribe from event notifications.
|
|
77
|
-
*
|
|
78
|
-
* @remarks
|
|
79
|
-
* If the subscription state is SubscriptionState.Subscribed, sends an in dialog SUBSCRIBE request
|
|
80
|
-
* with expires time of zero (an un-subscribe) and terminates the subscription.
|
|
81
|
-
* Otherwise a noop.
|
|
82
|
-
*/
|
|
83
|
-
abstract unsubscribe(options?: SubscriptionUnsubscribeOptions): Promise<void>;
|
|
84
|
-
}
|