Click or drag to resize

ChannelResourceOriginatingPhoneNumber Property

This is the CallerID number sent with an oubound call when a Dial is executed.

Namespace:  VoiceElements.Client
Assembly:  VoiceElementsClient (in VoiceElementsClient.dll) Version:
public string OriginatingPhoneNumber { get; set; }

Property Value

Type: String
This the number of the outbound caller id that will show on the call recipient's phone. Modifying the this field allows you to change the number that is displayed on the users phone. This is useful if you would like to make sure that your customers only call back the number that is specified for this value. For more detail on CallerID, see Caller ID Information.

You Cannot Control the Name Field

You may find that many applications would like to change the name field of the CallerID. However, this is managed by the carriers, who have databases that map the numbers to names. These are called CNAM records. If you are not showing the correct name on outbound calls, you will need to contact your carrier to change the name.

The example below shows a chunk of code that sets the outbound caller ID number, dials a call and then switches based on the Dial Result.
public void DialOut()
  // 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();

  // Put the phone number in a variable
  string m_PhoneNumber = "2135551212";

  // Set the outbound callerID
  m_ChannelResource.OriginatingPhoneNumber = "8675309";

  // Dial the call and put the result in a variable
  DialResult dialResult = m_ChannelResource.Dial(m_PhoneNumber);

  // Branch based on what happens to the call
  switch (dialResult)
    case DialResult.Connected:
    // Put your script for a connection here
    case DialResult.NoAnswer:
    // Put code to move on or do what you want with a No Answer here
    case DialResult.Busy:
    // Put code to move on or do what you want with a Busy here
    // Handle all other dial results
See Also