public LookupHighriseContact ( string url, string authToken, |
||
url | string | The URL of the Highrise account to attempt the lookup on. |
authToken | string | The auth token for the Highrise account to attempt the lookup with. |
from | The SIP from header of the incoming call to attempt to match on. | |
addCallNote | bool | If true it indicates a Highrise note should be created if a matching contact is found. |
async | bool | |
return |
public CRMHeaders LookupHighriseContact(string url, string authToken, SIPFromHeader from, bool addCallNote, bool async)
{
LogToMonitor(new SIPMonitorConsoleEvent(SIPMonitorServerTypesEnum.AppServer, SIPMonitorEventTypesEnum.DialPlan, "Looking up Highrise contact on " + url + ".", m_context.Owner));
if (async)
{
m_context.SetCallerDetails(new CRMHeaders() { Pending = true });
ThreadPool.QueueUserWorkItem(delegate { DoLookup(url, authToken, from, addCallNote, (result) => { m_context.SetCallerDetails(result); }); });
return null;
}
else
{
return DoLookup(url, authToken, from, addCallNote, null);
}
}