0
votes

I am doing a POC and trying to make an outbound call through Twilio from Salesforce. I already have an account in Twilio.

I have configured TWIML apps and pointed the Requested URL with SFDC URL: https://xxxxxx.cs8.force.com/Dial.

I am able to connect from my SFDC softphone (laptop microphone) to the customer (To number) but I would like to connect through my From (Agent Physical Phone) to To phone #.

Even though I have hardcoded From Phone in the 'From','To','Url' => 'http://xxx-xxx.cs8.force.com/Dial parameter for Twilio Call, call is going from Softphone to Physical and not getting the call on my #(From).

I believe Twilio should connect both From and To #. Any help is greatly appreciated.

public class testtwilio {
String account = 'Axxxxxxx';
String token = 'dyyyyyyyyy';
public PageReference hello(){
    TwilioRestClient client = new TwilioRestClient(account, token);
    Map<String,String> properties = new Map<String,String> {            
        'To'   => '+11234567890',            '
        'From' => '+15555555555',            
        'Url' => 'https://demo.twilio.com/welcome/voice/'    };
TwilioCall Call = client.getAccount().getCalls().create(properties);return null;
}

}

1

1 Answers

0
votes

Twilio developer evangelist here.

You need to set the callerId on the <Dial> that you use to connect the outgoing call to your customer. That will make the number appear as your Twilio number.