- Joined
- Sep 22, 2020
- Messages
- 35
- Reaction score
- 18
Hi All,
I want to route calls based on incoming call number (CID) and then dial a number attached to this number in the same CSV file. I can route
the calls based on incoming number but then I want to transfer to a number accordingly.....
This is the C# script
How can I return the value "TransferQueue" so I can use it as a parameter to transfer to?
My CSV is simple with 2 columns:
810,0123455677
811,7765432100
Where the first column is the number to dial and the second column is the Caller.ID
I want to route calls based on incoming call number (CID) and then dial a number attached to this number in the same CSV file. I can route
the calls based on incoming number but then I want to transfer to a number accordingly.....
This is the C# script
C#:
using System.Xml;
public class Validator
{
public bool ValidateCSV(string fileContent, string number)
{
foreach (string line in fileContent.Split('\n'))
{
string[] lineParts = line.Trim().Split(',');
if (lineParts.Length == 2)
{
string TransferQueue = lineParts[0];
string customerNUMBER = lineParts[1];
if (number == customerNUMBER)
return true;
}
}
return false;
}
}
How can I return the value "TransferQueue" so I can use it as a parameter to transfer to?
My CSV is simple with 2 columns:
810,0123455677
811,7765432100
Where the first column is the number to dial and the second column is the Caller.ID