SIPSorcery.AppServer.DialPlan.DialPlanCRMFacade.LookupHighriseContact C# (CSharp) Method

LookupHighriseContact() public method

Attempts to retrieve the CRM Account details for a dial plan. Looks up a person contact in the 37 Signals Highrise application.
public LookupHighriseContact ( string url, string authToken, SIPFromHeader from, bool addCallNote, bool async ) : CRMHeaders
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 SIPSorcery.SIP.SIPFromHeader 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 SIPSorcery.SIP.App.CRMHeaders
        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);
            }
        }