Click or drag to resize

ChannelResourcePortIndexer Property

The one based index of this channel on the server.

Namespace:  VoiceElements.Client
Assembly:  VoiceElementsClient (in VoiceElementsClient.dll) Version: 8.6.1.1
Syntax
public int PortIndexer { get; }

Property Value

Type: Int32
Remarks
You would typically only use this with a dedicated server for which you wanted several applications to use your server and manage ports within each application. Generally, you will not care or need to know what port number you are using.

Tip: You can Use This for a Unique ID

You may want to use this as a unique way to create an ID for your call. Try something like Line + PortIndexer + DateTime.GetDate as a unique ID string.

Examples
The example below shows a simple retreival of a channel and then getting the port ID and putting it in a variable and returning it for whatever use required.
public int GetMyPort()
{
    // To get a channel, you must first get a link to a Telephony Server.  You may need to pass a username password here.
    TelephonyServer m_TelephonyServer = new TelephonyServer();

    // Get your channel resource from the server
    ChannelResource m_ChannelResource = m_TelephonyServer.GetChannel();

    // Get the port and use as you wish
    int MyPortNumber = m_ChannelResource.PortIndexer;

    return MyPortNumber;
}
See Also