private Dictionary<string, string> GetLookups(SIPDialPlanLookupTypes lookupType)
{
try
{
if (Lookups != null)
{
var lookups = (from lookup in Lookups
where lookup.LookupType == (int)lookupType
select lookup).ToList();
if (lookups != null && lookups.Count > 0)
{
Dictionary<string, string> lookupsTable = new Dictionary<string, string>();
foreach (SIPDialplanLookup lookup in lookups)
{
lookupsTable.Add(lookup.LookupKey, lookup.LookupValue);
}
return lookupsTable;
}
}
return null;
}
catch (Exception excp)
{
logger.Error("Exception GetLookups. " + excp.Message);
return null;
}
}