dialPhone

View as Markdown

dialPhone

  • dialPhone(params): Promise<Call> - See Call for more details.

Makes an outbound call to a PSTN number.

Parameters

NameTypeDescription
paramsObject-
params.from?stringThe party the call is coming from. Must be a SignalWire number or SIP endpoint that you own.
params.maxPricePerMinute?numberThe maximum price in USD acceptable for the call to be created. If the rate for the call is greater than this value, the call will not be created. If not set, all calls will be created. Price can have a maximum of four decimal places, i.e. 0.0075.
params.timeout?numberThe time, in seconds, the call will ring before it is considered unanswered.
params.tostringThe party you are attempting to call.

Returns

Promise<Call> - See Call for more details.

A call object.

Example

1try {
2 const call = await client.dialPhone({
3 from: "+YYYYYYYYYY",
4 to: "+XXXXXXXXXX",
5 timeout: 30,
6 });
7} catch (e) {
8 console.log("Call not answered.");
9}