Jas_meet
Jas_meet

Reputation: 366

How to detect programmatically that call is on hold in iOS?

Is it possible to get any event or notification regarding Telephony Call Hold in iOS. CTCallCenter provides only following states :

CTCallStateDialing
CTCallStateIncoming 
CTCallStateConnected
CTCallStateDisconnected

Upvotes: 2

Views: 453

Answers (1)

Jas_meet
Jas_meet

Reputation: 366

We can use CallKit Framework to get the Call Hold event.

We need to conform to CXCallObserver Delegate

 [_callObserver setDelegate:self queue:nil];

where _callObserver is the instance of my CXCallObserver class

- (void)callObserver:(CXCallObserver *)callObserver callChanged:(CXCall *)call {
    if (call.isOnHold == true) {
        NSLog(@"Call is on hold");
        }
}

Upvotes: 1

Related Questions