phonic
Version:
[](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2FPhonic-Co%2Fphonic-node) [ • 2.2 kB
TypeScript
/**
* @example
* {
* project: "main",
* phone_number: "+15551234567",
* configuration_endpoint: {
* url: "https://api.example.com/config",
* headers: {
* "Authorization": "Bearer token123"
* },
* timeout_ms: 7000
* }
* }
*/
export interface AgentsAddCustomPhoneNumberRequest {
/** The name of the project containing the agent. Only used when `nameOrId` is a name. */
project?: string;
/** SIP address of the user's SIP trunk. Optional, but if provided, all three SIP headers (X-Sip-Address, X-Sip-Auth-Username, X-Sip-Auth-Password) must be provided. When these headers are provided, call transfers from the agent will use the provided SIP details. */
"X-Sip-Address"?: string;
/** SIP auth username. Optional, but if provided, all three SIP headers (X-Sip-Address, X-Sip-Auth-Username, X-Sip-Auth-Password) must be provided. When these headers are provided, call transfers from the agent will use the provided SIP details. */
"X-Sip-Auth-Username"?: string;
/** SIP auth password. Optional, but if provided, all three SIP headers (X-Sip-Address, X-Sip-Auth-Username, X-Sip-Auth-Password) must be provided. When these headers are provided, call transfers from the agent will use the provided SIP details. */
"X-Sip-Auth-Password"?: string;
/** The E.164 formatted phone number to add (e.g., "+15551234567"). */
phone_number: string;
/** When not `null`, the agent will call this endpoint to get configuration options for calls on this phone number. */
configuration_endpoint?: AgentsAddCustomPhoneNumberRequest.ConfigurationEndpoint | null;
}
export declare namespace AgentsAddCustomPhoneNumberRequest {
/**
* When not `null`, the agent will call this endpoint to get configuration options for calls on this phone number.
*/
interface ConfigurationEndpoint {
/** URL to call */
url: string;
/** Object of key-value pairs. */
headers?: Record<string, string> | undefined;
/** Timeout in milliseconds for the endpoint call. */
timeout_ms?: number | undefined;
}
}