ZDK
Public Member Functions | List of all members
ZDK::ICallEventsHandler Class Referenceabstract
Inheritance diagram for ZDK::ICallEventsHandler:
ZDK::IEventHandle

Public Member Functions

virtual void OnCallStatusChanged (ZDK::Shared::Call call, ZDK::Shared::CallStatus status)=0
 Notify upon Call's status change. More...
 
virtual void OnCallExtendedError (ZDK::Shared::Call call, ZDK::Shared::ExtendedError error)=0
 Notify upon call extended error occurs. More...
 
virtual void OnCallNetworkStatistics (ZDK::Shared::Call call, ZDK::Shared::NetworkStatistics networkStatistics)=0
 Event for network statistics update. More...
 
virtual void OnCallNetworkQualityLevel (ZDK::Shared::Call call, int callChannel, int qualityLevel)=0
 Notify upon network quality level change. More...
 
virtual void OnCallSecurityLevelChanged (ZDK::Shared::Call call, ZDK::CallMediaChannel channel, ZDK::CallSecurityLevel level)=0
 Notify upon network quality level change. More...
 
virtual void OnCallDTMFResult (ZDK::Shared::Call call, ZDK::Shared::Result result)=0
 Notify upon DTMF call result. More...
 
virtual void OnCallTransferSucceeded (ZDK::Shared::Call call)=0
 Succesuful call transfer event. More...
 
virtual void OnCallTransferFailure (ZDK::Shared::Call call, ZDK::Shared::ExtendedError error)=0
 Failed call transfer event. More...
 
virtual void OnCallTransferStarted (ZDK::Shared::Call call, ZDK::Shared::String name, ZDK::Shared::String number, ZDK::Shared::String URI)=0
 Notify that call transfer is initiated. More...
 
virtual void OnCallZrtpFailed (ZDK::Shared::Call call, ZDK::Shared::ExtendedError error)=0
 ZRTP negotiation failed for a call. More...
 
virtual void OnCallZrtpSuccess (ZDK::Shared::Call call, ZDK::Shared::String zidHex, int knownPeer, int cacheMismatch, int peerKnowsUs, ZDK::ZRTPSASEncoding sasEncoding, ZDK::Shared::String sas, ZDK::ZRTPHashAlgorithm hash, ZDK::ZRTPCipherAlgorithm cipher, ZDK::ZRTPAuthTag authTag, ZDK::ZRTPKeyAgreement keyAgreement)=0
 ZRTP negotiation succeeded for a call. More...
 
virtual void OnCallZrtpSecondaryError (ZDK::Shared::Call call, int callChannel, ZDK::Shared::ExtendedError error)=0
 Secondary stream failed to negotiate ZRTP. More...
 
- Public Member Functions inherited from ZDK::IEventHandle
virtual ZDK::ZDKHandle EventHandle ()=0
 

Member Function Documentation

◆ OnCallDTMFResult()

virtual void ZDK::ICallEventsHandler::OnCallDTMFResult ( ZDK::Shared::Call  call,
ZDK::Shared::Result  result 
)
pure virtual

Notify upon DTMF call result.

The event notify upon DTMF (Dual-Tone Multi-Frequency) result for the call is returned

Parameters
[in]callThe call for which DTMF response is returned
[in]resultThe result
See also
ICall

◆ OnCallExtendedError()

virtual void ZDK::ICallEventsHandler::OnCallExtendedError ( ZDK::Shared::Call  call,
ZDK::Shared::ExtendedError  error 
)
pure virtual

Notify upon call extended error occurs.

Event fired when extended error in call occurs, providing detailed information for the error in the ExtendedError object.

Parameters
[in]callThe call that received the error
[in]errorThe error object that provides full information regarding the error
See also
ICall, IExtendedError

◆ OnCallNetworkQualityLevel()

virtual void ZDK::ICallEventsHandler::OnCallNetworkQualityLevel ( ZDK::Shared::Call  call,
int  callChannel,
int  qualityLevel 
)
pure virtual

Notify upon network quality level change.

The event notify when network quality level changes

Parameters
[in]callThe call which network quality level is changed
[in]callChannelThe call's channel
[in]qualityLevelThe quality level value
See also
ICall

◆ OnCallNetworkStatistics()

virtual void ZDK::ICallEventsHandler::OnCallNetworkStatistics ( ZDK::Shared::Call  call,
ZDK::Shared::NetworkStatistics  networkStatistics 
)
pure virtual

Event for network statistics update.

