Evo Voice

<back to all web services

GetAppConfig

Gets the config for the app including webRTC token

Requires Authentication
Required role:User
The following routes are available for this service:
GET/app/config
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*


/**
* Gets the config for the app including webRTC token
*/
@Api(Description="Gets the config for the app including webRTC token")
open class GetAppConfig : IGet
{
    /**
    * The type of device you are requesting config for
    */
    @ApiMember(Description="The type of device you are requesting config for")
    open var deviceType:DeviceTypes? = null

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

    /**
    * Use a specific application SID
    */
    @ApiMember(Description="Use a specific application SID")
    open 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.")
    open 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")
    open var endpointId:String? = null

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

enum class ThirdPartyPhoneSystemTypes
{
    Demo,
    Sip,
}

open class ThirdPartySipSettings
{
    open var accounts:ArrayList<ThirdPartySipAccountSettings>? = null
}

open class ThirdPartySipAccountSettings
{
    open var number:String? = null
    open var agent:String? = null
    open var authName:String? = null
    open var userName:String? = null
    open var displayName:String? = null
    open var password:String? = null
    open var userDomain:String? = null
    open var registrationExpires:Int? = null
    open var transportType:TransportTypes? = null
    open var localIP:String? = null
    open var localPort:Int? = null
    open var sipServer:String? = null
    open var sipServerPort:Int? = null
    open var outboundServer:String? = null
    open var outboundServerPort:Int? = null
    open var stunServer:String? = null
    open var stunPort:Int? = null
    open var audioPlaybackDeviceName:String? = null
    open var audioRecordingDeviceName:String? = null
    open var audioCodecs:ArrayList<AudioCodecTypes>? = null
    open 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
{
    open var extension:String? = null
}

Kotlin GetAppConfig DTOs

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

HTTP + CSV

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

GET /app/config HTTP/1.1 
Host: team.evovoice.io 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
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,"enableAssistants":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"}}}