3

I am using

function call() {
    // get the phone number to connect the call to
    params = {"PhoneNumber": $("#number").val()};
    Twilio.Device.connect(params);
}

to make a call and

function mute() {
    connection.mute(true);
} 

to mute a call.

This works for incoming call but does not work for outgoing calls.

Can anyone assist?

Ihor Dobrovolskyi
  • 1,241
  • 9
  • 19
nick
  • 31
  • 1

1 Answers1

2

I just had the same issue working on outgoing calls.

What worked for me was naming the connection, and then muting that.

For example:

var connection = Twilio.Device.connect(params);

function mute() {
    connection.mute(true);
} 

Before when it wasn't named, it didn't work. Setting it to the connection variable got it working for me.

Hope that helps!

Paolo Broccardo
  • 1,942
  • 6
  • 34
  • 51