Ring Daemon
Loading...
Searching...
No Matches
callmanager.cpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2004-2026 Savoir-faire Linux Inc.
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17
18#include <vector>
19#include <cstring>
20
22#include "call_factory.h"
23
24#include "sip/siptransport.h"
25#include "sip/sipvoiplink.h"
26#include "sip/sipcall.h"
27#include "string_utils.h"
28
29#include "logger.h"
30#include "manager.h"
31#include "jamidht/jamiaccount.h"
32
33namespace libjami {
34
35void
36registerCallHandlers(const std::map<std::string, std::shared_ptr<CallbackWrapperBase>>& handlers)
37{
38 registerSignalHandlers(handlers);
39}
40
41std::string
42placeCall(const std::string& accountId, const std::string& to)
43{
44 // TODO. Remove ASAP.
45 JAMI_WARN("This API is deprecated, use placeCallWithMedia() instead");
46 return placeCallWithMedia(accountId, to, {});
47}
48
49std::string
50placeCallWithMedia(const std::string& accountId, const std::string& to, const std::vector<libjami::MediaMap>& mediaList)
51{
52 // Check if a destination number is available
53 if (to.empty()) {
54 JAMI_DBG("No number entered - Call aborted");
55 return {};
56 } else {
57 return jami::Manager::instance().outgoingCall(accountId, to, mediaList);
58 }
59}
60
61bool
62requestMediaChange(const std::string& accountId,
63 const std::string& callId,
64 const std::vector<libjami::MediaMap>& mediaList)
65{
66 if (auto account = jami::Manager::instance().getAccount(accountId)) {
67 if (auto call = account->getCall(callId)) {
68 return call->requestMediaChange(mediaList);
69 } else if (auto conf = account->getConference(callId)) {
70 return conf->requestMediaChange(mediaList);
71 }
72 }
73 return false;
74}
75
76bool
77refuse(const std::string& accountId, const std::string& callId)
78{
79 return jami::Manager::instance().refuseCall(accountId, callId);
80}
81
82bool
83accept(const std::string& accountId, const std::string& callId)
84{
85 return jami::Manager::instance().acceptCall(accountId, callId);
86}
87
88bool
89acceptWithMedia(const std::string& accountId, const std::string& callId, const std::vector<libjami::MediaMap>& mediaList)
90{
91 return jami::Manager::instance().acceptCall(accountId, callId, mediaList);
92}
93
94bool
95answerMediaChangeRequest(const std::string& accountId,
96 const std::string& callId,
97 const std::vector<libjami::MediaMap>& mediaList)
98{
99 if (auto account = jami::Manager::instance().getAccount(accountId))
100 if (auto call = account->getCall(callId)) {
101 try {
102 call->answerMediaChangeRequest(mediaList);
103 return true;
104 } catch (const std::runtime_error& e) {
105 JAMI_ERR("%s", e.what());
106 }
107 }
108 return false;
109}
110
111bool
112hangUp(const std::string& accountId, const std::string& callId)
113{
114 return jami::Manager::instance().hangupCall(accountId, callId);
115}
116
117bool
118hangUpConference(const std::string& accountId, const std::string& confId)
119{
120 return jami::Manager::instance().hangupConference(accountId, confId);
121}
122
123bool
124hold(const std::string& accountId, const std::string& callId)
125{
126 return jami::Manager::instance().holdCall(accountId, callId);
127}
128
129bool
130resume(const std::string& accountId, const std::string& callId)
131{
132 return jami::Manager::instance().resumeCall(accountId, callId);
133}
134
135bool
136muteLocalMedia(const std::string& accountId, const std::string& callId, const std::string& mediaType, bool mute)
137{
138 if (auto account = jami::Manager::instance().getAccount(accountId)) {
139 if (auto call = account->getCall(callId)) {
140 JAMI_DBG("Muting [%s] for call %s", mediaType.c_str(), callId.c_str());
141 call->muteMedia(mediaType, mute);
142 return true;
143 } else if (auto conf = account->getConference(callId)) {
144 JAMI_DEBUG("[conf:{}] Muting local host [{}]", callId, mediaType);
145 conf->muteLocalHost(mute, mediaType);
146 return true;
147 } else {
148 JAMI_WARNING("ID {} doesn't match any call or conference", callId);
149 }
150 }
151 return false;
152}
153
154bool
155transfer(const std::string& accountId, const std::string& callId, const std::string& to)
156{
157 return jami::Manager::instance().transferCall(accountId, callId, to);
158}
159
160bool
161attendedTransfer(const std::string& accountId, const std::string& transferID, const std::string& targetID)
162{
163 if (auto account = jami::Manager::instance().getAccount(accountId))
164 if (auto call = account->getCall(transferID))
165 return call->attendedTransfer(targetID);
166 return false;
167}
168
169bool
170joinParticipant(const std::string& accountId,
171 const std::string& sel_callId,
172 const std::string& account2Id,
173 const std::string& drag_callId)
174{
175 return jami::Manager::instance().joinParticipant(accountId, sel_callId, account2Id, drag_callId);
176}
177
178void
179createConfFromParticipantList(const std::string& accountId, const std::vector<std::string>& participants)
180{
182}
183
184void
185setConferenceLayout(const std::string& accountId, const std::string& confId, uint32_t layout)
186{
187 if (const auto account = jami::Manager::instance().getAccount(accountId)) {
188 if (auto conf = account->getConference(confId)) {
189 conf->setLayout(static_cast<int>(layout));
190 } else if (auto call = account->getCall(confId)) {
191 Json::Value root;
192 root["layout"] = layout;
193 call->sendConfOrder(root);
194 }
195 }
196}
197
198bool
199isConferenceParticipant(const std::string& accountId, const std::string& callId)
200{
201 if (auto account = jami::Manager::instance().getAccount(accountId))
202 if (auto call = account->getCall(callId))
203 return call->isConferenceParticipant();
204 return false;
205}
206
207bool
208addParticipant(const std::string& accountId,
209 const std::string& callId,
210 const std::string& account2Id,
211 const std::string& confId)
212{
213 return jami::Manager::instance().addSubCall(accountId, callId, account2Id, confId);
214}
215
216bool
217addMainParticipant(const std::string& accountId, const std::string& confId)
218{
219 return jami::Manager::instance().addMainParticipant(accountId, confId);
220}
221
222bool
227
228bool
229detachParticipant(const std::string&, const std::string& callId)
230{
232}
233
234bool
235joinConference(const std::string& accountId,
236 const std::string& sel_confId,
237 const std::string& account2Id,
238 const std::string& drag_confId)
239{
240 return jami::Manager::instance().joinConference(accountId, sel_confId, account2Id, drag_confId);
241}
242
243bool
244holdConference(const std::string& accountId, const std::string& confId)
245{
246 return jami::Manager::instance().holdConference(accountId, confId);
247}
248
249bool
250resumeConference(const std::string& accountId, const std::string& confId)
251{
252 return jami::Manager::instance().resumeConference(accountId, confId);
253}
254
255std::map<std::string, std::string>
256getConferenceDetails(const std::string& accountId, const std::string& confId)
257{
258 if (const auto account = jami::Manager::instance().getAccount(accountId))
259 if (auto conf = account->getConference(confId))
260 return {{"ID", confId},
261 {"STATE", conf->getStateStr()},
262#ifdef ENABLE_VIDEO
263 {"VIDEO_SOURCE", conf->getVideoInput()},
264#endif
265 {"RECORDING", conf->isRecording() ? jami::TRUE_STR : jami::FALSE_STR}};
266 return {};
267}
268
269std::vector<std::map<std::string, std::string>>
270currentMediaList(const std::string& accountId, const std::string& callId)
271{
272 if (const auto account = jami::Manager::instance().getAccount(accountId)) {
273 if (auto call = account->getCall(callId)) {
274 return call->currentMediaList();
275 } else if (auto conf = account->getConference(callId)) {
276 return conf->currentMediaList();
277 }
278 }
279 JAMI_WARN("Call not found %s", callId.c_str());
280 return {};
281}
282
283std::vector<std::string>
284getConferenceList(const std::string& accountId)
285{
286 if (const auto account = jami::Manager::instance().getAccount(accountId))
287 return account->getConferenceList();
288 return {};
289}
290
291std::vector<std::string>
292getParticipantList(const std::string& accountId, const std::string& confId)
293{
294 if (const auto account = jami::Manager::instance().getAccount(accountId))
295 if (auto conf = account->getConference(confId)) {
296 const auto& subcalls(conf->getSubCalls());
297 return {subcalls.begin(), subcalls.end()};
298 }
299 return {};
300}
301
302std::string
303getConferenceId(const std::string& accountId, const std::string& callId)
304{
305 if (const auto account = jami::Manager::instance().getAccount(accountId))
306 if (auto call = account->getCall(callId))
307 if (auto conf = call->getConference())
308 return conf->getConfId();
309 return {};
310}
311
312bool
313startRecordedFilePlayback(const std::string& filepath)
314{
316}
317
318void
323
324bool
325toggleRecording(const std::string& accountId, const std::string& callId)
326{
327 return jami::Manager::instance().toggleRecordingCall(accountId, callId);
328}
329
330void
331setRecording(const std::string& accountId, const std::string& callId)
332{
333 toggleRecording(accountId, callId);
334}
335
336void
341
342bool
343getIsRecording(const std::string& accountId, const std::string& callId)
344{
345 if (const auto account = jami::Manager::instance().getAccount(accountId)) {
346 if (auto call = account->getCall(callId)) {
347 return call->isRecording();
348 } else if (auto conf = account->getConference(callId)) {
349 return conf->isRecording();
350 }
351 }
352 return false;
353}
354
355std::map<std::string, std::string>
356getCallDetails(const std::string& accountId, const std::string& callId)
357{
358 if (const auto account = jami::Manager::instance().getAccount(accountId))
359 if (auto call = account->getCall(callId))
360 return call->getDetails();
361 return {};
362}
363
364std::vector<std::string>
369
370std::vector<std::string>
371getCallList(const std::string& accountId)
372{
373 if (accountId.empty())
375 else if (const auto account = jami::Manager::instance().getAccount(accountId))
376 return account->getCallList();
377 JAMI_WARN("Unknown account: %s", accountId.c_str());
378 return {};
379}
380
381std::vector<std::map<std::string, std::string>>
382getConferenceInfos(const std::string& accountId, const std::string& confId)
383{
384 if (const auto account = jami::Manager::instance().getAccount(accountId)) {
385 if (auto conf = account->getConference(confId))
386 return conf->getConferenceInfos();
387 else if (auto call = account->getCall(confId))
388 return call->getConferenceInfos();
389 }
390 return {};
391}
392
393void
394playDTMF(const std::string& key)
395{
396 auto code = key.data()[0];
398
399 if (auto current_call = jami::Manager::instance().getCurrentCall())
400 current_call->carryingDTMFdigits(code);
401}
402
403void
404startTone(int32_t start, int32_t type)
405{
406 if (start) {
407 if (type == 0)
409 else
411 } else
413}
414
415bool
416switchInput(const std::string& accountId, const std::string& callId, const std::string& resource)
417{
418 if (const auto account = jami::Manager::instance().getAccount(accountId)) {
419 if (auto conf = account->getConference(callId)) {
420 conf->switchInput(resource);
421 return true;
422 } else if (auto call = account->getCall(callId)) {
423 call->switchInput(resource);
424 return true;
425 }
426 }
427 return false;
428}
429
430void
431sendTextMessage(const std::string& accountId,
432 const std::string& callId,
433 const std::map<std::string, std::string>& messages,
434 const std::string& from,
435 bool isMixed)
436{
437 jami::runOnMainThread([accountId, callId, messages, from, isMixed] {
438 jami::Manager::instance().sendCallTextMessage(accountId, callId, messages, from, isMixed);
439 });
440}
441
442void
443setModerator(const std::string& accountId, const std::string& confId, const std::string& peerId, const bool& state)
444{
445 if (const auto account = jami::Manager::instance().getAccount(accountId)) {
446 if (auto conf = account->getConference(confId)) {
447 conf->setModerator(peerId, state);
448 } else {
449 JAMI_WARNING("[conf:{}] Failed to change moderator {} (conference not found)", confId, peerId);
450 }
451 }
452}
453
454void
455muteParticipant(const std::string& accountId, const std::string& confId, const std::string& peerId, const bool& state)
456{
457 JAMI_ERROR("muteParticipant is deprecated, please use muteStream");
458 if (const auto account = jami::Manager::instance().getAccount(accountId)) {
459 if (auto conf = account->getConference(confId)) {
460 conf->muteParticipant(peerId, state);
461 } else if (auto call = account->getCall(confId)) {
462 Json::Value root;
463 root["muteParticipant"] = peerId;
464 root["muteState"] = state ? jami::TRUE_STR : jami::FALSE_STR;
465 call->sendConfOrder(root);
466 }
467 }
468}
469
470void
471muteStream(const std::string& accountId,
472 const std::string& confId,
473 const std::string& accountUri,
474 const std::string& deviceId,
475 const std::string& streamId,
476 const bool& state)
477{
478 if (const auto account = jami::Manager::instance().getAccount(accountId)) {
479 if (auto conf = account->getConference(confId)) {
480 conf->muteStream(accountUri, deviceId, streamId, state);
481 } else if (auto call = account->getCall(confId)) {
482 if (call->conferenceProtocolVersion() == 1) {
483 Json::Value sinkVal;
484 sinkVal["muteAudio"] = state;
485 Json::Value mediasObj;
486 mediasObj[streamId] = sinkVal;
487 Json::Value deviceVal;
488 deviceVal["medias"] = mediasObj;
489 Json::Value deviceObj;
490 deviceObj[deviceId] = deviceVal;
491 Json::Value accountVal;
492 deviceVal["devices"] = deviceObj;
493 Json::Value root;
494 root[accountUri] = deviceVal;
495 root["version"] = 1;
496 call->sendConfOrder(root);
497 } else if (call->conferenceProtocolVersion() == 0) {
498 Json::Value root;
499 root["muteParticipant"] = accountUri;
500 root["muteState"] = state ? jami::TRUE_STR : jami::FALSE_STR;
501 call->sendConfOrder(root);
502 }
503 }
504 }
505}
506
507void
508setActiveParticipant(const std::string& accountId, const std::string& confId, const std::string& participant)
509{
510 JAMI_ERR() << "setActiveParticipant is deprecated, please use setActiveStream";
511 if (const auto account = jami::Manager::instance().getAccount(accountId)) {
512 if (auto conf = account->getConference(confId)) {
513 conf->setActiveParticipant(participant);
514 } else if (auto call = account->getCall(confId)) {
515 Json::Value root;
516 root["activeParticipant"] = participant;
517 call->sendConfOrder(root);
518 }
519 }
520}
521
522void
523setActiveStream(const std::string& accountId,
524 const std::string& confId,
525 const std::string& accountUri,
526 const std::string& deviceId,
527 const std::string& streamId,
528 const bool& state)
529{
530 if (const auto account = jami::Manager::instance().getAccount<jami::JamiAccount>(accountId)) {
531 if (auto conf = account->getConference(confId)) {
532 conf->setActiveStream(streamId, state);
533 } else if (auto call = std::static_pointer_cast<jami::SIPCall>(account->getCall(confId))) {
534 call->setActiveMediaStream(accountUri, deviceId, streamId, state);
535 }
536 }
537}
538
539void
540hangupParticipant(const std::string& accountId,
541 const std::string& confId,
542 const std::string& accountUri,
543 const std::string& deviceId)
544{
545 if (const auto account = jami::Manager::instance().getAccount(accountId)) {
546 if (auto conf = account->getConference(confId)) {
547 conf->hangupParticipant(accountUri, deviceId);
548 } else if (auto call = std::static_pointer_cast<jami::SIPCall>(account->getCall(confId))) {
549 if (call->conferenceProtocolVersion() == 1) {
550 Json::Value deviceVal;
551 deviceVal["hangup"] = jami::TRUE_STR;
552 Json::Value deviceObj;
553 deviceObj[deviceId] = deviceVal;
554 Json::Value accountVal;
555 deviceVal["devices"] = deviceObj;
556 Json::Value root;
557 root[accountUri] = deviceVal;
558 root["version"] = 1;
559 call->sendConfOrder(root);
560 } else if (call->conferenceProtocolVersion() == 0) {
561 Json::Value root;
562 root["hangupParticipant"] = accountUri;
563 call->sendConfOrder(root);
564 }
565 }
566 }
567}
568
569void
570raiseParticipantHand(const std::string& accountId,
571 const std::string& confId,
572 const std::string& peerId,
573 const bool& state)
574{
575 JAMI_ERR() << "raiseParticipantHand is deprecated, please use raiseHand";
576 if (const auto account = jami::Manager::instance().getAccount(accountId)) {
577 if (auto conf = account->getConference(confId)) {
578 if (auto call = std::static_pointer_cast<jami::SIPCall>(conf->getCallFromPeerID(peerId))) {
579 if (auto* transport = call->getTransport())
580 conf->setHandRaised(std::string(transport->deviceId()), state);
581 }
582 } else if (auto call = account->getCall(confId)) {
583 Json::Value root;
584 root["handRaised"] = peerId;
585 root["handState"] = state ? jami::TRUE_STR : jami::FALSE_STR;
586 call->sendConfOrder(root);
587 }
588 }
589}
590
591void
592raiseHand(const std::string& accountId,
593 const std::string& confId,
594 const std::string& accountUri,
595 const std::string& deviceId,
596 const bool& state)
597{
598 if (const auto account = jami::Manager::instance().getAccount<jami::JamiAccount>(accountId)) {
599 if (auto conf = account->getConference(confId)) {
600 auto device = deviceId;
601 if (device.empty())
602 device = std::string(account->currentDeviceId());
603 conf->setHandRaised(device, state);
604 } else if (auto call = std::static_pointer_cast<jami::SIPCall>(account->getCall(confId))) {
605 if (call->conferenceProtocolVersion() == 1) {
606 Json::Value deviceVal;
607 deviceVal["raiseHand"] = state;
608 Json::Value deviceObj;
609 std::string device = deviceId.empty() ? std::string(account->currentDeviceId()) : deviceId;
610 deviceObj[device] = deviceVal;
611 Json::Value accountVal;
612 deviceVal["devices"] = deviceObj;
613 Json::Value root;
614 std::string uri = accountUri.empty() ? account->getUsername() : accountUri;
615 root[uri] = deviceVal;
616 root["version"] = 1;
617 call->sendConfOrder(root);
618 } else if (call->conferenceProtocolVersion() == 0) {
619 Json::Value root;
620 root["handRaised"] = account->getUsername();
621 root["handState"] = state ? jami::TRUE_STR : jami::FALSE_STR;
622 call->sendConfOrder(root);
623 }
624 }
625 }
626}
627
628} // namespace libjami
bool addMainParticipant(const std::string &accountId, const std::string &confId)
Bind the main participant to a conference (mainly called on a double click action)
Definition manager.cpp:1440
bool resumeConference(const std::string &accountId, const std::string &confId)
Resume all conference participants.
Definition manager.cpp:1344
bool resumeCall(const std::string &accountId, const std::string &callId)
Functions which occur with a user's action Resume call.
Definition manager.cpp:1248
bool startRecordedFilePlayback(const std::string &)
Start playback fo a recorded file if and only if audio layer is not already started.
Definition manager.cpp:2332
static LIBJAMI_TEST_EXPORT Manager & instance()
Definition manager.cpp:694
void playDtmf(char code)
Play the dtmf-associated sound.
Definition manager.cpp:1809
bool joinConference(const std::string &accountId, const std::string &confId1, const std::string &account2Id, const std::string &confId2)
Join two conference together into one unique conference.
Definition manager.cpp:1642
std::vector< std::string > getCallList() const
Get list of calls (internal subcalls are filter-out)
Definition manager.cpp:2940
bool detachParticipant(const std::string &callId)
Detach a participant from a conference, put the call on hold, do not hangup it.
Definition manager.cpp:1603
bool refuseCall(const std::string &accountId, const std::string &id)
Functions which occur with a user's action Refuse the call.
Definition manager.cpp:1314
bool toggleRecordingCall(const std::string &accountId, const std::string &id)
Set recording on / off Start recording.
Definition manager.cpp:2309
void playTone()
Play a ringtone.
Definition manager.cpp:2078
void createConfFromParticipantList(const std::string &accountId, const std::vector< std::string > &)
Create a conference from a list of participant.
Definition manager.cpp:1546
bool hangupCall(const std::string &accountId, const std::string &callId)
Functions which occur with a user's action Hangup the call.
Definition manager.cpp:1158
void recordingPlaybackSeek(const double value)
Definition manager.cpp:2354
void playToneWithMessage()
Play a special ringtone ( BUSY ) if there's at least one message on the voice mail.
Definition manager.cpp:2087
void stopRecordedFilePlayback()
Stop playback of recorded file.
Definition manager.cpp:2360
bool detachHost(const std::shared_ptr< Conference > &conf={})
Detach the local participant from curent conference.
Definition manager.cpp:1590
bool addSubCall(const std::string &accountId, const std::string &callId, const std::string &account2Id, const std::string &confId)
Add a subcall to a conference.
Definition manager.cpp:1369
std::string outgoingCall(const std::string &accountId, const std::string &callee, const std::vector< libjami::MediaMap > &mediaList={})
Place a new call.
Definition manager.cpp:1079
void sendCallTextMessage(const std::string &accountId, const std::string &callID, const std::map< std::string, std::string > &messages, const std::string &from, bool isMixed)
Send a new text message to the call, if participate to a conference, send to all participant.
Definition manager.cpp:1934
bool transferCall(const std::string &accountId, const std::string &id, const std::string &to)
Functions which occur with a user's action Transfer the call.
Definition manager.cpp:1282
bool joinParticipant(const std::string &accountId, const std::string &callId1, const std::string &account2Id, const std::string &callId2, bool attached=true)
Join two participants to create a conference.
Definition manager.cpp:1461
bool holdConference(const std::string &accountId, const std::string &confId)
Hold all conference participants.
Definition manager.cpp:1329
void stopTone()
Acts on the audio streams and audio files.
Definition manager.cpp:2065
bool hangupConference(const std::string &accountId, const std::string &confId)
Functions which occur with a user's action Hangup the conference (hangup every participants)
Definition manager.cpp:1196
bool acceptCall(const std::string &accountId, const std::string &callId, const std::vector< libjami::MediaMap > &mediaList={})
Functions which occur with a user's action Answer the call.
Definition manager.cpp:1106
bool holdCall(const std::string &accountId, const std::string &callId)
Functions which occur with a user's action Hold call.
Definition manager.cpp:1210
#define JAMI_ERR(...)
Definition logger.h:230
#define JAMI_ERROR(formatstr,...)
Definition logger.h:243
#define JAMI_DBG(...)
Definition logger.h:228
#define JAMI_DEBUG(formatstr,...)
Definition logger.h:238
#define JAMI_WARN(...)
Definition logger.h:229
#define JAMI_WARNING(formatstr,...)
Definition logger.h:242
static constexpr const char TRUE_STR[]
static constexpr const char FALSE_STR[]
static void runOnMainThread(Callback &&cb)
Definition manager.h:930
void muteParticipant(const std::string &accountId, const std::string &confId, const std::string &peerId, const bool &state)
DEPRECATED USE muteStream.
void playDTMF(const std::string &key)
bool accept(const std::string &accountId, const std::string &callId)
bool transfer(const std::string &accountId, const std::string &callId, const std::string &to)
std::map< std::string, std::string > getCallDetails(const std::string &accountId, const std::string &callId)
bool switchInput(const std::string &accountId, const std::string &callId, const std::string &resource)
bool startRecordedFilePlayback(const std::string &filepath)
bool holdConference(const std::string &accountId, const std::string &confId)
std::string placeCallWithMedia(const std::string &accountId, const std::string &to, const std::vector< libjami::MediaMap > &mediaList)
bool addParticipant(const std::string &accountId, const std::string &callId, const std::string &account2Id, const std::string &confId)
void setActiveParticipant(const std::string &accountId, const std::string &confId, const std::string &participant)
DEPRECATED, USE setActiveStream.
bool hangUpConference(const std::string &accountId, const std::string &confId)
void raiseHand(const std::string &accountId, const std::string &confId, const std::string &accountUri, const std::string &deviceId, const bool &state)
bool detachLocalParticipant()
void setModerator(const std::string &accountId, const std::string &confId, const std::string &peerId, const bool &state)
void stopRecordedFilePlayback()
void muteStream(const std::string &accountId, const std::string &confId, const std::string &accountUri, const std::string &deviceId, const std::string &streamId, const bool &state)
bool acceptWithMedia(const std::string &accountId, const std::string &callId, const std::vector< libjami::MediaMap > &mediaList)
bool getIsRecording(const std::string &accountId, const std::string &callId)
bool hangUp(const std::string &accountId, const std::string &callId)
bool requestMediaChange(const std::string &accountId, const std::string &callId, const std::vector< libjami::MediaMap > &mediaList)
bool isConferenceParticipant(const std::string &accountId, const std::string &callId)
std::string getConferenceId(const std::string &accountId, const std::string &callId)
bool hold(const std::string &accountId, const std::string &callId)
std::string placeCall(const std::string &accountId, const std::string &to)
std::map< std::string, std::string > getConferenceDetails(const std::string &accountId, const std::string &confId)
void raiseParticipantHand(const std::string &accountId, const std::string &confId, const std::string &peerId, const bool &state)
DEPRECATED, use raiseHand.
void setConferenceLayout(const std::string &accountId, const std::string &confId, uint32_t layout)
void registerSignalHandlers(const std::map< std::string, std::shared_ptr< CallbackWrapperBase > > &handlers)
void registerCallHandlers(const std::map< std::string, std::shared_ptr< CallbackWrapperBase > > &handlers)
std::vector< std::string > getConferenceList(const std::string &accountId)
bool addMainParticipant(const std::string &accountId, const std::string &confId)
bool toggleRecording(const std::string &accountId, const std::string &callId)
std::vector< std::string > getParticipantList(const std::string &accountId, const std::string &confId)
NOTE: Despite its name, this returns the list of call IDs (subcalls) in the conference,...
std::vector< std::map< std::string, std::string > > currentMediaList(const std::string &accountId, const std::string &callId)
void hangupParticipant(const std::string &accountId, const std::string &confId, const std::string &accountUri, const std::string &deviceId)
void recordPlaybackSeek(double value)
void createConfFromParticipantList(const std::string &accountId, const std::vector< std::string > &participants)
bool resume(const std::string &accountId, const std::string &callId)
bool detachParticipant(const std::string &, const std::string &callId)
bool answerMediaChangeRequest(const std::string &accountId, const std::string &callId, const std::vector< libjami::MediaMap > &mediaList)
Answer a media change request.
bool attendedTransfer(const std::string &accountId, const std::string &transferID, const std::string &targetID)
bool muteLocalMedia(const std::string &accountId, const std::string &callId, const std::string &mediaType, bool mute)
void startTone(int32_t start, int32_t type)
bool joinConference(const std::string &accountId, const std::string &sel_confId, const std::string &account2Id, const std::string &drag_confId)
void setRecording(const std::string &accountId, const std::string &callId)
std::vector< std::string > getCallList()
bool refuse(const std::string &accountId, const std::string &callId)
void sendTextMessage(const std::string &accountId, const std::string &callId, const std::map< std::string, std::string > &messages, const std::string &from, bool isMixed)
bool joinParticipant(const std::string &accountId, const std::string &sel_callId, const std::string &account2Id, const std::string &drag_callId)
bool resumeConference(const std::string &accountId, const std::string &confId)
void setActiveStream(const std::string &accountId, const std::string &confId, const std::string &accountUri, const std::string &deviceId, const std::string &streamId, const bool &state)
std::vector< std::map< std::string, std::string > > getConferenceInfos(const std::string &accountId, const std::string &confId)
bool start(const std::filesystem::path &config_file) noexcept
Start asynchronously daemon created by init().
Definition jami.cpp:104
SIPCall are SIP implementation of a normal Call.