@ringer-tel/ivy
Version:
TypeScript SDK for Ringer APIs
163 lines (152 loc) • 5.48 kB
text/typescript
/* tslint:disable */
/* eslint-disable */
/**
* Ringer Business API
* This API provides comprehensive endpoints for the Ringer Business system. It includes functionality for managing customer accounts, addresses, sites, phone numbers, payments, users, and other business resources. Operations typically require authentication and appropriate permissions.
*
* The version of the OpenAPI document: 1.0.5
* Contact: support@ringer.tel
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
/**
*
* @export
* @interface SipTrunkCore
*/
export interface SipTrunkCore {
/**
* A user-friendly name for the SIP Trunk.
* @type {string}
* @memberof SipTrunkCore
*/
name: string;
/**
* Username for SIP registration/authentication. Can be system-generated if omitted on create.
* @type {string}
* @memberof SipTrunkCore
*/
login?: string;
/**
* Password for SIP registration. System-generated if omitted on create. Not returned on GET.
* @type {string}
* @memberof SipTrunkCore
*/
password?: string | null;
/**
* Indicates if the SIP Trunk is active.
* @type {boolean}
* @memberof SipTrunkCore
*/
active?: boolean;
/**
* Maximum number of concurrent call channels allowed for this trunk.
* @type {number}
* @memberof SipTrunkCore
*/
channelLimit?: number;
/**
* Optional. IP address and port (e.g., 63.211.239.14:5060) to send inbound calls to, bypassing registration.
* @type {string}
* @memberof SipTrunkCore
*/
contactIp?: string | null;
/**
* Access Control List (IP address or range) restricting where this trunk can connect from/to.
* @type {string}
* @memberof SipTrunkCore
*/
acl?: string | null;
/**
* Default Caller ID name for outbound calls from this trunk.
* @type {string}
* @memberof SipTrunkCore
*/
callerIdName?: string | null;
/**
* Default Caller ID number for outbound calls from this trunk.
* @type {string}
* @memberof SipTrunkCore
*/
callerIdNumber?: string | null;
/**
* Disable RFC3389 Comfort Noise if hardware does not support it.
* @type {boolean}
* @memberof SipTrunkCore
*/
disableComfortNoise?: boolean;
/**
* Timeout in seconds for call attempts or registration.
* @type {number}
* @memberof SipTrunkCore
*/
timeout?: number;
/**
* System code for the failover destination if the trunk is unavailable.
* @type {string}
* @memberof SipTrunkCore
*/
failOverDestinationCode?: string | null;
/**
* Optional. Identifier of a user primarily associated with this SIP trunk.
* @type {number}
* @memberof SipTrunkCore
*/
userId?: number | null;
}
/**
* Check if a given object implements the SipTrunkCore interface.
*/
export function instanceOfSipTrunkCore(value: object): value is SipTrunkCore {
if (!('name' in value) || value['name'] === undefined) return false;
return true;
}
export function SipTrunkCoreFromJSON(json: any): SipTrunkCore {
return SipTrunkCoreFromJSONTyped(json, false);
}
export function SipTrunkCoreFromJSONTyped(json: any, ignoreDiscriminator: boolean): SipTrunkCore {
if (json == null) {
return json;
}
return {
'name': json['name'],
'login': json['login'] == null ? undefined : json['login'],
'password': json['password'] == null ? undefined : json['password'],
'active': json['active'] == null ? undefined : json['active'],
'channelLimit': json['channel_limit'] == null ? undefined : json['channel_limit'],
'contactIp': json['contact_ip'] == null ? undefined : json['contact_ip'],
'acl': json['acl'] == null ? undefined : json['acl'],
'callerIdName': json['caller_id_name'] == null ? undefined : json['caller_id_name'],
'callerIdNumber': json['caller_id_number'] == null ? undefined : json['caller_id_number'],
'disableComfortNoise': json['disable_comfort_noise'] == null ? undefined : json['disable_comfort_noise'],
'timeout': json['timeout'] == null ? undefined : json['timeout'],
'failOverDestinationCode': json['fail_over_destination_code'] == null ? undefined : json['fail_over_destination_code'],
'userId': json['user_id'] == null ? undefined : json['user_id'],
};
}
export function SipTrunkCoreToJSON(json: any): SipTrunkCore {
return SipTrunkCoreToJSONTyped(json, false);
}
export function SipTrunkCoreToJSONTyped(value?: SipTrunkCore | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'name': value['name'],
'login': value['login'],
'password': value['password'],
'active': value['active'],
'channel_limit': value['channelLimit'],
'contact_ip': value['contactIp'],
'acl': value['acl'],
'caller_id_name': value['callerIdName'],
'caller_id_number': value['callerIdNumber'],
'disable_comfort_noise': value['disableComfortNoise'],
'timeout': value['timeout'],
'fail_over_destination_code': value['failOverDestinationCode'],
'user_id': value['userId'],
};
}