UNPKG

@vonage/voice

Version:

The Voice API lets you create outbound calls, control in-progress calls and get information about historical calls.

41 lines 1.43 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.PhoneEndpoint = void 0; const debug_1 = __importDefault(require("debug")); (0, debug_1.default)('@vonage/voice')('This class is deprecated. Please update to use the PSTNEndpoint instead'); /** * Represents a PSTN (Public Switched Telephone Network) endpoint for making phone calls. * @deprecated This class is deprecated. Please update to use the PSTNEndpoint type instead */ class PhoneEndpoint { /** * 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; } } } exports.PhoneEndpoint = PhoneEndpoint; //# sourceMappingURL=PhoneEndpoint.js.map