Part II: Developing Outbound Applications: Schedule Call with the Gateway | Gateway Tutorial

The following code schedule the call with the gateway.

CMapStringToString nvpairs;
                nvpairs["info"] = "CallNow Sample";
                nvpairs["phoneno"] = m_phone;
                nvpairs["firstocc"] = "0";
                nvpairs["startvxml"] = VgateClient::GetRemoteDir(targetdir) +
                "\\callnow.vxml";

                CString callId;
                if (! VgateClient::ScheduleCall(nvpairs, callId)) {
                AfxMessageBox(VgateClient::GetLastError());
                return;
                }

The ScheduleCall sends the call request to the gateway, it returns the callId of the phone call. The callId can be used later for getting the call status.