Inbound call integration using twilio-client

32 views Asked by At

I've successfully implemented outbound call functionality using Twilio Client. However, I'm encountering challenges with implementing inbound call functionality. Could you please assist with this? Below is the code for outbound calls. Your help is greatly appreciated. Thank you.

<script>
import { Device } from 'twilio-client';

toggleMute() {
    this.muted = !this.muted;
    Device.activeConnection().mute(this.muted);
},

toggleCall: function() {
    if (!this.onPhone) {
        this.muted = false;
        this.onPhone = true;
        // make outbound call with current number
        // var n = '+' + this.countryCode + this.currentNumber.replace(/\D/g, '');
        this.connection = Device.connect({ number: this.callData.ProspNumber, callerID: this.user.Twilio });
    } else {
        // hang up call in progress
        Device.disconnectAll();
        this.$emit('hangupCall', false);
    }
}
</script>
0

There are 0 answers