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 java.math.*
import java.util.*
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*


open class GetEndpointAppConfig
{
    /**
    * 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)")
    var endpointId:String? = null

    /**
    * 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")
    var endpointEmailAddress:String? = null

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

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

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

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

enum class DeviceTypes
{
    Web,
    IOS,
    Android,
}

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

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

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

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

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

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

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

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

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

    /**
    * The tabs for the app
    */
    @ApiMember(Description="The tabs for the app")
    var tabs:ArrayList<Object> = ArrayList<Object>()

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

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

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

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

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

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

enum class AgentStates
{
    Unknown,
    Ready,
    NotReady,
    LoggedOut,
    WrapUp,
    Outgoing,
    Other,
}

enum class AgentStateReasons
{
    Unknown,
    SetByUser,
    MissedCall,
    SetBySystem,
}

open class AppSettings
{
    var enablePhoneNumberManagement:Boolean? = null
    var enableDeviceManagement:Boolean? = null
    var enableDialer:Boolean? = null
    var enableCallHistory:Boolean? = null
    var showFileNameInMessageCenter:Boolean? = null
    var chakraTheme:String? = null
    var customCss:String? = null
    var pageTitle:String? = null
    var stringMappings:String? = null
    var logoutUrl:String? = null
    var portMyNumberUrl:String? = null
}

open class ThirdPartyPhoneSystemSettings
{
    @SerializedName("type") var Type:ThirdPartyPhoneSystemTypes? = null
    var sipSettings:ThirdPartySipSettings? = null
    var demoSettings:ThirdPartyDemoSettings? = null
}

enum class ThirdPartyPhoneSystemTypes
{
    Demo,
    Sip,
}

open class ThirdPartySipSettings
{
    var accounts:ArrayList<ThirdPartySipAccountSettings> = ArrayList<ThirdPartySipAccountSettings>()
}

open class ThirdPartySipAccountSettings
{
    var number:String? = null
    var agent:String? = null
    var authName:String? = null
    var userName:String? = null
    var displayName:String? = null
    var password:String? = null
    var userDomain:String? = null
    var registrationExpires:Int? = null
    var transportType:TransportTypes? = null
    var localIP:String? = null
    var localPort:Int? = null
    var sipServer:String? = null
    var sipServerPort:Int? = null
    var outboundServer:String? = null
    var outboundServerPort:Int? = null
    var stunServer:String? = null
    var stunPort:Int? = null
    var audioPlaybackDeviceName:String? = null
    var audioRecordingDeviceName:String? = null
    var audioCodecs:ArrayList<AudioCodecTypes> = ArrayList<AudioCodecTypes>()
    var dtmfMethod:DtmfMethods? = null
}

enum class TransportTypes
{
    Udp,
    Tls,
    Tcp,
    Pers,
}

enum class AudioCodecTypes(val value:Int)
{
    Pcmu(0),
    Gsm(3),
    Pcma(8),
    G722(9),
    G729(18),
    Ilbc(97),
    Amr(98),
    Amrwb(99),
    Speex(100),
    Dtmf(101),
    Speexwb(102),
    Isacwb(103),
    Isacswb(104),
    Opus(105),
    G7221(121),
    None(-1),
}

enum class DtmfMethods
{
    RfC2833,
    Info,
}

open class ThirdPartyDemoSettings
{
    var extension:String? = null
}

Kotlin 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
		}
	}
}