All Projects → voximplant → unity_sdk

voximplant / unity_sdk

Licence: MIT license
Voximplant SDK for adding messaging, voice calling, video chat, and live streaming to Unity apps

Programming Languages

C#
18002 projects
objective c
16641 projects - #2 most used programming language
java
68154 projects - #9 most used programming language
C++
36643 projects - #6 most used programming language
Objective-C++
1391 projects
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to unity sdk

videochat
1 on 1 web video chat application
Stars: ✭ 38 (+123.53%)
Mutual labels:  videochat, voximplant
esip
ProcessOne SIP server component in Erlang
Stars: ✭ 14 (-17.65%)
Mutual labels:  voip
twilio-client.js
Twilio’s Programmable Voice JavaScript SDK
Stars: ✭ 63 (+270.59%)
Mutual labels:  voip
vsaudit
VOIP Security Audit Framework
Stars: ✭ 104 (+511.76%)
Mutual labels:  voip
kvazzup
Open software for HEVC video calls
Stars: ✭ 30 (+76.47%)
Mutual labels:  voip
SentryPeer
A distributed peer to peer list of bad actor IP addresses and phone numbers collected via a SIP Honeypot.
Stars: ✭ 108 (+535.29%)
Mutual labels:  voip
voice
Implementation of the Discord Voice API for discord.js and other JS/TS libraries
Stars: ✭ 310 (+1723.53%)
Mutual labels:  voip
app
studio link - app - mirror repo only -> issues now https://gitlab.com/studio.link/app
Stars: ✭ 56 (+229.41%)
Mutual labels:  voip
Core
Free, easy to setup PBX for small business based on Asterisk 16 core
Stars: ✭ 190 (+1017.65%)
Mutual labels:  voip
siphub
sip capture server by hep。work with OpenSIPS, Kamailo, and FreeSWITCH。
Stars: ✭ 23 (+35.29%)
Mutual labels:  voip
somleng
Open Source Implementation of Twilio's REST API
Stars: ✭ 33 (+94.12%)
Mutual labels:  voip
fonoster
🚀 The open-source alternative to Twilio
Stars: ✭ 5,072 (+29735.29%)
Mutual labels:  voip
unleash-client-java
Unleash client SDK for Java
Stars: ✭ 86 (+405.88%)
Mutual labels:  client-sdk
human-call-filter
Captcha for phone calls
Stars: ✭ 41 (+141.18%)
Mutual labels:  voip
simlar-android
Simlar for android
Stars: ✭ 61 (+258.82%)
Mutual labels:  voip
matrix-pstn-bridge
☎️ A Matrix Puppet bridge for the public telephone network that supports a number of VoIP providers (Twillo, Vonage, etc.). Sends and receives voice and SMS.
Stars: ✭ 25 (+47.06%)
Mutual labels:  voip
Kalbi
Kalbi - Golang Session Initiated Protocol Framework
Stars: ✭ 85 (+400%)
Mutual labels:  voip
quickstart-calls-directcall-ios
iOS sample for Direct Call of Sendbird Calls, guiding you to build a real-time voice and video calls quickly and easily.
Stars: ✭ 13 (-23.53%)
Mutual labels:  voip
VoIPPush
viop推送实现呼叫连续响铃效果
Stars: ✭ 88 (+417.65%)
Mutual labels:  voip
SIPTorch
A "SIP Torture" (RFC 4475) testing suite.
Stars: ✭ 54 (+217.65%)
Mutual labels:  voip

Voximplant Unity SDK

Demo

https://github.com/voximplant/unity_sdk_demo

Install

  1. Download latest Voximplant Unity SDK from GitHub Releases
  2. In Unity Editor, select Assets > Import Package > Custom Package... Navigate to the directory where you downloaded the Voximplant Unity SDK and select VoximplantSDK-*.unitypackage.
  3. Import all assets in the package.

Usage

To get started, you'll need to register a free Voximplant developer account.

Initialization

IClient is the main class of the SDK that provides access to Voximplant’s functions, the VoximplantSdk.GetClient() method is used to get its instance:

VoximplantSdk.Initialize();
_client = VoximplantSdk.GetClient();

_client.Connected += ClientOnConnected;
_client.LoginSuccess += ClientOnLoginSuccess;

Connect and log in to the Voximplant Cloud

The IClient.State property is used to get the current state of connection to the Voximplant cloud and perform the actions according to it.

private void LoginWithPassword(string login, string password) {
    _login = login;
    _password = password;
    if (_client.State == ClientState.Disconnected)
    {
        _client.Connect();
    }
    else if (_client.State == ClientState.Connected)
    {
        _client.Login(_login, _password);
    }
}

private void ClientOnConnected(IClient sender)
{
    _client.Login(_login, _password);
}

private void ClientOnLoginSuccess(IClient sender, LoginSuccessEventArgs e)
{
    _displayName = e.DisplayName;
}

Make calls

To initiate a call we need the IClient.Call() method. There is a CallSettings class which could contain custom data and extra headers (SIP headers).

Since the call can behave in different ways, there is a group of call events. They can be triggered by the ICall instance as the class contains all the functionality for call management.

private ICall MakeAudioCall(string number)
{
    var call = _client.Call(number, new CallSettings());
    if (call == null) return null;

    call.Disconnected += OnCallDisconnected;
    call.Failed += OnCallFailed;
    call.Connected += OnCallConnected;
    call.Ringing += OnCallRinging;
    call.AudioStarted += OnCallAudioStarted;

    call.Start();
    return call;
}

private void OnCallConnected(ICall sender, CallConnectedEventArgs e)
{
    Debug.Log("Call connected");
}

Receiving calls

IClient.IncomingCall event handler is used to get incoming calls.

There are two methods for an incoming call: answer and reject. An audio stream can be sent only after the answer method call.

VoximplantSdk.GetClient().IncomingCall += OnIncomingCall;

private void OnIncomingCall(IClient sender, IncomingCallEventArgs e)
{
    sender.Answer(new CallSettings());
}

Mid-call operations

Call can be put on/off hold

_call.Hold(true, error =>
{
    if (error != null)
    {
        Debug.LogError(error.Value.Message);
    }
});

Limitations

  • Supported Unity versions 2020, 2019 (LTS) and 2018 (LTS)
  • Android Multithreaded and Vulkan rendering are unsupported
  • iOS OpenGL rendering is unsupported
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].