I am making a Asterisk Client in C# WinForms using Asterisk.NET. My client is listening to one extension only.We can view the calls, reject or transfer etc to the calls coming to my extensions. I need source channel to transfer the call, and source channel can be got only from Dial Event. Recently, I noticed that The Dial Event happens everytime when any of the extension connected to the server starts dialling. I want to filter it out, only the call coming to my extension only.
void manager_Dial(object sender, DialEvent e)
{
CallingInfo.src_channel = e.Channel;
}
e.dialString is giving me the Destination Extension number; But I don't know if it become null according to the server status. Moreover, what will happen if some external calls coming to me, I wont get Dial event or Source channel, Then it cannot be transferred. Right ?