The event provides call's network statistic information

Parameters
[in]callThe call which network statics is provided
[in]networkStatisticsThe network statistics object with full statistic information
See also
ICall, INetworkStatistics

◆ OnCallSecurityLevelChanged()

virtual void ZDK::ICallEventsHandler::OnCallSecurityLevelChanged ( ZDK::Shared::Call  call,
ZDK::CallMediaChannel  channel,
ZDK::CallSecurityLevel  level 
)
pure virtual

Notify upon network quality level change.

The event notify when network quality level changes

Parameters
[in]callThe call which network quality level is changed
[in]callChannelThe call's channel
[in]qualityLevelThe quality level value
See also
ICall

◆ OnCallStatusChanged()

virtual void ZDK::ICallEventsHandler::OnCallStatusChanged ( ZDK::Shared::Call  call,
ZDK::Shared::CallStatus  status 
)
pure virtual

Notify upon Call's status change.

Notify upon call's related status information is changed

Parameters
[in]callThe call which status is changed
[in]statusWhat status the account is changed to
See also
IAccount , IAccountStatus

◆ OnCallTransferFailure()

virtual void ZDK::ICallEventsHandler::OnCallTransferFailure ( ZDK::Shared::Call  call,
ZDK::Shared::ExtendedError  error 
)
pure virtual

Failed call transfer event.

The event notify that the call transfer failed, it also provides the reason for the failure

Parameters
[in]callThe call which was transfered failed
[in]errorThe reason why it failed
See also
ICall, IOnCallTransferStarted, IOnCallTransferSucceeded

◆ OnCallTransferStarted()

virtual void ZDK::ICallEventsHandler::OnCallTransferStarted ( ZDK::Shared::Call  call,
ZDK::Shared::String  name,
ZDK::Shared::String  number,
ZDK::Shared::String  URI 
)
pure virtual

Notify that call transfer is initiated.

The event notify that the call transfer is initiated.The number to transfer to (and display name and optionally an URI, depending on the protocol) is given for informational purposes (or to help make the decision to accept or reject the transfer).

Parameters
[in]callThe call on which the transfer request came
[in]nameThe name of the transfer target
[in]numberThe number of the transfer target
[in]URIOptionally, protocol dependant URI of the transfer target
See also
ICall, IOnCallTransferStarted, IOnCallTransferSucceeded

◆ OnCallTransferSucceeded()

virtual void ZDK::ICallEventsHandler::OnCallTransferSucceeded ( ZDK::Shared::Call  call)
pure virtual

Succesuful call transfer event.

The event notify upon the call transfer has succeeded

Parameters
[in]callThe call which was transfered
See also
ICall, IOnCallTransferStarted, IOnCallTransferSucceeded

◆ OnCallZrtpFailed()

virtual void ZDK::ICallEventsHandler::OnCallZrtpFailed ( ZDK::Shared::Call  call,
ZDK::Shared::ExtendedError  error 
)
pure virtual

ZRTP negotiation failed for a call.

The ZRTP negotiation for a call has failed. Information about the failure can be found in the error parameter.

Parameters
[in]callThe call on which ZRTP failed
[in]errorInformation on why the ZRTP failed
See also
ICall, IExtendedError

◆ OnCallZrtpSecondaryError()

virtual void ZDK::ICallEventsHandler::OnCallZrtpSecondaryError ( ZDK::Shared::Call  call,
int  callChannel,
ZDK::Shared::ExtendedError  error 
)
pure virtual

Secondary stream failed to negotiate ZRTP.

Multistream ZRTP negotiation has failed for a secondary stream in a call.

ZRTP requires only the first RTP stream in a SIP call to be negotiated with a full Diffie-Hellman key exchange.

Due to the nature of ZRTP the primary RTP stream is an audio stream (to allow for voice confirmation of the SAS).

Subsequent streams in a call, like the video stream for example, will use a shorter version of ZRTP called "Multistream ZRTP" to negotiate the keys.

In case a SIP call is configured with both ZRTP and Video, after the ZRTP finishes securing the audio channel, the SIP call will automatically try to secure the video channel. If this secondary negotiation fails this event will be fired.

This error does NOT mean that the primary channel is suddenly broken. There are no side effects from this failure. The remote end might have a different opinion on the matter and might decide to close the call.

Parameters
[in]callThe call Id on which the secondary ZRTP negotiation failed
[in]callChannelThe type of the secondary RTP stream (usually video)
[in]errorDetailed error information about the failure
See also
ICall, IZRTPSASEncoding, IZRTPHashAlgorithm, IZRTPCipherAlgorithm, IZRTPAuthTag, IZRTPKeyAgreement

