ue-softphone-sdk 4.0.0 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/ue-soft-phone.min.js +2 -2
- package/dist/ue-softphone-sdk.js +2 -2
- package/package.json +4 -1
- package/.babelrc +0 -12
- package/.gitlab-ci.yml +0 -3
- package/Dockerfile +0 -17
- package/dist/lib/types/lib/sip.js/api/ack.d.ts +0 -12
- package/dist/lib/types/lib/sip.js/api/bye.d.ts +0 -16
- package/dist/lib/types/lib/sip.js/api/dtmf.d.ts +0 -15
- package/dist/lib/types/lib/sip.js/api/emitter.d.ts +0 -88
- package/dist/lib/types/lib/sip.js/api/exceptions/content-type-unsupported.d.ts +0 -8
- package/dist/lib/types/lib/sip.js/api/exceptions/index.d.ts +0 -5
- package/dist/lib/types/lib/sip.js/api/exceptions/request-pending.d.ts +0 -9
- package/dist/lib/types/lib/sip.js/api/exceptions/session-description-handler.d.ts +0 -8
- package/dist/lib/types/lib/sip.js/api/exceptions/session-terminated.d.ts +0 -8
- package/dist/lib/types/lib/sip.js/api/exceptions/state-transition.d.ts +0 -8
- package/dist/lib/types/lib/sip.js/api/index.d.ts +0 -59
- package/dist/lib/types/lib/sip.js/api/info.d.ts +0 -16
- package/dist/lib/types/lib/sip.js/api/invitation-accept-options.d.ts +0 -19
- package/dist/lib/types/lib/sip.js/api/invitation-progress-options.d.ts +0 -38
- package/dist/lib/types/lib/sip.js/api/invitation-reject-options.d.ts +0 -25
- package/dist/lib/types/lib/sip.js/api/invitation.d.ts +0 -179
- package/dist/lib/types/lib/sip.js/api/inviter-cancel-options.d.ts +0 -9
- package/dist/lib/types/lib/sip.js/api/inviter-invite-options.d.ts +0 -28
- package/dist/lib/types/lib/sip.js/api/inviter-options.d.ts +0 -43
- package/dist/lib/types/lib/sip.js/api/inviter.d.ts +0 -236
- package/dist/lib/types/lib/sip.js/api/message.d.ts +0 -16
- package/dist/lib/types/lib/sip.js/api/messager-message-options.d.ts +0 -11
- package/dist/lib/types/lib/sip.js/api/messager-options.d.ts +0 -17
- package/dist/lib/types/lib/sip.js/api/messager.d.ts +0 -26
- package/dist/lib/types/lib/sip.js/api/notification.d.ts +0 -16
- package/dist/lib/types/lib/sip.js/api/notifier.d.ts +0 -8
- package/dist/lib/types/lib/sip.js/api/publisher-options.d.ts +0 -33
- package/dist/lib/types/lib/sip.js/api/publisher-publish-options.d.ts +0 -6
- package/dist/lib/types/lib/sip.js/api/publisher-state.d.ts +0 -21
- package/dist/lib/types/lib/sip.js/api/publisher-unpublish-options.d.ts +0 -6
- package/dist/lib/types/lib/sip.js/api/publisher.d.ts +0 -65
- package/dist/lib/types/lib/sip.js/api/referral.d.ts +0 -38
- package/dist/lib/types/lib/sip.js/api/registerer-options.d.ts +0 -46
- package/dist/lib/types/lib/sip.js/api/registerer-register-options.d.ts +0 -11
- package/dist/lib/types/lib/sip.js/api/registerer-state.d.ts +0 -21
- package/dist/lib/types/lib/sip.js/api/registerer-unregister-options.d.ts +0 -16
- package/dist/lib/types/lib/sip.js/api/registerer.d.ts +0 -144
- package/dist/lib/types/lib/sip.js/api/session-bye-options.d.ts +0 -11
- package/dist/lib/types/lib/sip.js/api/session-delegate.d.ts +0 -79
- package/dist/lib/types/lib/sip.js/api/session-description-handler-factory.d.ts +0 -15
- package/dist/lib/types/lib/sip.js/api/session-description-handler.d.ts +0 -74
- package/dist/lib/types/lib/sip.js/api/session-info-options.d.ts +0 -11
- package/dist/lib/types/lib/sip.js/api/session-invite-options.d.ts +0 -28
- package/dist/lib/types/lib/sip.js/api/session-message-options.d.ts +0 -11
- package/dist/lib/types/lib/sip.js/api/session-options.d.ts +0 -8
- package/dist/lib/types/lib/sip.js/api/session-refer-options.d.ts +0 -14
- package/dist/lib/types/lib/sip.js/api/session-state.d.ts +0 -45
- package/dist/lib/types/lib/sip.js/api/session.d.ts +0 -359
- package/dist/lib/types/lib/sip.js/api/subscriber-options.d.ts +0 -11
- package/dist/lib/types/lib/sip.js/api/subscriber-subscribe-options.d.ts +0 -6
- package/dist/lib/types/lib/sip.js/api/subscriber.d.ts +0 -94
- package/dist/lib/types/lib/sip.js/api/subscription-delegate.d.ts +0 -12
- package/dist/lib/types/lib/sip.js/api/subscription-options.d.ts +0 -8
- package/dist/lib/types/lib/sip.js/api/subscription-state.d.ts +0 -19
- package/dist/lib/types/lib/sip.js/api/subscription-subscribe-options.d.ts +0 -6
- package/dist/lib/types/lib/sip.js/api/subscription-unsubscribe-options.d.ts +0 -6
- package/dist/lib/types/lib/sip.js/api/subscription.d.ts +0 -84
- package/dist/lib/types/lib/sip.js/api/transport-state.d.ts +0 -37
- package/dist/lib/types/lib/sip.js/api/transport.d.ts +0 -159
- package/dist/lib/types/lib/sip.js/api/user-agent-delegate.d.ts +0 -84
- package/dist/lib/types/lib/sip.js/api/user-agent-options.d.ts +0 -253
- package/dist/lib/types/lib/sip.js/api/user-agent-state.d.ts +0 -14
- package/dist/lib/types/lib/sip.js/api/user-agent.d.ts +0 -200
- package/dist/lib/types/lib/sip.js/core/dialogs/dialog-state.d.ts +0 -34
- package/dist/lib/types/lib/sip.js/core/dialogs/dialog.d.ts +0 -161
- package/dist/lib/types/lib/sip.js/core/dialogs/index.d.ts +0 -4
- package/dist/lib/types/lib/sip.js/core/dialogs/session-dialog.d.ts +0 -196
- package/dist/lib/types/lib/sip.js/core/dialogs/subscription-dialog.d.ts +0 -120
- package/dist/lib/types/lib/sip.js/core/exceptions/exception.d.ts +0 -8
- package/dist/lib/types/lib/sip.js/core/exceptions/index.d.ts +0 -3
- package/dist/lib/types/lib/sip.js/core/exceptions/transaction-state-error.d.ts +0 -8
- package/dist/lib/types/lib/sip.js/core/exceptions/transport-error.d.ts +0 -8
- package/dist/lib/types/lib/sip.js/core/index.d.ts +0 -15
- package/dist/lib/types/lib/sip.js/core/log/index.d.ts +0 -3
- package/dist/lib/types/lib/sip.js/core/log/levels.d.ts +0 -10
- package/dist/lib/types/lib/sip.js/core/log/logger-factory.d.ts +0 -21
- package/dist/lib/types/lib/sip.js/core/log/logger.d.ts +0 -19
- package/dist/lib/types/lib/sip.js/core/messages/body.d.ts +0 -64
- package/dist/lib/types/lib/sip.js/core/messages/digest-authentication.d.ts +0 -51
- package/dist/lib/types/lib/sip.js/core/messages/incoming-message.d.ts +0 -79
- package/dist/lib/types/lib/sip.js/core/messages/incoming-request-message.d.ts +0 -10
- package/dist/lib/types/lib/sip.js/core/messages/incoming-request.d.ts +0 -67
- package/dist/lib/types/lib/sip.js/core/messages/incoming-response-message.d.ts +0 -10
- package/dist/lib/types/lib/sip.js/core/messages/incoming-response.d.ts +0 -12
- package/dist/lib/types/lib/sip.js/core/messages/index.d.ts +0 -13
- package/dist/lib/types/lib/sip.js/core/messages/md5.d.ts +0 -32
- package/dist/lib/types/lib/sip.js/core/messages/methods/ack.d.ts +0 -18
- package/dist/lib/types/lib/sip.js/core/messages/methods/bye.d.ts +0 -21
- package/dist/lib/types/lib/sip.js/core/messages/methods/cancel.d.ts +0 -21
- package/dist/lib/types/lib/sip.js/core/messages/methods/constants.d.ts +0 -20
- package/dist/lib/types/lib/sip.js/core/messages/methods/index.d.ts +0 -13
- package/dist/lib/types/lib/sip.js/core/messages/methods/info.d.ts +0 -21
- package/dist/lib/types/lib/sip.js/core/messages/methods/invite.d.ts +0 -86
- package/dist/lib/types/lib/sip.js/core/messages/methods/message.d.ts +0 -21
- package/dist/lib/types/lib/sip.js/core/messages/methods/notify.d.ts +0 -21
- package/dist/lib/types/lib/sip.js/core/messages/methods/prack.d.ts +0 -21
- package/dist/lib/types/lib/sip.js/core/messages/methods/publish.d.ts +0 -21
- package/dist/lib/types/lib/sip.js/core/messages/methods/refer.d.ts +0 -21
- package/dist/lib/types/lib/sip.js/core/messages/methods/register.d.ts +0 -21
- package/dist/lib/types/lib/sip.js/core/messages/methods/subscribe.d.ts +0 -54
- package/dist/lib/types/lib/sip.js/core/messages/outgoing-request-message.d.ts +0 -94
- package/dist/lib/types/lib/sip.js/core/messages/outgoing-request.d.ts +0 -67
- package/dist/lib/types/lib/sip.js/core/messages/outgoing-response.d.ts +0 -42
- package/dist/lib/types/lib/sip.js/core/messages/parser.d.ts +0 -14
- package/dist/lib/types/lib/sip.js/core/messages/utils.d.ts +0 -24
- package/dist/lib/types/lib/sip.js/core/session/index.d.ts +0 -2
- package/dist/lib/types/lib/sip.js/core/session/session-delegate.d.ts +0 -70
- package/dist/lib/types/lib/sip.js/core/session/session.d.ts +0 -134
- package/dist/lib/types/lib/sip.js/core/subscription/index.d.ts +0 -2
- package/dist/lib/types/lib/sip.js/core/subscription/subscription-delegate.d.ts +0 -27
- package/dist/lib/types/lib/sip.js/core/subscription/subscription.d.ts +0 -55
- package/dist/lib/types/lib/sip.js/core/timers.d.ts +0 -20
- package/dist/lib/types/lib/sip.js/core/transactions/client-transaction.d.ts +0 -45
- package/dist/lib/types/lib/sip.js/core/transactions/index.d.ts +0 -10
- package/dist/lib/types/lib/sip.js/core/transactions/invite-client-transaction.d.ts +0 -116
- package/dist/lib/types/lib/sip.js/core/transactions/invite-server-transaction.d.ts +0 -127
- package/dist/lib/types/lib/sip.js/core/transactions/non-invite-client-transaction.d.ts +0 -69
- package/dist/lib/types/lib/sip.js/core/transactions/non-invite-server-transaction.d.ts +0 -57
- package/dist/lib/types/lib/sip.js/core/transactions/server-transaction.d.ts +0 -35
- package/dist/lib/types/lib/sip.js/core/transactions/transaction-state.d.ts +0 -13
- package/dist/lib/types/lib/sip.js/core/transactions/transaction-user.d.ts +0 -72
- package/dist/lib/types/lib/sip.js/core/transactions/transaction.d.ts +0 -79
- package/dist/lib/types/lib/sip.js/core/transport.d.ts +0 -31
- package/dist/lib/types/lib/sip.js/core/user-agent-core/allowed-methods.d.ts +0 -4
- package/dist/lib/types/lib/sip.js/core/user-agent-core/index.d.ts +0 -3
- package/dist/lib/types/lib/sip.js/core/user-agent-core/user-agent-core-configuration.d.ts +0 -99
- package/dist/lib/types/lib/sip.js/core/user-agent-core/user-agent-core-delegate.d.ts +0 -37
- package/dist/lib/types/lib/sip.js/core/user-agent-core/user-agent-core.d.ts +0 -179
- package/dist/lib/types/lib/sip.js/core/user-agents/bye-user-agent-client.d.ts +0 -10
- package/dist/lib/types/lib/sip.js/core/user-agents/bye-user-agent-server.d.ts +0 -10
- package/dist/lib/types/lib/sip.js/core/user-agents/cancel-user-agent-client.d.ts +0 -10
- package/dist/lib/types/lib/sip.js/core/user-agents/index.d.ts +0 -26
- package/dist/lib/types/lib/sip.js/core/user-agents/info-user-agent-client.d.ts +0 -10
- package/dist/lib/types/lib/sip.js/core/user-agents/info-user-agent-server.d.ts +0 -10
- package/dist/lib/types/lib/sip.js/core/user-agents/invite-user-agent-client.d.ts +0 -35
- package/dist/lib/types/lib/sip.js/core/user-agents/invite-user-agent-server.d.ts +0 -77
- package/dist/lib/types/lib/sip.js/core/user-agents/message-user-agent-client.d.ts +0 -10
- package/dist/lib/types/lib/sip.js/core/user-agents/message-user-agent-server.d.ts +0 -10
- package/dist/lib/types/lib/sip.js/core/user-agents/notify-user-agent-client.d.ts +0 -10
- package/dist/lib/types/lib/sip.js/core/user-agents/notify-user-agent-server.d.ts +0 -16
- package/dist/lib/types/lib/sip.js/core/user-agents/prack-user-agent-client.d.ts +0 -10
- package/dist/lib/types/lib/sip.js/core/user-agents/prack-user-agent-server.d.ts +0 -16
- package/dist/lib/types/lib/sip.js/core/user-agents/publish-user-agent-client.d.ts +0 -10
- package/dist/lib/types/lib/sip.js/core/user-agents/re-invite-user-agent-client.d.ts +0 -18
- package/dist/lib/types/lib/sip.js/core/user-agents/re-invite-user-agent-server.d.ts +0 -41
- package/dist/lib/types/lib/sip.js/core/user-agents/re-subscribe-user-agent-client.d.ts +0 -17
- package/dist/lib/types/lib/sip.js/core/user-agents/re-subscribe-user-agent-server.d.ts +0 -10
- package/dist/lib/types/lib/sip.js/core/user-agents/refer-user-agent-client.d.ts +0 -10
- package/dist/lib/types/lib/sip.js/core/user-agents/refer-user-agent-server.d.ts +0 -16
- package/dist/lib/types/lib/sip.js/core/user-agents/register-user-agent-client.d.ts +0 -10
- package/dist/lib/types/lib/sip.js/core/user-agents/register-user-agent-server.d.ts +0 -11
- package/dist/lib/types/lib/sip.js/core/user-agents/subscribe-user-agent-client.d.ts +0 -65
- package/dist/lib/types/lib/sip.js/core/user-agents/subscribe-user-agent-server.d.ts +0 -11
- package/dist/lib/types/lib/sip.js/core/user-agents/user-agent-client.d.ts +0 -103
- package/dist/lib/types/lib/sip.js/core/user-agents/user-agent-server.d.ts +0 -79
- package/dist/lib/types/lib/sip.js/grammar/grammar.d.ts +0 -26
- package/dist/lib/types/lib/sip.js/grammar/index.d.ts +0 -4
- package/dist/lib/types/lib/sip.js/grammar/name-addr-header.d.ts +0 -24
- package/dist/lib/types/lib/sip.js/grammar/parameters.d.ts +0 -16
- package/dist/lib/types/lib/sip.js/grammar/pegjs/dist/grammar.d.ts +0 -50
- package/dist/lib/types/lib/sip.js/grammar/uri.d.ts +0 -62
- package/dist/lib/types/lib/sip.js/index.d.ts +0 -9
- package/dist/lib/types/lib/sip.js/platform/web/index.d.ts +0 -4
- package/dist/lib/types/lib/sip.js/platform/web/modifiers/index.d.ts +0 -5
- package/dist/lib/types/lib/sip.js/platform/web/modifiers/modifiers.d.ts +0 -41
- package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/index.d.ts +0 -14
- package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/media-stream-factory-default.d.ts +0 -6
- package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/media-stream-factory.d.ts +0 -6
- package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/peer-connection-configuration-default.d.ts +0 -5
- package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/peer-connection-delegate.d.ts +0 -63
- package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/session-description-handler-configuration.d.ts +0 -16
- package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/session-description-handler-factory-default.d.ts +0 -11
- package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/session-description-handler-factory-options.d.ts +0 -9
- package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/session-description-handler-factory.d.ts +0 -16
- package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/session-description-handler-options.d.ts +0 -47
- package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/session-description-handler.d.ts +0 -212
- package/dist/lib/types/lib/sip.js/platform/web/simple-user/index.d.ts +0 -7
- package/dist/lib/types/lib/sip.js/platform/web/simple-user/simple-user-delegate.d.ts +0 -72
- package/dist/lib/types/lib/sip.js/platform/web/simple-user/simple-user-options.d.ts +0 -90
- package/dist/lib/types/lib/sip.js/platform/web/simple-user/simple-user.d.ts +0 -226
- package/dist/lib/types/lib/sip.js/platform/web/transport/index.d.ts +0 -6
- package/dist/lib/types/lib/sip.js/platform/web/transport/transport-options.d.ts +0 -30
- package/dist/lib/types/lib/sip.js/platform/web/transport/transport.d.ts +0 -125
- package/dist/lib/types/lib/sip.js/version.d.ts +0 -1
- package/dist/lib/types/webrtc/webrtc-method.d.ts +0 -2
- package/dist/lib/types/webrtc/webrtc.d.ts +0 -38
- package/index.html/index.html +0 -118
- package/nginx.conf +0 -56
- package/rollup-new.config.mjs +0 -20
- package/rollup.config.js +0 -45
- package/src/config.ts +0 -19
- package/src/index.ts +0 -2473
- package/src/lib/sip.js/api/ack.ts +0 -15
- package/src/lib/sip.js/api/api-extractor.json +0 -350
- package/src/lib/sip.js/api/bye.ts +0 -27
- package/src/lib/sip.js/api/dtmf.ts +0 -27
- package/src/lib/sip.js/api/emitter.ts +0 -110
- package/src/lib/sip.js/api/exceptions/content-type-unsupported.ts +0 -11
- package/src/lib/sip.js/api/exceptions/index.ts +0 -5
- package/src/lib/sip.js/api/exceptions/request-pending.ts +0 -12
- package/src/lib/sip.js/api/exceptions/session-description-handler.ts +0 -11
- package/src/lib/sip.js/api/exceptions/session-terminated.ts +0 -11
- package/src/lib/sip.js/api/exceptions/state-transition.ts +0 -11
- package/src/lib/sip.js/api/index.ts +0 -59
- package/src/lib/sip.js/api/info.ts +0 -27
- package/src/lib/sip.js/api/invitation-accept-options.ts +0 -20
- package/src/lib/sip.js/api/invitation-progress-options.ts +0 -36
- package/src/lib/sip.js/api/invitation-reject-options.ts +0 -22
- package/src/lib/sip.js/api/invitation.ts +0 -815
- package/src/lib/sip.js/api/inviter-cancel-options.ts +0 -9
- package/src/lib/sip.js/api/inviter-invite-options.ts +0 -29
- package/src/lib/sip.js/api/inviter-options.ts +0 -44
- package/src/lib/sip.js/api/inviter.ts +0 -1126
- package/src/lib/sip.js/api/message.ts +0 -27
- package/src/lib/sip.js/api/messager-message-options.ts +0 -12
- package/src/lib/sip.js/api/messager-options.ts +0 -18
- package/src/lib/sip.js/api/messager.ts +0 -89
- package/src/lib/sip.js/api/notification.ts +0 -27
- package/src/lib/sip.js/api/notifier.ts +0 -7
- package/src/lib/sip.js/api/publisher-options.ts +0 -34
- package/src/lib/sip.js/api/publisher-publish-options.ts +0 -6
- package/src/lib/sip.js/api/publisher-state.ts +0 -21
- package/src/lib/sip.js/api/publisher-unpublish-options.ts +0 -6
- package/src/lib/sip.js/api/publisher.ts +0 -421
- package/src/lib/sip.js/api/referral.ts +0 -89
- package/src/lib/sip.js/api/registerer-options.ts +0 -55
- package/src/lib/sip.js/api/registerer-register-options.ts +0 -12
- package/src/lib/sip.js/api/registerer-state.ts +0 -21
- package/src/lib/sip.js/api/registerer-unregister-options.ts +0 -17
- package/src/lib/sip.js/api/registerer.ts +0 -819
- package/src/lib/sip.js/api/session-bye-options.ts +0 -12
- package/src/lib/sip.js/api/session-delegate.ts +0 -87
- package/src/lib/sip.js/api/session-description-handler-factory.ts +0 -16
- package/src/lib/sip.js/api/session-description-handler.ts +0 -89
- package/src/lib/sip.js/api/session-info-options.ts +0 -12
- package/src/lib/sip.js/api/session-invite-options.ts +0 -29
- package/src/lib/sip.js/api/session-message-options.ts +0 -12
- package/src/lib/sip.js/api/session-options.ts +0 -8
- package/src/lib/sip.js/api/session-refer-options.ts +0 -15
- package/src/lib/sip.js/api/session-state.ts +0 -45
- package/src/lib/sip.js/api/session.ts +0 -1454
- package/src/lib/sip.js/api/subscriber-options.ts +0 -12
- package/src/lib/sip.js/api/subscriber-subscribe-options.ts +0 -6
- package/src/lib/sip.js/api/subscriber.ts +0 -537
- package/src/lib/sip.js/api/subscription-delegate.ts +0 -13
- package/src/lib/sip.js/api/subscription-options.ts +0 -8
- package/src/lib/sip.js/api/subscription-state.ts +0 -19
- package/src/lib/sip.js/api/subscription-subscribe-options.ts +0 -6
- package/src/lib/sip.js/api/subscription-unsubscribe-options.ts +0 -6
- package/src/lib/sip.js/api/subscription.ts +0 -161
- package/src/lib/sip.js/api/transport-state.ts +0 -37
- package/src/lib/sip.js/api/transport.ts +0 -169
- package/src/lib/sip.js/api/user-agent-delegate.ts +0 -95
- package/src/lib/sip.js/api/user-agent-options.ts +0 -322
- package/src/lib/sip.js/api/user-agent-state.ts +0 -14
- package/src/lib/sip.js/api/user-agent.ts +0 -1013
- package/src/lib/sip.js/core/api-extractor.json +0 -350
- package/src/lib/sip.js/core/dialogs/dialog-state.ts +0 -35
- package/src/lib/sip.js/core/dialogs/dialog.ts +0 -605
- package/src/lib/sip.js/core/dialogs/index.ts +0 -4
- package/src/lib/sip.js/core/dialogs/session-dialog.ts +0 -997
- package/src/lib/sip.js/core/dialogs/subscription-dialog.ts +0 -558
- package/src/lib/sip.js/core/exceptions/exception.ts +0 -11
- package/src/lib/sip.js/core/exceptions/index.ts +0 -3
- package/src/lib/sip.js/core/exceptions/transaction-state-error.ts +0 -11
- package/src/lib/sip.js/core/exceptions/transport-error.ts +0 -11
- package/src/lib/sip.js/core/index.ts +0 -19
- package/src/lib/sip.js/core/log/index.ts +0 -3
- package/src/lib/sip.js/core/log/levels.ts +0 -10
- package/src/lib/sip.js/core/log/logger-factory.ts +0 -119
- package/src/lib/sip.js/core/log/logger.ts +0 -42
- package/src/lib/sip.js/core/messages/body.ts +0 -171
- package/src/lib/sip.js/core/messages/digest-authentication.ts +0 -190
- package/src/lib/sip.js/core/messages/incoming-message.ts +0 -152
- package/src/lib/sip.js/core/messages/incoming-request-message.ts +0 -14
- package/src/lib/sip.js/core/messages/incoming-request.ts +0 -75
- package/src/lib/sip.js/core/messages/incoming-response-message.ts +0 -14
- package/src/lib/sip.js/core/messages/incoming-response.ts +0 -13
- package/src/lib/sip.js/core/messages/index.ts +0 -18
- package/src/lib/sip.js/core/messages/md5.ts +0 -437
- package/src/lib/sip.js/core/messages/methods/ack.ts +0 -22
- package/src/lib/sip.js/core/messages/methods/bye.ts +0 -22
- package/src/lib/sip.js/core/messages/methods/cancel.ts +0 -22
- package/src/lib/sip.js/core/messages/methods/constants.ts +0 -21
- package/src/lib/sip.js/core/messages/methods/index.ts +0 -13
- package/src/lib/sip.js/core/messages/methods/info.ts +0 -22
- package/src/lib/sip.js/core/messages/methods/invite.ts +0 -104
- package/src/lib/sip.js/core/messages/methods/message.ts +0 -22
- package/src/lib/sip.js/core/messages/methods/notify.ts +0 -22
- package/src/lib/sip.js/core/messages/methods/prack.ts +0 -22
- package/src/lib/sip.js/core/messages/methods/publish.ts +0 -22
- package/src/lib/sip.js/core/messages/methods/refer.ts +0 -22
- package/src/lib/sip.js/core/messages/methods/register.ts +0 -22
- package/src/lib/sip.js/core/messages/methods/subscribe.ts +0 -59
- package/src/lib/sip.js/core/messages/outgoing-request-message.ts +0 -299
- package/src/lib/sip.js/core/messages/outgoing-request.ts +0 -77
- package/src/lib/sip.js/core/messages/outgoing-response.ts +0 -174
- package/src/lib/sip.js/core/messages/parser.ts +0 -265
- package/src/lib/sip.js/core/messages/utils.ts +0 -144
- package/src/lib/sip.js/core/session/index.ts +0 -2
- package/src/lib/sip.js/core/session/session-delegate.ts +0 -88
- package/src/lib/sip.js/core/session/session.ts +0 -158
- package/src/lib/sip.js/core/subscription/index.ts +0 -2
- package/src/lib/sip.js/core/subscription/subscription-delegate.ts +0 -30
- package/src/lib/sip.js/core/subscription/subscription.ts +0 -61
- package/src/lib/sip.js/core/timers.ts +0 -24
- package/src/lib/sip.js/core/transactions/client-transaction.ts +0 -78
- package/src/lib/sip.js/core/transactions/index.ts +0 -10
- package/src/lib/sip.js/core/transactions/invite-client-transaction.ts +0 -505
- package/src/lib/sip.js/core/transactions/invite-server-transaction.ts +0 -433
- package/src/lib/sip.js/core/transactions/non-invite-client-transaction.ts +0 -258
- package/src/lib/sip.js/core/transactions/non-invite-server-transaction.ts +0 -242
- package/src/lib/sip.js/core/transactions/server-transaction.ts +0 -47
- package/src/lib/sip.js/core/transactions/transaction-state.ts +0 -13
- package/src/lib/sip.js/core/transactions/transaction-user.ts +0 -82
- package/src/lib/sip.js/core/transactions/transaction.ts +0 -149
- package/src/lib/sip.js/core/transport.ts +0 -32
- package/src/lib/sip.js/core/user-agent-core/allowed-methods.ts +0 -19
- package/src/lib/sip.js/core/user-agent-core/index.ts +0 -3
- package/src/lib/sip.js/core/user-agent-core/user-agent-core-configuration.ts +0 -111
- package/src/lib/sip.js/core/user-agent-core/user-agent-core-delegate.ts +0 -50
- package/src/lib/sip.js/core/user-agent-core/user-agent-core.ts +0 -905
- package/src/lib/sip.js/core/user-agents/bye-user-agent-client.ts +0 -16
- package/src/lib/sip.js/core/user-agents/bye-user-agent-server.ts +0 -14
- package/src/lib/sip.js/core/user-agents/cancel-user-agent-client.ts +0 -14
- package/src/lib/sip.js/core/user-agents/index.ts +0 -26
- package/src/lib/sip.js/core/user-agents/info-user-agent-client.ts +0 -15
- package/src/lib/sip.js/core/user-agents/info-user-agent-server.ts +0 -14
- package/src/lib/sip.js/core/user-agents/invite-user-agent-client.ts +0 -406
- package/src/lib/sip.js/core/user-agents/invite-user-agent-server.ts +0 -269
- package/src/lib/sip.js/core/user-agents/message-user-agent-client.ts +0 -14
- package/src/lib/sip.js/core/user-agents/message-user-agent-server.ts +0 -14
- package/src/lib/sip.js/core/user-agents/notify-user-agent-client.ts +0 -15
- package/src/lib/sip.js/core/user-agents/notify-user-agent-server.ts +0 -30
- package/src/lib/sip.js/core/user-agents/prack-user-agent-client.ts +0 -16
- package/src/lib/sip.js/core/user-agents/prack-user-agent-server.ts +0 -37
- package/src/lib/sip.js/core/user-agents/publish-user-agent-client.ts +0 -14
- package/src/lib/sip.js/core/user-agents/re-invite-user-agent-client.ts +0 -128
- package/src/lib/sip.js/core/user-agents/re-invite-user-agent-server.ts +0 -109
- package/src/lib/sip.js/core/user-agents/re-subscribe-user-agent-client.ts +0 -78
- package/src/lib/sip.js/core/user-agents/re-subscribe-user-agent-server.ts +0 -14
- package/src/lib/sip.js/core/user-agents/refer-user-agent-client.ts +0 -15
- package/src/lib/sip.js/core/user-agents/refer-user-agent-server.ts +0 -30
- package/src/lib/sip.js/core/user-agents/register-user-agent-client.ts +0 -14
- package/src/lib/sip.js/core/user-agents/register-user-agent-server.ts +0 -14
- package/src/lib/sip.js/core/user-agents/subscribe-user-agent-client.ts +0 -342
- package/src/lib/sip.js/core/user-agents/subscribe-user-agent-server.ts +0 -14
- package/src/lib/sip.js/core/user-agents/user-agent-client.ts +0 -378
- package/src/lib/sip.js/core/user-agents/user-agent-server.ts +0 -276
- package/src/lib/sip.js/grammar/grammar.ts +0 -55
- package/src/lib/sip.js/grammar/index.ts +0 -4
- package/src/lib/sip.js/grammar/name-addr-header.ts +0 -58
- package/src/lib/sip.js/grammar/parameters.ts +0 -45
- package/src/lib/sip.js/grammar/pegjs/README.md +0 -9
- package/src/lib/sip.js/grammar/pegjs/dist/grammar.ts +0 -1557
- package/src/lib/sip.js/grammar/pegjs/src/grammar.pegjs +0 -1009
- package/src/lib/sip.js/grammar/uri.ts +0 -370
- package/src/lib/sip.js/index.ts +0 -20
- package/src/lib/sip.js/platform/react/README.md +0 -1
- package/src/lib/sip.js/platform/web/index.ts +0 -4
- package/src/lib/sip.js/platform/web/modifiers/index.ts +0 -5
- package/src/lib/sip.js/platform/web/modifiers/modifiers.ts +0 -180
- package/src/lib/sip.js/platform/web/session-description-handler/api-extractor.json +0 -350
- package/src/lib/sip.js/platform/web/session-description-handler/index.ts +0 -14
- package/src/lib/sip.js/platform/web/session-description-handler/media-stream-factory-default.ts +0 -22
- package/src/lib/sip.js/platform/web/session-description-handler/media-stream-factory.ts +0 -10
- package/src/lib/sip.js/platform/web/session-description-handler/peer-connection-configuration-default.ts +0 -17
- package/src/lib/sip.js/platform/web/session-description-handler/peer-connection-delegate.ts +0 -72
- package/src/lib/sip.js/platform/web/session-description-handler/session-description-handler-configuration.ts +0 -17
- package/src/lib/sip.js/platform/web/session-description-handler/session-description-handler-factory-default.ts +0 -45
- package/src/lib/sip.js/platform/web/session-description-handler/session-description-handler-factory-options.ts +0 -10
- package/src/lib/sip.js/platform/web/session-description-handler/session-description-handler-factory.ts +0 -17
- package/src/lib/sip.js/platform/web/session-description-handler/session-description-handler-options.ts +0 -56
- package/src/lib/sip.js/platform/web/session-description-handler/session-description-handler.ts +0 -938
- package/src/lib/sip.js/platform/web/simple-user/api-extractor.json +0 -350
- package/src/lib/sip.js/platform/web/simple-user/index.ts +0 -7
- package/src/lib/sip.js/platform/web/simple-user/simple-user-delegate.ts +0 -82
- package/src/lib/sip.js/platform/web/simple-user/simple-user-options.ts +0 -102
- package/src/lib/sip.js/platform/web/simple-user/simple-user.ts +0 -1099
- package/src/lib/sip.js/platform/web/transport/api-extractor.json +0 -350
- package/src/lib/sip.js/platform/web/transport/index.ts +0 -6
- package/src/lib/sip.js/platform/web/transport/transport-options.ts +0 -34
- package/src/lib/sip.js/platform/web/transport/transport.ts +0 -743
- package/src/lib/sip.js/version.ts +0 -1
- package/src/lib/socket.io.esm.min.js +0 -7
- package/src/webrtc/webrtc-method.ts +0 -49
- package/src/webrtc/webrtc.ts +0 -350
- package/tsconfig.json +0 -21
|
@@ -1,370 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
import { Parameters } from "./parameters";
|
|
3
|
-
|
|
4
|
-
interface URIObject {
|
|
5
|
-
scheme: string;
|
|
6
|
-
user: string | undefined;
|
|
7
|
-
host: string;
|
|
8
|
-
port: number | undefined;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* URI.
|
|
13
|
-
* @public
|
|
14
|
-
*/
|
|
15
|
-
export class URI extends Parameters {
|
|
16
|
-
public headers: {[name: string]: Array<string>} = {};
|
|
17
|
-
private normal: URIObject;
|
|
18
|
-
private raw: URIObject;
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Constructor
|
|
22
|
-
* @param scheme -
|
|
23
|
-
* @param user -
|
|
24
|
-
* @param host -
|
|
25
|
-
* @param port -
|
|
26
|
-
* @param parameters -
|
|
27
|
-
* @param headers -
|
|
28
|
-
*/
|
|
29
|
-
constructor(
|
|
30
|
-
scheme = "sip",
|
|
31
|
-
user: string,
|
|
32
|
-
host: string,
|
|
33
|
-
port?: number,
|
|
34
|
-
parameters?: { [name: string]: string | number | null },
|
|
35
|
-
headers?: {[name: string]: Array<string>}
|
|
36
|
-
) {
|
|
37
|
-
super(parameters || {});
|
|
38
|
-
// Checks
|
|
39
|
-
if (!host) {
|
|
40
|
-
throw new TypeError('missing or invalid "host" parameter');
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
for (const header in headers) {
|
|
44
|
-
// eslint-disable-next-line no-prototype-builtins
|
|
45
|
-
if (headers.hasOwnProperty(header)) {
|
|
46
|
-
this.setHeader(header, headers[header]);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// Raw URI
|
|
51
|
-
this.raw = {
|
|
52
|
-
scheme,
|
|
53
|
-
user,
|
|
54
|
-
host,
|
|
55
|
-
port
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
// Normalized URI
|
|
59
|
-
this.normal = {
|
|
60
|
-
scheme: scheme.toLowerCase(),
|
|
61
|
-
user,
|
|
62
|
-
host: host.toLowerCase(),
|
|
63
|
-
port
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
get scheme(): string { return this.normal.scheme; }
|
|
68
|
-
set scheme(value: string) {
|
|
69
|
-
this.raw.scheme = value;
|
|
70
|
-
this.normal.scheme = value.toLowerCase();
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
get user(): string | undefined { return this.normal.user; }
|
|
74
|
-
set user(value: string | undefined) {
|
|
75
|
-
this.normal.user = this.raw.user = value;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
get host(): string { return this.normal.host; }
|
|
79
|
-
set host(value: string) {
|
|
80
|
-
this.raw.host = value;
|
|
81
|
-
this.normal.host = value.toLowerCase();
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
get aor(): string { return this.normal.user + "@" + this.normal.host; }
|
|
85
|
-
|
|
86
|
-
get port(): number | undefined { return this.normal.port; }
|
|
87
|
-
set port(value: number | undefined) {
|
|
88
|
-
this.normal.port = this.raw.port = value === 0 ? value : value;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
public setHeader(name: string, value: Array<string> | string): void {
|
|
92
|
-
this.headers[this.headerize(name)] = (value instanceof Array) ? value : [value];
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
public getHeader(name: string): Array<string> | undefined {
|
|
96
|
-
if (name) {
|
|
97
|
-
return this.headers[this.headerize(name)];
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
public hasHeader(name: string): boolean {
|
|
102
|
-
// eslint-disable-next-line no-prototype-builtins
|
|
103
|
-
return !!name && !!this.headers.hasOwnProperty(this.headerize(name));
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
public deleteHeader(header: string): Array<string> | undefined {
|
|
107
|
-
header = this.headerize(header);
|
|
108
|
-
|
|
109
|
-
// eslint-disable-next-line no-prototype-builtins
|
|
110
|
-
if (this.headers.hasOwnProperty(header)) {
|
|
111
|
-
const value = this.headers[header];
|
|
112
|
-
delete this.headers[header];
|
|
113
|
-
return value;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
public clearHeaders(): void {
|
|
118
|
-
this.headers = {};
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
public clone(): URI {
|
|
122
|
-
return new URI(
|
|
123
|
-
this._raw.scheme,
|
|
124
|
-
this._raw.user || "",
|
|
125
|
-
this._raw.host,
|
|
126
|
-
this._raw.port,
|
|
127
|
-
JSON.parse(JSON.stringify(this.parameters)),
|
|
128
|
-
JSON.parse(JSON.stringify(this.headers)));
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
public toRaw(): string {
|
|
132
|
-
return this._toString(this._raw);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
public toString(): string {
|
|
136
|
-
return this._toString(this._normal);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
private get _normal(): URIObject { return this.normal; }
|
|
140
|
-
|
|
141
|
-
private get _raw(): URIObject { return this.raw; }
|
|
142
|
-
|
|
143
|
-
private _toString(uri: any): string {
|
|
144
|
-
let uriString: string = uri.scheme + ":";
|
|
145
|
-
// add slashes if it's not a sip(s) URI
|
|
146
|
-
if (!uri.scheme.toLowerCase().match("^sips?$")) {
|
|
147
|
-
uriString += "//";
|
|
148
|
-
}
|
|
149
|
-
if (uri.user) {
|
|
150
|
-
uriString += this.escapeUser(uri.user) + "@";
|
|
151
|
-
}
|
|
152
|
-
uriString += uri.host;
|
|
153
|
-
if (uri.port || uri.port === 0) {
|
|
154
|
-
uriString += ":" + uri.port;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
for (const parameter in this.parameters) {
|
|
158
|
-
// eslint-disable-next-line no-prototype-builtins
|
|
159
|
-
if (this.parameters.hasOwnProperty(parameter)) {
|
|
160
|
-
uriString += ";" + parameter;
|
|
161
|
-
|
|
162
|
-
if (this.parameters[parameter] !== null) {
|
|
163
|
-
uriString += "=" + this.parameters[parameter];
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
const headers: Array<string> = [];
|
|
169
|
-
for (const header in this.headers) {
|
|
170
|
-
// eslint-disable-next-line no-prototype-builtins
|
|
171
|
-
if (this.headers.hasOwnProperty(header)) {
|
|
172
|
-
// eslint-disable-next-line @typescript-eslint/no-for-in-array
|
|
173
|
-
for (const idx in this.headers[header]) {
|
|
174
|
-
// eslint-disable-next-line no-prototype-builtins
|
|
175
|
-
if (this.headers[header].hasOwnProperty(idx)) {
|
|
176
|
-
headers.push(header + "=" + this.headers[header][idx]);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
if (headers.length > 0) {
|
|
183
|
-
uriString += "?" + headers.join("&");
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
return uriString;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
/*
|
|
190
|
-
* Hex-escape a SIP URI user.
|
|
191
|
-
* @private
|
|
192
|
-
* @param {String} user
|
|
193
|
-
*/
|
|
194
|
-
private escapeUser(user: string): string {
|
|
195
|
-
let decodedUser: string;
|
|
196
|
-
|
|
197
|
-
// FIXME: This is called by toString above which should never throw, but
|
|
198
|
-
// decodeURIComponent can throw and I've seen one case in production where
|
|
199
|
-
// it did throw resulting in a cascading failure. This class should be
|
|
200
|
-
// fixed so that decodeURIComponent is not called at this point (in toString).
|
|
201
|
-
// The user should be decoded when the URI is constructor or some other
|
|
202
|
-
// place where we can catch the error before the URI is created or somesuch.
|
|
203
|
-
// eslint-disable-next-line no-useless-catch
|
|
204
|
-
try {
|
|
205
|
-
decodedUser = decodeURIComponent(user);
|
|
206
|
-
} catch (error) {
|
|
207
|
-
throw error;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
// Don't hex-escape ':' (%3A), '+' (%2B), '?' (%3F"), '/' (%2F).
|
|
211
|
-
return encodeURIComponent(decodedUser)
|
|
212
|
-
.replace(/%3A/ig, ":")
|
|
213
|
-
.replace(/%2B/ig, "+")
|
|
214
|
-
.replace(/%3F/ig, "?")
|
|
215
|
-
.replace(/%2F/ig, "/");
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
private headerize(str: string): string {
|
|
219
|
-
const exceptions: any = {
|
|
220
|
-
"Call-Id": "Call-ID",
|
|
221
|
-
"Cseq": "CSeq",
|
|
222
|
-
"Min-Se": "Min-SE",
|
|
223
|
-
"Rack": "RAck",
|
|
224
|
-
"Rseq": "RSeq",
|
|
225
|
-
"Www-Authenticate": "WWW-Authenticate",
|
|
226
|
-
};
|
|
227
|
-
const name: Array<string> = str.toLowerCase().replace(/_/g, "-").split("-");
|
|
228
|
-
const parts: number = name.length;
|
|
229
|
-
let hname = "";
|
|
230
|
-
|
|
231
|
-
for (let part = 0; part < parts; part++) {
|
|
232
|
-
if (part !== 0) {
|
|
233
|
-
hname += "-";
|
|
234
|
-
}
|
|
235
|
-
hname += name[part].charAt(0).toUpperCase() + name[part].substring(1);
|
|
236
|
-
}
|
|
237
|
-
if (exceptions[hname]) {
|
|
238
|
-
hname = exceptions[hname];
|
|
239
|
-
}
|
|
240
|
-
return hname;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
/**
|
|
245
|
-
* Returns true if URIs are equivalent per RFC 3261 Section 19.1.4.
|
|
246
|
-
* @param a URI to compare
|
|
247
|
-
* @param b URI to compare
|
|
248
|
-
*
|
|
249
|
-
* @remarks
|
|
250
|
-
* 19.1.4 URI Comparison
|
|
251
|
-
* Some operations in this specification require determining whether two
|
|
252
|
-
* SIP or SIPS URIs are equivalent.
|
|
253
|
-
*
|
|
254
|
-
* https://tools.ietf.org/html/rfc3261#section-19.1.4
|
|
255
|
-
* @internal
|
|
256
|
-
*/
|
|
257
|
-
export function equivalentURI(a: URI, b: URI): boolean {
|
|
258
|
-
|
|
259
|
-
// o A SIP and SIPS URI are never equivalent.
|
|
260
|
-
if (a.scheme !== b.scheme) {
|
|
261
|
-
return false;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
// o Comparison of the userinfo of SIP and SIPS URIs is case-
|
|
265
|
-
// sensitive. This includes userinfo containing passwords or
|
|
266
|
-
// formatted as telephone-subscribers. Comparison of all other
|
|
267
|
-
// components of the URI is case-insensitive unless explicitly
|
|
268
|
-
// defined otherwise.
|
|
269
|
-
//
|
|
270
|
-
// o The ordering of parameters and header fields is not significant
|
|
271
|
-
// in comparing SIP and SIPS URIs.
|
|
272
|
-
//
|
|
273
|
-
// o Characters other than those in the "reserved" set (see RFC 2396
|
|
274
|
-
// [5]) are equivalent to their ""%" HEX HEX" encoding.
|
|
275
|
-
//
|
|
276
|
-
// o An IP address that is the result of a DNS lookup of a host name
|
|
277
|
-
// does not match that host name.
|
|
278
|
-
//
|
|
279
|
-
// o For two URIs to be equal, the user, password, host, and port
|
|
280
|
-
// components must match.
|
|
281
|
-
//
|
|
282
|
-
// A URI omitting the user component will not match a URI that
|
|
283
|
-
// includes one. A URI omitting the password component will not
|
|
284
|
-
// match a URI that includes one.
|
|
285
|
-
//
|
|
286
|
-
// A URI omitting any component with a default value will not
|
|
287
|
-
// match a URI explicitly containing that component with its
|
|
288
|
-
// default value. For instance, a URI omitting the optional port
|
|
289
|
-
// component will not match a URI explicitly declaring port 5060.
|
|
290
|
-
// The same is true for the transport-parameter, ttl-parameter,
|
|
291
|
-
// user-parameter, and method components.
|
|
292
|
-
//
|
|
293
|
-
// Defining sip:user@host to not be equivalent to
|
|
294
|
-
// sip:user@host:5060 is a change from RFC 2543. When deriving
|
|
295
|
-
// addresses from URIs, equivalent addresses are expected from
|
|
296
|
-
// equivalent URIs. The URI sip:user@host:5060 will always
|
|
297
|
-
// resolve to port 5060. The URI sip:user@host may resolve to
|
|
298
|
-
// other ports through the DNS SRV mechanisms detailed in [4].
|
|
299
|
-
|
|
300
|
-
// FIXME: TODO:
|
|
301
|
-
// - character compared to hex encoding is not handled
|
|
302
|
-
// - password does not exist on URI currently
|
|
303
|
-
if (a.user !== b.user || a.host !== b.host || a.port !== b.port) {
|
|
304
|
-
return false;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
// o URI uri-parameter components are compared as follows:
|
|
308
|
-
function compareParameters(a: URI, b: URI): boolean {
|
|
309
|
-
// - Any uri-parameter appearing in both URIs must match.
|
|
310
|
-
const parameterKeysA = Object.keys(a.parameters);
|
|
311
|
-
const parameterKeysB = Object.keys(b.parameters);
|
|
312
|
-
const intersection = parameterKeysA.filter(x => parameterKeysB.includes(x));
|
|
313
|
-
if (!intersection.every(key => a.parameters[key] === b.parameters[key])) {
|
|
314
|
-
return false;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
// - A user, ttl, or method uri-parameter appearing in only one
|
|
318
|
-
// URI never matches, even if it contains the default value.
|
|
319
|
-
if (!["user", "ttl", "method", "transport"].every(key => a.hasParam(key) && b.hasParam(key) || !a.hasParam(key) && !b.hasParam(key))) {
|
|
320
|
-
return false;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
// - A URI that includes an maddr parameter will not match a URI
|
|
324
|
-
// that contains no maddr parameter.
|
|
325
|
-
if (!["maddr"].every(key => a.hasParam(key) && b.hasParam(key) || !a.hasParam(key) && !b.hasParam(key))) {
|
|
326
|
-
return false;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
// - All other uri-parameters appearing in only one URI are
|
|
330
|
-
// ignored when comparing the URIs.
|
|
331
|
-
return true;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
if (!compareParameters(a, b)) {
|
|
335
|
-
return false;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
// o URI header components are never ignored. Any present header
|
|
339
|
-
// component MUST be present in both URIs and match for the URIs
|
|
340
|
-
// to match. The matching rules are defined for each header field
|
|
341
|
-
// in Section 20.
|
|
342
|
-
const headerKeysA = Object.keys(a.headers);
|
|
343
|
-
const headerKeysB = Object.keys(b.headers);
|
|
344
|
-
|
|
345
|
-
// No need to check if no headers
|
|
346
|
-
if (headerKeysA.length !== 0 || headerKeysB.length !== 0) {
|
|
347
|
-
|
|
348
|
-
// Must have same number of headers
|
|
349
|
-
if (headerKeysA.length !== headerKeysB.length) {
|
|
350
|
-
return false;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
// Must have same headers
|
|
354
|
-
const intersection = headerKeysA.filter(x => headerKeysB.includes(x));
|
|
355
|
-
if (intersection.length !== headerKeysB.length) {
|
|
356
|
-
return false;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
// FIXME: Not to spec. But perhaps not worth fixing?
|
|
360
|
-
// Must have same header values
|
|
361
|
-
// It seems too much to consider multiple headers with same name.
|
|
362
|
-
// It seems too much to compare two header params according to the rule of each header.
|
|
363
|
-
// We'll assume a single header and compare them string to string...
|
|
364
|
-
if (!intersection.every(key => a.headers[key].length && b.headers[key].length && a.headers[key][0] === b.headers[key][0])) {
|
|
365
|
-
return false;
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
return true;
|
|
370
|
-
}
|
package/src/lib/sip.js/index.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
// Helpful name and version exports
|
|
3
|
-
import { LIBRARY_VERSION } from "./version";
|
|
4
|
-
const version = LIBRARY_VERSION;
|
|
5
|
-
const name = "sip.js";
|
|
6
|
-
export { name, version };
|
|
7
|
-
|
|
8
|
-
// Export api
|
|
9
|
-
export * from "./api";
|
|
10
|
-
|
|
11
|
-
// Export grammar
|
|
12
|
-
export * from "./grammar";
|
|
13
|
-
|
|
14
|
-
// Export namespaced core
|
|
15
|
-
import * as Core from "./core";
|
|
16
|
-
export { Core };
|
|
17
|
-
|
|
18
|
-
// Export namespaced web
|
|
19
|
-
import * as Web from "./platform/web";
|
|
20
|
-
export { Web };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
See [documentation](../.././../docs/react-native.md).
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
import { SessionDescriptionHandlerModifier } from "../../../api";
|
|
2
|
-
|
|
3
|
-
const stripPayload = (sdp: string, payload: string): string => {
|
|
4
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5
|
-
const mediaDescs: Array<any> = [];
|
|
6
|
-
|
|
7
|
-
const lines: Array<string> = sdp.split(/\r\n/);
|
|
8
|
-
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10
|
-
let currentMediaDesc: any;
|
|
11
|
-
for (let i = 0; i < lines.length;) {
|
|
12
|
-
const line: string = lines[i];
|
|
13
|
-
if (/^m=(?:audio|video)/.test(line)) {
|
|
14
|
-
currentMediaDesc = {
|
|
15
|
-
index: i,
|
|
16
|
-
stripped: []
|
|
17
|
-
};
|
|
18
|
-
mediaDescs.push(currentMediaDesc);
|
|
19
|
-
} else if (currentMediaDesc) {
|
|
20
|
-
const rtpmap = /^a=rtpmap:(\d+) ([^/]+)\//.exec(line);
|
|
21
|
-
if (rtpmap && payload === rtpmap[2]) {
|
|
22
|
-
lines.splice(i, 1);
|
|
23
|
-
currentMediaDesc.stripped.push(rtpmap[1]);
|
|
24
|
-
continue; // Don't increment 'i'
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
i++;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
for (const mediaDesc of mediaDescs) {
|
|
32
|
-
const mline: Array<string> = lines[mediaDesc.index].split(" ");
|
|
33
|
-
|
|
34
|
-
// Ignore the first 3 parameters of the mline. The codec information is after that
|
|
35
|
-
for (let j = 3; j < mline.length;) {
|
|
36
|
-
if (mediaDesc.stripped.indexOf(mline[j]) !== -1) {
|
|
37
|
-
mline.splice(j, 1);
|
|
38
|
-
continue;
|
|
39
|
-
}
|
|
40
|
-
j++;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
lines[mediaDesc.index] = mline.join(" ");
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
return lines.join("\r\n");
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
const stripMediaDescription = (sdp: string, description: string): string => {
|
|
50
|
-
const descriptionRegExp = new RegExp("m=" + description + ".*$", "gm");
|
|
51
|
-
const groupRegExp = new RegExp("^a=group:.*$", "gm");
|
|
52
|
-
|
|
53
|
-
if (descriptionRegExp.test(sdp)) {
|
|
54
|
-
let midLineToRemove;
|
|
55
|
-
sdp = sdp.split(/^m=/gm).filter((section) => {
|
|
56
|
-
if (section.substr(0, description.length) === description) {
|
|
57
|
-
midLineToRemove = section.match(/^a=mid:.*$/gm);
|
|
58
|
-
if (midLineToRemove) {
|
|
59
|
-
const step = midLineToRemove[0].match(/:.+$/g);
|
|
60
|
-
if (step) {
|
|
61
|
-
midLineToRemove = step[0].substr(1);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
return false;
|
|
65
|
-
}
|
|
66
|
-
return true;
|
|
67
|
-
}).join("m=");
|
|
68
|
-
const groupLine = sdp.match(groupRegExp);
|
|
69
|
-
if (groupLine && groupLine.length === 1) {
|
|
70
|
-
let groupLinePortion = groupLine[0];
|
|
71
|
-
// eslint-disable-next-line no-useless-escape
|
|
72
|
-
const groupRegExpReplace = new RegExp("\ *" + midLineToRemove + "[^\ ]*", "g");
|
|
73
|
-
groupLinePortion = groupLinePortion.replace(groupRegExpReplace, "");
|
|
74
|
-
sdp = sdp.split(groupRegExp).join(groupLinePortion);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
return sdp;
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Modifier.
|
|
82
|
-
* @public
|
|
83
|
-
*/
|
|
84
|
-
export function stripTcpCandidates(description: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit> {
|
|
85
|
-
description.sdp = (description.sdp || "").replace(/^a=candidate:\d+ \d+ tcp .*?\r\n/img, "");
|
|
86
|
-
return Promise.resolve(description);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Modifier.
|
|
91
|
-
* @public
|
|
92
|
-
*/
|
|
93
|
-
export function stripTelephoneEvent(description: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit> {
|
|
94
|
-
description.sdp = stripPayload(description.sdp || "", "telephone-event");
|
|
95
|
-
return Promise.resolve(description);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Modifier.
|
|
100
|
-
* @public
|
|
101
|
-
*/
|
|
102
|
-
export function cleanJitsiSdpImageattr(description: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit> {
|
|
103
|
-
description.sdp = (description.sdp || "").replace(/^(a=imageattr:.*?)(x|y)=\[0-/gm, "$1$2=[1:");
|
|
104
|
-
return Promise.resolve(description);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* Modifier.
|
|
109
|
-
* @public
|
|
110
|
-
*/
|
|
111
|
-
export function stripG722(description: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit> {
|
|
112
|
-
description.sdp = stripPayload(description.sdp || "", "G722");
|
|
113
|
-
return Promise.resolve(description);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* Modifier.
|
|
118
|
-
* @public
|
|
119
|
-
*/
|
|
120
|
-
export function stripRtpPayload(payload: string): SessionDescriptionHandlerModifier {
|
|
121
|
-
return (description: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit> => {
|
|
122
|
-
description.sdp = stripPayload(description.sdp || "", payload);
|
|
123
|
-
return Promise.resolve(description);
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Modifier.
|
|
129
|
-
* @public
|
|
130
|
-
*/
|
|
131
|
-
export function stripVideo(description: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit> {
|
|
132
|
-
description.sdp = stripMediaDescription(description.sdp || "", "video");
|
|
133
|
-
return Promise.resolve(description);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Modifier.
|
|
138
|
-
* @public
|
|
139
|
-
*/
|
|
140
|
-
export function addMidLines(description: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit> {
|
|
141
|
-
let sdp = description.sdp || "";
|
|
142
|
-
if (sdp.search(/^a=mid.*$/gm) === -1) {
|
|
143
|
-
const mlines = sdp.match(/^m=.*$/gm);
|
|
144
|
-
const sdpArray = sdp.split(/^m=.*$/gm);
|
|
145
|
-
if (mlines) {
|
|
146
|
-
mlines.forEach((elem, idx) => {
|
|
147
|
-
mlines[idx] = elem + "\na=mid:" + idx;
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
sdpArray.forEach((elem, idx) => {
|
|
151
|
-
if (mlines && mlines[idx]) {
|
|
152
|
-
sdpArray[idx] = elem + mlines[idx];
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
sdp = sdpArray.join("");
|
|
156
|
-
description.sdp = sdp;
|
|
157
|
-
}
|
|
158
|
-
return Promise.resolve(description);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* The modifier that should be used when the session would like to place the call on hold.
|
|
163
|
-
* @param description - The description that will be modified.
|
|
164
|
-
*/
|
|
165
|
-
export function holdModifier(description: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit> {
|
|
166
|
-
if (!description.sdp || !description.type) {
|
|
167
|
-
throw new Error("Invalid SDP");
|
|
168
|
-
}
|
|
169
|
-
let sdp = description.sdp;
|
|
170
|
-
const type = description.type;
|
|
171
|
-
if (sdp) {
|
|
172
|
-
if (!/a=(sendrecv|sendonly|recvonly|inactive)/.test(sdp)) {
|
|
173
|
-
sdp = sdp.replace(/(m=[^\r]*\r\n)/g, "$1a=sendonly\r\n");
|
|
174
|
-
} else {
|
|
175
|
-
sdp = sdp.replace(/a=sendrecv\r\n/g, "a=sendonly\r\n");
|
|
176
|
-
sdp = sdp.replace(/a=recvonly\r\n/g, "a=inactive\r\n");
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
return Promise.resolve({ sdp, type });
|
|
180
|
-
}
|