Required role: | User |
GET | /app/config |
---|
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Voice.Api.App;
using Voice.Api.Endpoints;
using Voice.Api.Customers;
namespace Voice.Api.App
{
public partial class AppConfig
{
///<summary>
///The ID of this endpoint
///</summary>
[ApiMember(Description="The ID of this endpoint")]
public virtual string EndpointId { get; set; }
///<summary>
///The ID of the account
///</summary>
[ApiMember(Description="The ID of the account")]
public virtual string AccountId { get; set; }
///<summary>
///The customer ID associated with this user
///</summary>
[ApiMember(Description="The customer ID associated with this user")]
public virtual string CustomerId { get; set; }
///<summary>
///The access token for use with Twilio Voice
///</summary>
[ApiMember(Description="The access token for use with Twilio Voice")]
public virtual string AccessToken { get; set; }
///<summary>
///The access token's identity
///</summary>
[ApiMember(Description="The access token's identity")]
public virtual string Identity { get; set; }
///<summary>
///The email address of the user
///</summary>
[ApiMember(Description="The email address of the user")]
public virtual string EmailAddress { get; set; }
///<summary>
///The user's information
///</summary>
[ApiMember(Description="The user's information")]
public virtual AppUserInfo UserInfo { get; set; }
///<summary>
///The agent state (for call center users)
///</summary>
[ApiMember(Description="The agent state (for call center users)")]
public virtual AgentStates AgentState { get; set; }
///<summary>
///The agent state reason
///</summary>
[ApiMember(Description="The agent state reason")]
public virtual AgentStateReasons AgentStateReason { get; set; }
///<summary>
///The tabs for the app
///</summary>
[ApiMember(Description="The tabs for the app")]
public virtual List<Object> Tabs { get; set; }
///<summary>
///The app settings
///</summary>
[ApiMember(Description="The app settings")]
public virtual AppSettings AppSettings { get; set; }
///<summary>
///The phone settings for third party connectivity
///</summary>
[ApiMember(Description="The phone settings for third party connectivity")]
public virtual ThirdPartyPhoneSystemSettings ThirdPartyPhoneSystemSettings { get; set; }
}
public partial class AppUserInfo
{
///<summary>
///The user's first name
///</summary>
[ApiMember(Description="The user's first name")]
public virtual string FirstName { get; set; }
///<summary>
///The user's last name
///</summary>
[ApiMember(Description="The user's last name")]
public virtual string LastName { get; set; }
///<summary>
///Shortcut to the user's full name
///</summary>
[ApiMember(Description="Shortcut to the user's full name")]
public virtual string Name { get; set; }
///<summary>
///The URL to the user's avatar
///</summary>
[ApiMember(Description="The URL to the user's avatar")]
public virtual string AvatarUrl { get; set; }
}
public enum DeviceTypes
{
Web,
iOS,
Android,
}
///<summary>
///Gets the config for the app including webRTC token
///</summary>
[Api(Description="Gets the config for the app including webRTC token")]
public partial class GetAppConfig
: IGet
{
///<summary>
///The type of device you are requesting config for
///</summary>
[ApiMember(Description="The type of device you are requesting config for")]
public virtual DeviceTypes DeviceType { get; set; }
///<summary>
///Use a specific push credential SID
///</summary>
[ApiMember(Description="Use a specific push credential SID")]
public virtual string PushCredentialSid { get; set; }
///<summary>
///Use a specific application SID
///</summary>
[ApiMember(Description="Use a specific application SID")]
public virtual string ApplicationSid { get; set; }
///<summary>
///Is this device operating in a sandbox environment? IOS only.
///</summary>
[ApiMember(Description="Is this device operating in a sandbox environment? IOS only.")]
public virtual bool Sandbox { get; set; }
}
}
namespace Voice.Api.Customers
{
public partial class AppSettings
{
public virtual bool EnablePhoneNumberManagement { get; set; }
public virtual bool EnableDeviceManagement { get; set; }
public virtual bool EnableDialer { get; set; }
public virtual bool EnableCallHistory { get; set; }
public virtual bool EnableAssistants { get; set; }
public virtual bool ShowFileNameInMessageCenter { get; set; }
public virtual string ChakraTheme { get; set; }
public virtual string CustomCss { get; set; }
public virtual string PageTitle { get; set; }
public virtual string StringMappings { get; set; }
public virtual string LogoutUrl { get; set; }
public virtual string PortMyNumberUrl { get; set; }
}
}
namespace Voice.Api.Endpoints
{
public enum AgentStateReasons
{
Unknown,
SetByUser,
MissedCall,
SetBySystem,
}
public enum AgentStates
{
Unknown,
Ready,
NotReady,
LoggedOut,
WrapUp,
Outgoing,
Other,
}
public partial class ThirdPartyPhoneSystemSettings
{
public virtual ThirdPartyPhoneSystemTypes Type { get; set; }
public virtual ThirdPartySipSettings SipSettings { get; set; }
public virtual ThirdPartyDemoSettings DemoSettings { get; set; }
public partial class ThirdPartyDemoSettings
{
public virtual string Extension { get; set; }
}
public partial class ThirdPartySipSettings
{
public virtual List<ThirdPartySipAccountSettings> Accounts { get; set; }
public enum TransportTypes
{
UDP,
TLS,
TCP,
PERS,
}
public enum AudioCodecTypes
{
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,
}
public enum DtmfMethods
{
RFC2833,
INFO,
}
public partial class ThirdPartySipAccountSettings
{
public virtual string Number { get; set; }
public virtual string Agent { get; set; }
public virtual string AuthName { get; set; }
public virtual string UserName { get; set; }
public virtual string DisplayName { get; set; }
public virtual string Password { get; set; }
public virtual string UserDomain { get; set; }
public virtual int RegistrationExpires { get; set; }
public virtual TransportTypes TransportType { get; set; }
public virtual string LocalIP { get; set; }
public virtual int LocalPort { get; set; }
public virtual string SipServer { get; set; }
public virtual int SipServerPort { get; set; }
public virtual string OutboundServer { get; set; }
public virtual int OutboundServerPort { get; set; }
public virtual string StunServer { get; set; }
public virtual int StunPort { get; set; }
public virtual string AudioPlaybackDeviceName { get; set; }
public virtual string AudioRecordingDeviceName { get; set; }
public virtual List<AudioCodecTypes> AudioCodecs { get; set; }
public virtual DtmfMethods DTMFMethod { get; set; }
}
}
}
public enum ThirdPartyPhoneSystemTypes
{
Demo,
Sip,
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
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/jsonl
HTTP/1.1 200 OK Content-Type: text/jsonl 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"}}}