◆ OnCallZrtpSuccess()

virtual void ZDK::ICallEventsHandler::OnCallZrtpSuccess ( ZDK::Shared::Call  call,
ZDK::Shared::String  zidHex,
int  knownPeer,
int  cacheMismatch,
int  peerKnowsUs,
ZDK::ZRTPSASEncoding  sasEncoding,
ZDK::Shared::String  sas,
ZDK::ZRTPHashAlgorithm  hash,
ZDK::ZRTPCipherAlgorithm  cipher,
ZDK::ZRTPAuthTag  authTag,
ZDK::ZRTPKeyAgreement  keyAgreement 
)
pure virtual

ZRTP negotiation succeeded for a call.

The ZRTP negotiation for a call has succeeded. This does not always mean full security yet, due to the nature of ZRTP. Even though at this stage there is an active SRTP encryption, the keys used might be compromised.

To make sure the keys were safe the participants will need to do verbal comparison of a short string derived from the same calculations. In case the identify of the participants was confirmed by using secret data from previous calls SAS verification is not required.

If the peer in this call was known (found in the cache) the knownPeer parameter will be set to 1. If we meet this peer for the first time, the parameter will be set to 0.

If the peer knows us, the peerKnowsUs parameter will be set to 1. If the peer sees us for the first time, or they see some other problem with our identity, this flag will be set to 0.

Note that this information comes over the encrypted channel protected by ZRTP but there is a small chance the encryption was compromised (i.e. do not completely trust this flag).

If the peer is known and we agree on the retained secrets in our caches (both us and them), the cacheMismatch will be set to 0.

If the peer was known but we disagree on the retained secret there might be a security problem or one of us might have a corrupted cache file. In this case the cacheMismatch will be set to 1.

If the peer is not known, the cacheMismatch value is set to 1 to make it easier to check if we need SAS comparison by only looking at one parameter instead of making complex logic checks.

If the peer sent us an indication that they do not know us from previous calls (peerKnowsUs set to 0), cacheMismatch will also be set to 1 to force SAS verification.

The string that needs to be compared is called the Short Authentication String. It is returned in the sas parameter. Although sas is based on a binary hash, it is encoded in a human-readable form. The encoding type is returned in the sasEncoding paramter.

The ZRTP RFC recommends using the following warning text if SAS comparison is required for a known peer (i.e. when knownPeer is 1 but cacheMismatch is also set to 1):

Long version: We expected the other party to have a shared secret cached from a previous call, but they don't have it. This may mean your peer simply lost their cache of shared secrets, but it could also mean someone is trying to wiretap you. To resolve this question you must check the authentication string with your peer. If it doesn't match, it indicates the presence of a wiretapper.

Short version: Something's wrong. You must check the authentication string with your peer. If it doesn't match, it indicates the presence of a wiretapper.

Even if knownPeer is 1 and cacheMismatch is 0 and peerKnowsUs is 1, the SAS should be made available on demand from the user. If the user demands SAS verification and it fails,the call will be treated as insecure and the user will be alerted.

More information about the ZRTP negotiation is returned in the rest of the parameters.

cipher and authTag are of interest as they'll be employed by the SRTP encryption and it might be useful to display them somewhere.

hash and keyAgreement are the hash algorithm and the key agreement method used in this call.

Parameters
[in]callThe call
[in]zidHexThe peer's ZRTP ID (ZID) in HEX representation
[in]knownPeer1 if the peer is known, 0 if we see them for the first time
[in]cacheMismatch1 if the peer needs to be confirmed, 0 if the cache agrees
[in]peerKnowsUs1 if the peer knows us, 0 if they see us for the first time or if they have encountered a cache mismatch of their own
[in]sasEncodingThe SAS encoding
[in]sasThe Short Authentication String to be confirmed if needed. The string is in human readable form in the encoding sasEncoding
[in]hashThe chosen Hash Algorithm
[in]cipherThe chosen Cipher Algorithm (used in SRTP)
[in]authTagThe chosen Authentication Tag type (used in SRTP)
[in]keyAgreementThe key agreement method used for the negotiation
See also
ICall, IZRTPSASEncoding, IZRTPHashAlgorithm, IZRTPCipherAlgorithm, IZRTPAuthTag, IZRTPKeyAgreement

The documentation for this class was generated from the following file: