Suggestions

close search

Support Multi-Device

A user can login on multiple devices. When the user has a call, all devices receive the call info but only one can proceed (answer, hangup or reject). Other devices only receive the call'signalingstates.

The call has been handled on a device

When the call has been handled on a device, your device can not answer, hangup or reject the call. You need update your UI when receives the SignalingStateEnded state of the call.

- (void)didChangeSignalingState:(StringeeCall *)stringeeCall signalingState:(SignalingState)signalingState reason:(NSString *)reason sipCode:(int)sipCode sipReason:(NSString *)sipReason {
    dispatch_async(dispatch_get_main_queue(), ^{
        switch (signalingState) {
            case SignalingStateEnded: {
                // Update your UI, reset your data... here
            } break;

            default:
                break;
        }
    });
}

Receives states of the call which handled on another device.

When the call has been handled on another device, to receive the call's states you must implement the didHandleOnAnotherDevice method of StringeeCallDelegate.
In.h file:

@interface ViewController : UIViewController <StringeeCallDelegate>

In .m file:

- (void)didHandleOnAnotherDevice:(StringeeCall *)stringeeCall signalingState:(SignalingState)signalingState reason:(NSString *)reason sipCode:(int)sipCode sipReason:(NSString *)sipReason {

    // Receive the call's states here. You should update your UI.
    dispatch_async(dispatch_get_main_queue(), ^{
        switch (signalingState) {
            case SignalingStateRinging: {

            } break;

            case SignalingStateAnswered: {

            } break;

            case SignalingStateBusy: {

            } break;

            case SignalingStateEnded: {

            } break;

            default:
                break;
        }
    });
}

For more information see SignalingState