mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-22 13:48:09 +00:00
21 lines
514 B
C++
21 lines
514 B
C++
#include "call.h"
|
|
|
|
using namespace std;
|
|
|
|
CallCommand::CallCommand() :
|
|
DaemonCommand("call", "call <sip address>", "Place a call.") {
|
|
}
|
|
|
|
void CallCommand::exec(Daemon *app, const char *args) {
|
|
LinphoneCall *call;
|
|
call = linphone_core_invite(app->getCore(), args);
|
|
if (call == NULL) {
|
|
app->sendResponse(Response("Call creation failed."));
|
|
} else {
|
|
Response resp;
|
|
ostringstream ostr;
|
|
ostr << "Id: " << app->updateCallId(call) << "\n";
|
|
resp.setBody(ostr.str().c_str());
|
|
app->sendResponse(resp);
|
|
}
|
|
}
|