Thomas Rozmus
Thomas Rozmus

Reputation: 11

Twilio client: Outbound call isn't showing agent/caller name in 'From' field on call logs

I'm making an outbound call from my Twilio client to make outbound web browser calls. The calls are successfuly made and are fine, but...

Unfortunately I'm unable to see the agent/client name in your logs. I am currently using the agent/client name of 'Andy' but in Twilio's call logs it's showing the 'From' field as anonymous.

I have made a few changes to the JavaScript SDK and have added the following ''//CLIENT NAME clientName: 'Andy'' in the 'params' variable but this hasn't made a difference and the from field is still showing up as Anonymous in Twilio's call logs when I make an outbound call using the browser client.

How do I make this work? :(

Here is my code:

// Bind button to make call
  document.getElementById('button-call').onclick = function () {
    // get the phone number to connect the call to
    var params = {

      //CLIENT NAME
      clientName: 'Andy',

      //PARAMETERS THAT WILL BE SENT THROUGH TO TWILIO 
      To: document.getElementById('customer-number').value,

      //THIS IS CUSTOMER CALLER ID WE'RE PASSING TO THE OUTGOING TWIML AS THE CALLER ID TO USE FOR OUTGOING CALL
      CallerID: document.getElementById('source-number').value
    };


    console.log('Calling ' + params.To + '...');
    Twilio.Device.connect(params);
  };

Upvotes: 1

Views: 795

Answers (1)

philnash
philnash

Reputation: 73027

Twilio developer evangelist here.

The parameters you pass into Twilio.Device.connect are not recorded by Twilio, but they are sent on as parameters to the URL you set as your application URL.

Client names are actually only required for incoming calls that are routed to a client. If you were to setup a client for outgoing calls only you need not setup a name. As such, client names are not captured by Twilio in the call logs.

If you need to track which clients are making calls you can do so within your own application by reading the clientName that you set in Twilio.Device.connect from the webhook parameters and associating it with the CallSid (also available in the webhook parameters).

Upvotes: 1

Related Questions