www.pudn.com > acdx.rar > CallRouter.h


/*============================================================= 
  Interface for call routing algorithms. 
   
 Function: 
		 Interface of ACDX		 
 Author: Leon Wang  
==============================================================*/ 
#if !defined(AFX_ALLROUTER_H__0EDF40C2_E043_4119_8B53_A0D44CDEF836__INCLUDED_) 
#define AFX_ALLROUTER_H__0EDF40C2_E043_4119_8B53_A0D44CDEF836__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
 
//##ModelId=424BB64601FB 
class CCallRouter   
{ 
public: 
//	CCallRouter(); 
//	virtual ~CCallRouter(); 
 public:	 
   /** 
     * Interface for GnuGk callrouting algorithms. 
     * The algorithm is passed all data provided by GnuGk and will choose whatever 
     * it wants to use. 
     * @param queue         H.323 alias that was called 
     * @param callerEndId   endpoint ID of the caller 
     * @param callRef       call Refernce 
     * @param callerAlias   callers H.323 alias 
     * @param callerIp      callerrs IP number 
     */ 
	//##ModelId=424BB646020B 
    void routeCall(CString queue,  
	  			   CString callerEndId, 
                   CString callRef,  
				   CString callerAlias,  
				   CString callerIp); 
 
    /** 
     * Find a wait queue agent for this queue. 
     * @param queue queue name 
     * @return  alias of wait queue agent of null if none is avilabe 
     */ 
	//##ModelId=424BB646021C 
    CString getWaitQueue(CString queue); 
 
    /** 
     * Add endpoint. 
     * @param _alias    H.323 alias 
     * @param _epid     endpoint ID 
     */ 
	//##ModelId=424BB646021E 
    void addAlias(CString _alias,  
 				  CString _epid); 
 
    /** 
     * Remove all aliases for this endpoint ID. 
     * @param _epid     endpoint ID 
     */ 
	//##ModelId=424BB646022C 
    void removeAllAliases(CString _epid); 
 
    /** 
     * Set _all_ aliases on this endpoint with this CRV to available. 
     * @param _epid endpoint ID 
     * @param _crv  CRV 
     */ 
	//##ModelId=424BB646023A 
    void setAliasAvailable(CString _epid,  
						   CString _crv); 
 
    /** 
     * Set this alias on this endpoint to TALKING and remember the CRV. 
     * @param _alias    H.323 alias 
     * @param _crv      CRV 
     */ 
	//##ModelId=424BB646023D 
    void setAliasTalking(CString _alias,  
						 CString _crv); 
 
    /** 
     * Clear all alias states. 
     */ 
	//##ModelId=424BB646024A 
    void clearAllAliasStates(); 
 
    /** 
     * Do a cross check if the agent states are OK. 
     */ 
	//##ModelId=424BB646024B 
    void agentSanityCheck(); 
 
 
}; 
 
#endif // !defined(AFX_ALLROUTER_H__0EDF40C2_E043_4119_8B53_A0D44CDEF836__INCLUDED_)