简体   繁体   English

CallKit:调用UI控件

[英]CallKit: call UI controls

I'm playing with CallKit now. 我现在在玩CallKit。 I've downloaded SpeakerBox example and I have my own example that uses custom SIP and WebRTC and CallKit code from SpeakerBox. 我已经下载了SpeakerBox示例,并且我有自己的示例,该示例使用了来自SpeakerBox的自定义SIP和WebRTC和CallKit代码。

I've noticed that in SpeakerBox application if you start local dummy call and then have another incoming call (no difference, if it is simulated SpeakerBox incoming one or real mobile call) you will always (OK, in 99.9% of cases) get "Hold&Accept" and "End&Accept" buttons on UI call screen provided by system. 我注意到,在SpeakerBox应用程序中,如果您启动本地虚拟呼叫然后又有另一个来电(没有区别,如果是模拟的SpeakerBox来电或真实移动电话),您将始终(在99.9%的情况下)获得“系统提供的UI呼叫屏幕上的“保持并接受”和“结束并接受”按钮。

But for my application things are following: 但是对于我的应用程序,情况如下:

  • I start my VoIP application (Device A) and call some mobile number (Device B) 我启动VoIP应用程序(设备A)并拨打一些手机号码(设备B)
  • I accept call on Device B 我接受设备B上的通话
  • I call from another mobile number (Device C) to Device A 我从另一个手机号码(设备C)呼叫设备A
  • I'm getting system call UI, but only with "Accept" and "Decline" buttons. 我正在获取系统调用UI,但仅带有“接受”和“拒绝”按钮。 So I can't put current call to hold. 因此,我无法保留当前通话。

Is this something that can be configured in CallKit inside of application or in application itself? 是否可以在应用程序内部的CallKit或应用程序本身中进行配置?

It happens when you don't report to system (device A) that call was accepted by device B. Then if you accept the new incoming call from device C, you will end the current call with device B. 当您不向系统(设备A)报告该呼叫已被设备B接受时,就会发生这种情况。然后,如果您接受来自设备C的新来电,则您将以设备B结束当前呼叫。

To solve it, when device A is notified about that call was accepted by B, you must use this: 要解决此问题,当通知设备A B接受了该呼叫时,您必须使用此命令:

[provider reportOutgoingCallWithUUID:callUUID connectedAtDate:[NSDate date]];

where: 哪里:

  • provider is the CXProvider recieved on -(void) provider:(CXProvider *)provider performStartCallAction:(CXStartCallAction *)action provider是在-(void) provider:(CXProvider *)provider performStartCallAction:(CXStartCallAction *)action
  • callUUID is the UUID for the call in device A. callUUID是设备A中呼叫的UUID。

I hope that it helps you. 希望对您有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM