Evo Voice

<back to all web services

GetEndpointAppConfig

Requires Authentication
Requires any of the roles:SystemAdministrator, Manager, Customer
The following routes are available for this service:
GET/endpoints/app/config
import Foundation
import ServiceStack

public class GetEndpointAppConfig : Codable
{
    /**
    * The endpoint whose config you want to get (this must be a User)
    */
    // @ApiMember(Description="The endpoint whose config you want to get (this must be a User)")
    public var endpointId:String?

    /**
    * The endpoint email address whose config you want to get (this must be a User) - EndpointId takes priority over this
    */
    // @ApiMember(Description="The endpoint email address whose config you want to get (this must be a User) - EndpointId takes priority over this")
    public var endpointEmailAddress:String?

    /**
    * The type of device you are requesting config for
    */
    // @ApiMember(Description="The type of device you are requesting config for")
    public var deviceType:DeviceTypes?

    /**
    * Use a specific push credential SID
    */
    // @ApiMember(Description="Use a specific push credential SID")
    public var pushCredentialSid:String?

    /**
    * Use a specific application SID
    */
    // @ApiMember(Description="Use a specific application SID")
    public var applicationSid:String?

    /**
    * Is this device operating in a sandbox environment? IOS only.
    */
    // @ApiMember(Description="Is this device operating in a sandbox environment? IOS only.")
    public var sandbox:Bool?

    required public init(){}
}

public enum DeviceTypes : String, Codable
{
    case Web
    case iOS
    case Android
}

public class AppConfig : Codable
{
    /**
    * The ID of this endpoint
    */
    // @ApiMember(Description="The ID of this endpoint")
    public var endpointId:String?

    /**
    * The ID of the account
    */
    // @ApiMember(Description="The ID of the account")
    public var accountId:String?

    /**
    * The customer ID associated with this user
    */
    // @ApiMember(Description="The customer ID associated with this user")
    public var customerId:String?

    /**
    * The access token for use with Twilio Voice
    */
    // @ApiMember(Description="The access token for use with Twilio Voice")
    public var accessToken:String?

    /**
    * The access token's identity
    */
    // @ApiMember(Description="The access token's identity")
    public var identity:String?

    /**
    * The email address of the user
    */
    // @ApiMember(Description="The email address of the user")
    public var emailAddress:String?

    /**
    * The user's information
    */
    // @ApiMember(Description="The user's information")
    public var userInfo:AppUserInfo?

    /**
    * The agent state (for call center users)
    */
    // @ApiMember(Description="The agent state (for call center users)")
    public var agentState:AgentStates?

    /**
    * The agent state reason
    */
    // @ApiMember(Description="The agent state reason")
    public var agentStateReason:AgentStateReasons?

    /**
    * The tabs for the app
    */
    // @ApiMember(Description="The tabs for the app")
    public var tabs:[Object] = []

    /**
    * The app settings
    */
    // @ApiMember(Description="The app settings")
    public var appSettings:AppSettings?

    /**
    * The phone settings for third party connectivity
    */
    // @ApiMember(Description="The phone settings for third party connectivity")
    public var thirdPartyPhoneSystemSettings:ThirdPartyPhoneSystemSettings?

    required public init(){}
}

public class AppUserInfo : Codable
{
    /**
    * The user's first name
    */
    // @ApiMember(Description="The user's first name")
    public var firstName:String?

    /**
    * The user's last name
    */
    // @ApiMember(Description="The user's last name")
    public var lastName:String?

    /**
    * Shortcut to the user's full name
    */
    // @ApiMember(Description="Shortcut to the user's full name")
    public var name:String?

    /**
    * The URL to the user's avatar
    */
    // @ApiMember(Description="The URL to the user's avatar")
    public var avatarUrl:String?

    required public init(){}
}

public enum AgentStates : String, Codable
{
    case Unknown
    case Ready
    case NotReady
    case LoggedOut
    case WrapUp
    case Outgoing
    case Other
}

public enum AgentStateReasons : String, Codable
{
    case Unknown
    case SetByUser
    case MissedCall
    case SetBySystem
}

