2

I'm trying to call using Sinch API. When I call, I need to check if user Decline the call. For example: I'm device A and calling to Device B if device B declines my call, I can handle it and report to device A.

Thanks in Advance

Mustafa Mohammadi
  • 1,433
  • 1
  • 12
  • 25

1 Answers1

1

You can see the reason why a call ended in endCause on calldetails https://download.sinch.com/docs/iOS/latest/reference/html/Protocols/SINCallDetails.html#//api/name/endCause

SINCallDetails Protocol Reference

Conforms to NSObject Declared in SINCallDetails.h Overview

The SINCallDetails holds metadata about a call (SINCall).

startedTime required method

establishedTime required method

endedTime required method

endCause required method

Holds the cause of why a call ended, after it has ended. It may be one of the following:

@property (nonatomic, readonly) SINCallEndCause endCause
Discussion
SINCallEndCauseNone
SINCallEndCauseTimeout
SINCallEndCauseDenied
SINCallEndCauseNoAnswer
SINCallEndCauseError
SINCallEndCauseHungUp
SINCallEndCauseCanceled
SINCallEndCauseOtherDeviceAnswered
If the call has not ended yet, the value is SINCallEndCauseNone.

So when you recieve callDidEnd you just look at the details of the call that ended

cjensen
  • 2,703
  • 1
  • 16
  • 15
  • There is a list of them, but I don't know which one to use for call reject?CANCELED, DENIED, FAILURE, HUNG_UP, NO_ANSWER, NONE, OTHER_DEVICE_ANSWERED, TIMEOUT, TRANSFERRED . Thanks – Mustafa Mohammadi Oct 19 '16 at 12:45