@vonage/voice
Version:
The Voice API lets you create outbound calls, control in-progress calls and get information about historical calls.
37 lines (35 loc) • 891 B
JavaScript
// lib/classes/Endpoint/PhoneEndpoint.ts
import debug from "debug";
debug("@vonage/voice")(
"This class is deprecated. Please update to use the PSTNEndpoint instead"
);
var PhoneEndpoint = class {
/**
* The type of the endpoint, which is always 'phone'.
*/
type;
/**
* The phone number associated with this PSTN endpoint.
*/
number;
/**
* Optional DTMF (Dual-Tone Multi-Frequency) answer to send when the call is answered.
*/
dtmfAnswer;
/**
* Create a new PhoneEndpoint instance.
*
* @param {string} phoneNumber - The phone number for the PSTN endpoint.
* @param {string} dtmfAnswer - Optional DTMF answer to send when the call is answered.
*/
constructor(phoneNumber, dtmfAnswer) {
this.type = "phone";
this.number = phoneNumber;
if (dtmfAnswer) {
this.dtmfAnswer = dtmfAnswer;
}
}
};
export {
PhoneEndpoint
};