Share via


PhoneLine Class

Definition

Represents a phone line.

public ref class PhoneLine sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.ApplicationModel.Calls.CallsPhoneContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class PhoneLine final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.ApplicationModel.Calls.CallsPhoneContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class PhoneLine
Public NotInheritable Class PhoneLine
Inheritance
Object Platform::Object IInspectable PhoneLine
Attributes

Windows requirements

Device family
Windows Mobile Extension SDK (introduced in 10.0.10240.0)
API contract
Windows.ApplicationModel.Calls.CallsPhoneContract (introduced in v1.0)
App capabilities
phoneCallHistory phoneCallHistorySystem

Remarks

A phone line is a line on a device that can either receive incoming calls or place outgoing calls, depending on whether the line is configured to support dialing out. For example, a single SIM device has 1 cellular line while a dual SIM device has 2 cellular lines. The system will automatically create new lines for VoIP applications that allow initiating an outgoing call.

Each PhoneLine instance has properties specific to that line.

Version history

Windows version SDK version Value added
1903 18362 EnableTextReply
1903 18362 TransportDeviceId

Properties

CanDial

Gets a boolean value which indicates if the phone line can be used to place outgoing calls.

CellularDetails

Gets details for the cellular component specific components for the PhoneLine instance. This property is NULL for VoIP phone lines.

DisplayColor

Gets the preferred display color of the phone line.

DisplayName

Gets the user assigned friendly name for the phone line.

Id

Gets the ID of the phone line.

LineConfiguration

Gets extra configuration information about this PhoneLine instance.

NetworkName

Gets the name of the current network that is being used by the phone line.

NetworkState

Gets the current network status of the phone line.

SupportsTile

Gets a value that indicates if the phone line supports being pinned as a live tile.

Transport

Gets the transport for the phone line.

TransportDeviceId

Device ID for the PhoneLineTransportDevice associated with this PhoneLine. Null if there is no transport device.

VideoCallingCapabilities

Gets whether video calling is supported over this phone line.

Voicemail

Gets the voice mail data associated with the PhoneLine instance.

Methods

Dial(String, String)

Place a phone call on the phone line. The caller must be in the foreground.

DialWithOptions(PhoneDialOptions)

Place a phone call on the phone line, allowing the caller to specify additional dial options. The caller must be in the foreground.

DialWithResult(String, String)

Places a phone call on the line.

DialWithResultAsync(String, String)

Asynchronously places a phone call on the line.

EnableTextReply(Boolean)

Informs the platform that text reply functionality is supported for this line.

Note

This method is deprecated.

FromIdAsync(Guid)

This static method asynchronously retrieves a PhoneLine object that represents a specific phone line on the device based on the line ID.

GetAllActivePhoneCalls()

Retrieves a phone calls result object, from which you can retrieve the active phone calls.

GetAllActivePhoneCallsAsync()

Asynchronously retrieves a phone calls result object, from which you can retrieve the active phone calls.

IsImmediateDialNumberAsync(String)

Check if a number should be dialed immediately from the dialer without requiring the user to press the call button.

Events

LineChanged

Occurs when and properties for the associated PhoneLine instance change. This can occur when meta data changes like the voice mail count, the network state, or the cellular details.

Applies to