Click or drag to resize

ChannelResourceAni Property

This is the originating number of the last inbound call (if available).

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

Property Value

Type: String
Remarks
If provided by the carrier or network, this is essentially the callerID number of the party who placed the last inbound call. For more detail, see Automatic number identification. This is typically used for logging call activity in a database or even applying routing or script rules based on the number, area code, prefix that is calling. Also helpful for this type of call filtering and available on an inbound call are the DNIS and the Caller ID Name.

Tip: Use in Thread Name

You may find it useful to name a new inbound call thread with the ANI embedded. if you use logging and always log the thread name, you can filter your log based on the number calling and follow only that call through its lifespan.

Examples
static void s_TelephonyServer_NewCall(object sender, VoiceElements.Client.NewCallEventArgs callArgs)
{
// Get the ANI and put in a variable
string m_Ani = callArgs.ChannelResource.Ani;

// Log the ANI
Log.Write("New Call Arrival from {0}.", m_Ani);
}
See Also