All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- BREAKING:
JsSIP
is no longer a direct dependency, because SIP handling is now handled via SIP adapters.
You can choose now which SIP library to use in combination with ng112-js. For this reason a new propertysipAdapterFactory
has been introduced onAgent
.
You need to pass a factory function that returns an appropriate SIP adapter.
Examples and pre-existing adapter packages can be found inREADME.md
or at./example/snippets/
. - BREAKING: Messages are instances of class
Message
. This allows for more performant parsing of data. Setting and getting of properties has changed, so have a look at the docs to notice all changes.
Some of the new features:- Resending of local messages that have run into an error
- Support for
html
data - Lazy evalutation of
text
,html
,location
,vcard
...
- BREAKING: New object for message send errors:
MessageError
instead of former objectMessageFailedEvent
Object has different properties and also includes the raw SIP error generated by the sip stack. - BREAKING:
DEC112Specifics
constructor uses objectDEC112Config
instead of individual parameters for initialization. - BREAKING: Updating
Agent
's heartbeat interval with invalid values will not result in an exception, but will rather log an error message. - BREAKING:
Agent
'sdebug
is now an object. This way, separate log-levels and handlers for in-library log messages and log messages created by the SIP adapter can be specified. - BREAKING:
NamespacedConversation
has been renamed toMapper
. Instance methodgetName
has been renamed togetNamespace
and now returnsenum
Namespace
instead of astring
. This in combination with the agent's new functiongetMapper
lets you identify the used mapper of a conversation and opens the ability to resume conversations (e.g. after a PSAP breakdown) with the correct mapper. - BREAKING: Agent disposal can be configured by disposal object instead of grace period alone. Also open conversations will not be closed automatically on dispose. Property
stopOpenConversations
needs to be set totrue
to stop all open conversations. - BREAKING:
ConversationState
(enum
value) now usesstring
instead ofinteger
values. If you've already used theenum
values for distinguishing states you don't need to change your implementation. Only if you've usedinteger
values e.g. for comparison, you'll have to change your implementation. - BREAKING: Outgoing messages are rejected immediately once the conversation has stopped.
- Internal states are now handled by state machine
@xstate/fsm
which is now a dependency of ng112-js. This gives us more reliable and testable state management. - Improved build process, enabling better tree shaking for dependency
pidf-lo
. - Conversations in DEC112 environments are only started after an initial message sent by the PSAP.
- A second parameter is passed to conversation listeners that contains the raw SIP event.
- Conversations can be set from the agent. This allows PSAP environments to easily restore conversations that have not ended yet.
- Target URI for conversations can now be set from the outside even after the conversation was started.
debug
will now also accept a callback function that is called for all log messages.
This allows for the connection of any other logging facility.
- Agent mode that can be used to indicate an app is running in the background.
- Support for sending
Message
specific VCards and locations instead of being tied to the globalAgent
's VCard and location. - Support for DIDs.
- Support for parsing extra multiparts.
- Support for History-Info header.
- Support platforms without support for
globalThis
. - Support for accessing raw SIP events. This enables accepting or rejecting the SIP message and allows for direct access of SIP headers.
Rejecting the initial message of a conversation leads to the conversation being set closed automatically. - Support for sending custom SIP headers.
- Support for tagging messages.
- Support for starting a conversation with a custom message id.
- Support for customizing domains in SIP headers via
EmergencySpecifics
. - Support for gender identity in VCards.
- Support for retreiving last sent message id from conversation. This allows for easier conversation restore.
- Ability to remove listeners (conversation, state, message).
- Ability to specify endpoint type for agent and each individual conversation.
- Ability to specify custom user agent headers.
- Ability to override agent's default display name at
Conversation
level. - Interfaces for easily fetching SIP information like TO, FROM and ROUTE headers.
- Experimental support for binaries.
- Experimental support for dequeue registration on top of SIP subscribe/notify.
- Conversation state only changes if the state value itself changes. If origin is different but state is the same, it won't trigger a state change.
- Message start logic in PSAP environments.
- VCard firstname and lastname. They were switched without being noticed by anyone, oops :-)
- Fixed typo for language property in DEC112 Mapper.
- START message can now only be sent once.
- Correct parsing of SIP Reply-To header (especially if they contain a NameAddressHeader)
- Don't consider apostrophs as part of mime boundary.
- Sending duplicate start messages if endpoint type is CLIENT
- User agent string representation
- Ability to customize SIP user agent
- VCard firstname and lastname. They were switched without being noticed by anyone, oops :-)
- Missing export for
Header
- Support for custom SIP headers
- Possibility to further configure JsSIP user agent
- BACKPORT [2.0.0]: Support for gender identity element in VCards
- Updated dependencies (pidf-lo, typedoc ...)
- Package
xmldom
was outdated. Changed it to@xmldom/xmldom
.
- BACKPORT [2.0.0]: Handling of missing remote message ids.
- BACKPORT [2.0.0]: Conversation state on immediate stop.
- BACKPORT [2.0.0]: Conversation start handling in DEC112 environments.
- BACKPORT [2.0.0]: Support for removal of message listeners.
- BACKPORT [2.0.0]: Support for integration tests.
- BACKPORT [2.0.0]: State handling for conversations.
- Handling of conversations that are in error state
- Restore of conversations. A proper restore now also contains the previously used message id.
- Better example snippet for converation restore.
- Removed @types/jssip and fixed JsSIP type errors.
- Logging for heartbeat messages.
- BACKPORT [2.0.0]: Support for History-Info header.
- Fixed behaviour for incoming conversations, if no conversation listeners are registered.
These incoming SIP messages will be dropped as they could lead to unexpected agent states, where a conversation is opened that was not expected.
- Missing export for
LogLevel
- Boolean as possible value for
Agent
'sdebug
property for specifying verbose logging
- BREAKING: Renamed property
debugMode
todebug
inAgent
constructor.
debug
will now also accept a callback function that is called for all log messages.
This allows for the connection of any other logging facility. - BREAKING: Unified
Conversation
'sstart
,stop
andsendMessage
function.
All of these functions now use the same arguments assendMessage
already did.
This allows for the use ofextraParts
,uris
and other properties forstart
andstop
function calls. - BREAKING: The agent's
conversation
property contains only calls that are not in stateSTOPPED
.
Once calls are stopped they are removed from this list.
This should limit memory consumption if ng112-js is used in long running applications with heavy load.
- Property
uniqueId
in messages that is unique across all messages and conversations within ng112-js - Auto-close of open calls on agent disposal
- Configurable grace period for agent disposal
- More detailled logging on message errors.
- More extensive VCard tests
- Missing export for
AgentState
- JsSIP version in UserAgent string
- Expose package version
- Fixed heartbeat for continued conversations
- Unfixed version for JsSIP. Bug with Expo was fixed in version 3.7.3
- DEC112 language header
- TypeDoc for VCard helper methods
- TypeDoc for DEC112Specifics
- Handling of unknown VCard elements
- Updated README
- Ability to send custom MIME parts
- VCard's XML implementation. DOM standard (used by
xmldom
) uses only supportschildNodes
notchildren
- Note in VCards
- Typo in agent's
setHeartbeatInterval
- Heartbeat can also be enabled/disabled/updated while a conversation is already ongoing
- Less restrictive heartbeat interval settings
- Ability to call
setHeartbeatInterval
without parameter, thus resetting it to the default value
- Fixed jssip version to 3.5.11. This is due to an incompatibility of JsSIP 3.7.3 with Expo.
- Only send location updates if they are really updated on DEC112 environments
- Correct multipart message if no multiparts are available
- More resilient handling of invalid SimpleLocations
- Always send location updates on DEC112 environments
- Optionally load jssip-node-websocket, if available, on node environments
- Send empty multipart body if no changes to location or VCard happened and if text and URIs are empty
- Export for
MessageState
- Included
jssip-node-websocket
as peer dependency and re-enabled differentiation for websocket implementation (node vs. browser)
- Unhandled promise error while messages with invalid location or VCard
- JsSIP version in user agent
- Legacy PIDF-LO support for DEC112 environments
- BREAKING CHANGE: MessageOrigin renamed to Origin
- BREAKING CHANGE: Conversation state is reflected by a new object rather than
ConversationState
alone (introduces new interfaceStateObject
) - Empty text message is sent in Multipart MIME body if no other part is specified
- Agent states and listener for agent states
- Message states
- Origin to conversation states
- Support for remote display name
- Support for only sending updated location or VCard information
- Custom ng112-js user agent
- Agent disposal
- Heartbeats stopping a conversation