Client Library API Reference | Gateway Tutorial

The header file vgClient.h should contain the latest information.

Class VgateClient

This class contains the main API methods for Voicent Gateway Client.

static BOOL RegistClient(const char* clientName)

First thing to do - register with gateway. Return false means cannot communicate with gateway, check GetLastError for error message.

static BOOL IsClientRegisted()

Client is registed or not.

static BOOL ScheduleCall(const CMapStringToString& nameValuePairs, CString& callId)

Schedule a call with gateway. See call request reference for all valid name value pairs. Return callId of the scheduled call.

static BOOL GetCallStatus(const char* callId, CPtrArray& callLogs, BOOL clearLog)

Get the status of a call. The callLogs contains returned VgateCallRecord. Set clearLog to true to clear the log on gateway, so next query will not see the same logs again.

static BOOL RemoveCall(const char* callId)

Remove a call from gateway.

static CString GetLastError()

Get the last error message.

static BOOL CreateDir(const char* dirname)

Create directory in gateway directory hierarchy. The directory dirname will be created under Voicent InstallDir\Voicent\Gateway.

static CString GetRemoteDir(const char* dirname)

Get the remote directory path name on the remote gateway machine.

static BOOL SendFile(const char* sourceFilepath, const char* targetFilepath, BOOL bFailIfExists)

Send file to gateway. (Please note that this version of the client API does not support files to a different machine)

static BOOL RemoveFile(const char* targetFilepath)

Remove file from gateway.

static BOOL RemoveDir(const char* targetDir)

Remove directory recursively.

static BOOL GetLicenseString(const char* product, const char* version, CString& licenseString)

If your license is managed by the gateway, get the license string.

static CString GetLicenseUserFirstName()
static CString GetLicenseUserLastName()

Get the first name and last name in the gateway license.

Class VgateCallRecord

The definition is listed below.

class VgateCallRecord
{
public:
  enum { VG_CALL_UNKNOWN,
         VG_CALL_PENDING,
         VG_CALL_RETRY,
         VG_CALL_MADE,
         VG_CALL_FAILED };

  int m_recurIndex; // recurring index
  int m_index; // index of contact in the contact list when
               // scheduling the call
  int m_status; // the enum value call status
  COleDateTime m_callMadeTime; // call made time
  COleDateTime m_retryTime; // next retry time
  CString m_message; // status message
};