telephony

Hi


I am working on a kind of VoIP app for the iOS and I am facing 2 problems.

1) I would like to monitor the telephony state of the device in order to be able to reject incoming VoIP call when the user is already talking on a telephony call.

I am already listening to the events from the CTCallCenter class, but the class does not deliver events when my application is in the background/suspended state.

Furthermore the currentCalls set is NOT updated when I check the state while my app in running in the background processing mode.

Is there any other way to get the telephony state while the application is running in the background mode ?


2) I would like to reject an incoming telephony call (with a busy tone) if the user is already talking on a VoIP call.

On the net I found suggestions to use the CTCallDisconnect API, but this is a private API.

Is there any public API in order to programmatically disconnect a telephony call ?

If this is not possible I would like to reduce the volume of the ringtone/audio notifications when the user is talking on a VoIP call. How can I do this ?


Thanks for the help

Domenico

Replies

> 1) I would like to monitor the telephony state of the device in order

> to be able to reject incoming VoIP call when the user is already

> talking on a telephony call.


That should be feasible. When your app resumes in order to process the ring indication (that it got via the old VoIP API or via the silent push you get from PushKit), create and start a new instance of CTCallCenter. If that shows that the user is on a call, don't post a ring indication to the user but rather communicate the busy state back to your VoIP infrastructure.


> 2) I would like to reject an incoming telephony call (with a busy

> tone) if the user is already talking on a VoIP call.


That's not possible on the current system. CT calls always take precedence over VoIP calls. If you'd like to see that change in the future, I encourage you to file a bug describing your requirements.


<https://developer.apple.com/bug-reporting/>


Please post your bug number, just for the record.


Share and Enjoy

--

Quinn "The Eskimo!"

Apple Developer Relations, Developer Technical Support, Core OS/Hardware

Hi Eskimo


Thanks for the help.


I reported the feature request as you suggested.


You can find this at the bug number:


21480046 - Reject an incoming telephony call (with a busy tone) if the user is already talking on a VoIP call


Best regards

Domenico

Any success on implementing this ?

Things change radically in this space with the introduction of CallKit in iOS 10. The changes are so significant that the earlier posts on this thread are basically irrelevant. If you’re building a VoIP app you should adopt CallKit and it’ll take care of this and many other issues.

If you’re not building a VoIP app then you need to post more details about what you’re attempting to do.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"