public class AppSettings : Codable
{
    public var enablePhoneNumberManagement:Bool?
    public var enableDeviceManagement:Bool?
    public var enableDialer:Bool?
    public var enableCallHistory:Bool?
    public var showFileNameInMessageCenter:Bool?
    public var chakraTheme:String?
    public var customCss:String?
    public var pageTitle:String?
    public var stringMappings:String?
    public var logoutUrl:String?
    public var portMyNumberUrl:String?

    required public init(){}
}

public class ThirdPartyPhoneSystemSettings : Codable
{
    public var type:ThirdPartyPhoneSystemTypes?
    public var sipSettings:ThirdPartySipSettings?
    public var demoSettings:ThirdPartyDemoSettings?

    required public init(){}
}

public enum ThirdPartyPhoneSystemTypes : String, Codable
{
    case Demo
    case Sip
}

public class ThirdPartySipSettings : Codable
{
    public var accounts:[ThirdPartySipAccountSettings] = []

    required public init(){}
}

public class ThirdPartySipAccountSettings : Codable
{
    public var number:String?
    public var agent:String?
    public var authName:String?
    public var userName:String?
    public var displayName:String?
    public var password:String?
    public var userDomain:String?
    public var registrationExpires:Int?
    public var transportType:TransportTypes?
    public var localIP:String?
    public var localPort:Int?
    public var sipServer:String?
    public var sipServerPort:Int?
    public var outboundServer:String?
    public var outboundServerPort:Int?
    public var stunServer:String?
    public var stunPort:Int?
    public var audioPlaybackDeviceName:String?
    public var audioRecordingDeviceName:String?
    public var audioCodecs:[AudioCodecTypes] = []
    public var dtmfMethod:DtmfMethods?

    required public init(){}
}

public enum TransportTypes : String, Codable
{
    case UDP
    case TLS
    case TCP
    case PERS
}

public enum AudioCodecTypes : Int, Codable
{
    case PCMU = 0
    case GSM = 3
    case PCMA = 8
    case G722 = 9
    case G729 = 18
    case ILBC = 97
    case AMR = 98
    case AMRWB = 99
    case SPEEX = 100
    case DTMF = 101
    case SPEEXWB = 102
    case ISACWB = 103
    case ISACSWB = 104
    case OPUS = 105
    case G7221 = 121
    case NONE = -1
}

public enum DtmfMethods : String, Codable
{
    case RFC2833
    case INFO
}

public class ThirdPartyDemoSettings : Codable
{
    public var `extension`:String?

    required public init(){}
}


Swift GetEndpointAppConfig DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /endpoints/app/config HTTP/1.1 
Host: evovoice.io 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	endpointId: String,
	accountId: String,
	customerId: String,
	accessToken: String,
	identity: String,
	emailAddress: String,
	userInfo: 
	{
		firstName: String,
		lastName: String,
		name: String,
		avatarUrl: String
	},
	agentState: Unknown,
	agentStateReason: Unknown,
	tabs: 
	[
		{
			
		}
	],
	appSettings: 
	{
		enablePhoneNumberManagement: False,
		enableDeviceManagement: False,
		enableDialer: False,
		enableCallHistory: False,
		showFileNameInMessageCenter: False,
		chakraTheme: String,
		customCss: String,
		pageTitle: String,
		stringMappings: String,
		logoutUrl: String,
		portMyNumberUrl: String
	},
	thirdPartyPhoneSystemSettings: 
	{
		type: Demo,
		sipSettings: 
		{
			accounts: 
			[
				{
					number: String,
					agent: String,
					authName: String,
					userName: String,
					displayName: String,
					password: String,
					userDomain: String,
					registrationExpires: 0,
					transportType: UDP,
					localIP: String,
					localPort: 0,
					sipServer: String,
					sipServerPort: 0,
					outboundServer: String,
					outboundServerPort: 0,
					stunServer: String,
					stunPort: 0,
					audioPlaybackDeviceName: String,
					audioRecordingDeviceName: String,
					audioCodecs: 
					[
						PCMU
					],
					dtmfMethod: RFC2833
				}
			]
		},
		demoSettings: 
		{
			extension: String
		}
	}
}