简体   繁体   English

使用 Agora Kit 进行语音通话

[英]Make a voice call with Agora Kit

I'm using AgoraKit to build a voice call app 'VOIP' long side with CallKit.我正在使用AgoraKit通过CallKit构建一个语音呼叫应用程序“VOIP”长边。

When I'm trying to put the same channelId on 2 different devices and make join to channel, everything is going well.当我尝试将相同的channelId放在 2 个不同的设备上并加入频道时,一切都很顺利。

What I want to do is to make the first device call the second one by defining a UID, So the second device will ring when ever the first one called it.我想要做的是通过定义 UID 使第一个设备调用第二个设备,因此当第一个设备调用它时,第二个设备会响铃。

The problem is that I can't define a specific id for the device to call it, I looked up on Google for all the tutorials about joining a call with callKit even the code samples on Agora didn't help.问题是我无法为设备定义一个特定的 id 来调用它,我在谷歌上查找了所有关于使用 callKit 加入呼叫的教程,即使 Agora 上的代码示例也没有帮助。

In another word, I'm trying to make the same logic as Messenger app, when ever the user call another user it should be going to ring.换句话说,我试图制定与 Messenger 应用程序相同的逻辑,当用户呼叫另一个用户时,它应该会响铃。

Any idea would be helpful, thanks.任何想法都会有所帮助,谢谢。

This is the function inside of the VoIP where you can find a unique device id.这是 VoIP 内部的功能,您可以在其中找到唯一的设备 ID。 On the bases of this id you can make a call to other person.您可以根据此 ID 拨打电话给其他人。

 // Handle updated push credentials
    func pushRegistry(registry: PKPushRegistry!, didUpdatePushCredentials credentials: PKPushCredentials!, forType type: String!) {
        // Register VoIP push token (a property of PKPushCredentials) with server
    }

this is the link这是链接

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

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