Class Account
Object that represents a Linphone Account.
This object replaces the deprecated ProxyConfig. Use a AccountParams object to configure it.
Inherited Members
Namespace: Linphone
Assembly: cs.temp.dll.dll
Syntax
public class Account : LinphoneObject
Properties
AvpfEnabled
Indicates whether AVPF/SAVPF is being used for calls using this account.
Declaration
public bool AvpfEnabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean | true if AVPF/SAVPF is enabled, false otherwise. |
CallLogs
Returns the list of call logs for a given account.
This list must be freed after use.
Declaration
public IEnumerable<CallLog> CallLogs { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<CallLog> | The list of call logs . |
ChatRooms
Returns the list of chat rooms for a given account.
Declaration
public IEnumerable<ChatRoom> ChatRooms { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ChatRoom> | The list of chat rooms . |
ConferenceInformationList
Returns the list of conference information for a given account.
This list must be freed after use.
Declaration
public IEnumerable<ConferenceInfo> ConferenceInformationList { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ConferenceInfo> | The list of call logs . |
ContactAddress
Return the contact address of the account.
Declaration
public Address ContactAddress { get; set; }
Property Value
Type | Description |
---|---|
Address | a Address correspong to the contact address of the account. |
Core
Declaration
public Core Core { get; }
Property Value
Type | Description |
---|---|
Core |
Dependency
Get the dependency of a Account.
Declaration
public Account Dependency { get; set; }
Property Value
Type | Description |
---|---|
Account | The account this one is dependent upon, or null if not marked dependent. |
Error
Get the reason why registration failed when the account state is LinphoneRegistrationFailed.
Declaration
public Reason Error { get; }
Property Value
Type | Description |
---|---|
Reason | The Reason why registration failed for this account. |
ErrorInfo
Get detailed information why registration failed when the account state is LinphoneRegistrationFailed.
Declaration
public ErrorInfo ErrorInfo { get; }
Property Value
Type | Description |
---|---|
ErrorInfo | The ErrorInfo explaining why registration failed for this account. |
IsAvpfEnabled
Indicates whether AVPF/SAVPF is being used for calls using this account.
Declaration
public bool IsAvpfEnabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean | true if AVPF/SAVPF is enabled, false otherwise. |
Listener
Declaration
public AccountListener Listener { get; set; }
Property Value
Type | Description |
---|---|
AccountListener |
MissedCallsCount
Returns the missed calls count for a given account.
Declaration
public int MissedCallsCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The missed calls count. |
Params
Get the AccountParams as read-only object.
To make changes, clone the returned object using Clone() method, make your changes on it and apply them using with Params.
Declaration
public AccountParams Params { get; set; }
Property Value
Type | Description |
---|---|
AccountParams | The AccountParams attached to this account. |
State
Get the registration state of the given account.
Declaration
public RegistrationState State { get; }
Property Value
Type | Description |
---|---|
RegistrationState | The RegistrationState of the account. |
Transport
Get the transport from either service route, route or addr.
Declaration
public TransportType Transport { get; }
Property Value
Type | Description |
---|---|
TransportType | The transport as a string (I.E udp, tcp, tls, dtls). |
UnreadChatMessageCount
Returns the unread chat message count for a given account.
Declaration
public int UnreadChatMessageCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The unread chat message count. |
Methods
AddCustomParam(String, String)
Set one custom parameter to this Account.
Declaration
public void AddCustomParam(string key, string val)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | key of the searched parameter. |
System.String | val | value of the searched parameter. |
ClearCallLogs()
Deletes all the call logs related to this account from the database.
Declaration
public void ClearCallLogs()
Clone()
Instantiate a new account with values from source.
Declaration
public Account Clone()
Returns
Type | Description |
---|---|
Account | The newly created Account object. |
FindAuthInfo()
Find authentication info matching account, if any, similarly to linphone_core_find_auth_info.
Declaration
public AuthInfo FindAuthInfo()
Returns
Type | Description |
---|---|
AuthInfo | a AuthInfo matching account criteria if possible, null if nothing can be found. |
GetCallLogsForAddress(Address)
Returns the list of call logs for a given account.
This list must be freed after use.
Declaration
public IEnumerable<CallLog> GetCallLogsForAddress(Address remoteAddress)
Parameters
Type | Name | Description |
---|---|---|
Address | remoteAddress | the Address object to filter call logs. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<CallLog> | The list of filtered call logs . |
GetCustomHeader(String)
Obtain the value of a header sent by the server in last answer to REGISTER.
Declaration
public string GetCustomHeader(string headerName)
Parameters
Type | Name | Description |
---|---|---|
System.String | headerName | The header name for which to fetch corresponding value. |
Returns
Type | Description |
---|---|
System.String | The value of the queried header. |
GetCustomParam(String)
Get the custom parameter with key to this Account.
Declaration
public string GetCustomParam(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | key of the searched parameter. |
Returns
Type | Description |
---|---|
System.String | The value of the parameter with key if found or an empty string otherwise. |
IsPhoneNumber(String)
Detect if the given input is a phone number or not.
Declaration
public bool IsPhoneNumber(string username)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | The string to parse. |
Returns
Type | Description |
---|---|
System.Boolean | true if input is a phone number, false otherwise. |
NewWithConfig(Core, AccountParams, ProxyConfig)
Create a new Account with a Proxy config backpointer.
This is only intended to be used while keeping a backward compatibility with proxy config.
Declaration
public static Account NewWithConfig(Core lc, AccountParams parameters, ProxyConfig config)
Parameters
Type | Name | Description |
---|---|---|
Core | lc | The Core object. |
AccountParams | parameters | The AccountParams object. |
ProxyConfig | config | The ProxyConfig object. |
Returns
Type | Description |
---|---|
Account | The newly created Account object. |
NormalizePhoneNumber(String)
Normalize a human readable phone number into a basic string.
888-444-222 becomes 888444222 or +33888444222 depending on the Account object. This function will always generate a normalized username if input is a phone number.
Declaration
public string NormalizePhoneNumber(string username)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | The string to parse. |
Returns
Type | Description |
---|---|
System.String | null if input is an invalid phone number, normalized phone number from username input otherwise. |
NormalizeSipUri(String)
Normalize a human readable sip uri into a fully qualified LinphoneAddress.
A sip address should look like DisplayName <sip:username@domain:port> . Basically this function performs the following tasks The result is a syntactically correct SIP address.
Declaration
public Address NormalizeSipUri(string username)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | The string to parse. |
Returns
Type | Description |
---|---|
Address | null if invalid input, normalized sip address otherwise. |
PauseRegister()
Prevent an account from refreshing its registration.
This is useful to let registrations to expire naturally (or) when the application wants to keep control on when refreshes are sent. However, linphone_core_set_network_reachable(lc,true) will always request the accounts to refresh their registrations. The refreshing operations can be resumed with RefreshRegister().
Declaration
public void PauseRegister()
RefreshRegister()
Refresh a proxy registration.
This is useful if for example you resuming from suspend, thus IP address may have changed.
Declaration
public void RefreshRegister()
ResetMissedCallsCount()
Re-sets the number of missed calls for this account to 0.
Declaration
public void ResetMissedCallsCount()
SetCustomHeader(String, String)
Set the value of a custom header sent to the server in REGISTERs request.
Declaration
public void SetCustomHeader(string headerName, string headerValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | headerName | The header name. |
System.String | headerValue | The header value. |