Ring Daemon 16.0.0
Loading...
Searching...
No Matches
callmanager.cpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2004-2025 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#include <vector>
18#include <cstring>
19
21#include "call_factory.h"
22#include "client/ring_signal.h"
23
24#include "sip/siptransport.h"
25#include "sip/sipvoiplink.h"
26#include "sip/sipcall.h"
27#include "audio/audiolayer.h"
29#include "string_utils.h"
30
31#include "logger.h"
32#include "manager.h"
33#include "jamidht/jamiaccount.h"
34
35namespace libjami {
36
37void
38registerCallHandlers(const std::map<std::string, std::shared_ptr<CallbackWrapperBase>>& handlers)
39{
40 registerSignalHandlers(handlers);
41}
42
43std::string
44placeCall(const std::string& accountId, const std::string& to)
45{
46 // TODO. Remove ASAP.
47 JAMI_WARN("This API is deprecated, use placeCallWithMedia() instead");
48 return placeCallWithMedia(accountId, to, {});
49}
50
51std::string
52placeCallWithMedia(const std::string& accountId,
53 const std::string& to,
54 const std::vector<libjami::MediaMap>& mediaList)
55{
56 // Check if a destination number is available
57 if (to.empty()) {
58 JAMI_DBG("No number entered - Call aborted");
59 return {};
60 } else {
61 return jami::Manager::instance().outgoingCall(accountId, to, mediaList);
62 }
63}
64
65bool
66requestMediaChange(const std::string& accountId,
67 const std::string& callId,
68 const std::vector<libjami::MediaMap>& mediaList)
69{
70 if (auto account = jami::Manager::instance().getAccount(accountId)) {
71 if (auto call = account->getCall(callId)) {
72 return call->requestMediaChange(mediaList);
73 } else if (auto conf = account->getConference(callId)) {
74 return conf->requestMediaChange(mediaList);
75 }
76 }
77 return false;
78}
79
80bool
81refuse(const std::string& accountId, const std::string& callId)
82{
83 return jami::Manager::instance().refuseCall(accountId, callId);
84}
85
86bool
87accept(const std::string& accountId, const std::string& callId)
88{
89 return jami::Manager::instance().answerCall(accountId, callId);
90}
91
92bool
93acceptWithMedia(const std::string& accountId,
94 const std::string& callId,
95 const std::vector<libjami::MediaMap>& mediaList)
96{
97 return jami::Manager::instance().answerCall(accountId, callId, mediaList);
98}
99
100bool
101answerMediaChangeRequest(const std::string& accountId,
102 const std::string& callId,
103 const std::vector<libjami::MediaMap>& mediaList)
104{
105 if (auto account = jami::Manager::instance().getAccount(accountId))
106 if (auto call = account->getCall(callId)) {
107 try {
108 call->answerMediaChangeRequest(mediaList);
109 return true;
110 } catch (const std::runtime_error& e) {
111 JAMI_ERR("%s", e.what());
112 }
113 }
114 return false;
115}
116
117bool
118hangUp(const std::string& accountId, const std::string& callId)
119{
120 return jami::Manager::instance().hangupCall(accountId, callId);
121}
122
123bool
124hangUpConference(const std::string& accountId, const std::string& confId)
125{
126 return jami::Manager::instance().hangupConference(accountId, confId);
127}
128
129bool
130hold(const std::string& accountId, const std::string& callId)
131{
132 return jami::Manager::instance().onHoldCall(accountId, callId);
133}
134
135bool
136unhold(const std::string& accountId, const std::string& callId)
137{
138 return jami::Manager::instance().offHoldCall(accountId, callId);
139}
140
141bool
142muteLocalMedia(const std::string& accountId,
143 const std::string& callId,
144 const std::string& mediaType,
145 bool mute)
146{
147 if (auto account = jami::Manager::instance().getAccount(accountId)) {
148 if (auto call = account->getCall(callId)) {
149 JAMI_DBG("Muting [%s] for call %s", mediaType.c_str(), callId.c_str());
150 call->muteMedia(mediaType, mute);
151 return true;
152 } else if (auto conf = account->getConference(callId)) {
153 JAMI_DBG("Muting local host [%s] for conference %s", mediaType.c_str(), callId.c_str());
154 conf->muteLocalHost(mute, mediaType);
155 return true;
156 } else {
157 JAMI_WARN("ID %s doesn't match any call or conference", callId.c_str());
158 }
159 }
160 return false;
161}
162
163bool
164transfer(const std::string& accountId, const std::string& callId, const std::string& to)
165{
166 return jami::Manager::instance().transferCall(accountId, callId, to);
167}
168
169bool
170attendedTransfer(const std::string& accountId,
171 const std::string& transferID,
172 const std::string& targetID)
173{
174 if (auto account = jami::Manager::instance().getAccount(accountId))
175 if (auto call = account->getCall(transferID))
176 return call->attendedTransfer(targetID);
177 return false;
178}
179
180bool
181joinParticipant(const std::string& accountId,
182 const std::string& sel_callId,
183 const std::string& account2Id,
184 const std::string& drag_callId)
185{
186 return jami::Manager::instance().joinParticipant(accountId, sel_callId, account2Id, drag_callId);
187}
188
189void
190createConfFromParticipantList(const std::string& accountId,
191 const std::vector<std::string>& participants)
192{
194}
195
196void
197setConferenceLayout(const std::string& accountId, const std::string& confId, uint32_t layout)
198{
199 if (const auto account = jami::Manager::instance().getAccount(accountId)) {
200 if (auto conf = account->getConference(confId)) {
201 conf->setLayout(layout);
202 } else if (auto call = account->getCall(confId)) {
203 Json::Value root;
204 root["layout"] = layout;
205 call->sendConfOrder(root);
206 }
207 }
208}
209
210bool
211isConferenceParticipant(const std::string& accountId, const std::string& callId)
212{
213 if (auto account = jami::Manager::instance().getAccount(accountId))
214 if (auto call = account->getCall(callId))
215 return call->isConferenceParticipant();
216 return false;
217}
218
219void
220startSmartInfo(uint32_t refreshTimeMs)
221{
222 JAMI_WARNING("startSmartInfo is deprecated and does nothing.");
223}
224
225void
227{
228 JAMI_WARNING("stopSmartInfo is deprecated and does nothing.");
229}
230
231bool
232addParticipant(const std::string& accountId,
233 const std::string& callId,
234 const std::string& account2Id,
235 const std::string& confId)
236{
237 return jami::Manager::instance().addSubCall(accountId, callId, account2Id, confId);
238}
239
240bool
241addMainParticipant(const std::string& accountId, const std::string& confId)
242{
243 return jami::Manager::instance().addMainParticipant(accountId, confId);
244}
245
246bool
251
252bool
253detachParticipant(const std::string&, const std::string& callId)
254{
256}
257
258bool
259joinConference(const std::string& accountId,
260 const std::string& sel_confId,
261 const std::string& account2Id,
262 const std::string& drag_confId)
263{
264 return jami::Manager::instance().joinConference(accountId, sel_confId, account2Id, drag_confId);
265}
266
267bool
268holdConference(const std::string& accountId, const std::string& confId)
269{
270 return jami::Manager::instance().holdConference(accountId, confId);
271}
272
273bool
274unholdConference(const std::string& accountId, const std::string& confId)
275{
276 return jami::Manager::instance().unHoldConference(accountId, confId);
277}
278
279std::map<std::string, std::string>
280getConferenceDetails(const std::string& accountId, const std::string& confId)
281{
282 if (const auto account = jami::Manager::instance().getAccount(accountId))
283 if (auto conf = account->getConference(confId))
284 return {{"ID", confId},
285 {"STATE", conf->getStateStr()},
286#ifdef ENABLE_VIDEO
287 {"VIDEO_SOURCE", conf->getVideoInput()},
288#endif
289 {"RECORDING", conf->isRecording() ? jami::TRUE_STR : jami::FALSE_STR}};
290 return {};
291}
292
293std::vector<std::map<std::string, std::string>>
294currentMediaList(const std::string& accountId, const std::string& callId)
295{
296 if (const auto account = jami::Manager::instance().getAccount(accountId)) {
297 if (auto call = account->getCall(callId)) {
298 return call->currentMediaList();
299 } else if (auto conf = account->getConference(callId)) {
300 return conf->currentMediaList();
301 }
302 }
303 JAMI_WARN("Call not found %s", callId.c_str());
304 return {};
305}
306
307std::vector<std::string>
308getConferenceList(const std::string& accountId)
309{
310 if (const auto account = jami::Manager::instance().getAccount(accountId))
311 return account->getConferenceList();
312 return {};
313}
314
315std::vector<std::string>
316getParticipantList(const std::string& accountId, const std::string& confId)
317{
318 if (const auto account = jami::Manager::instance().getAccount(accountId))
319 if (auto conf = account->getConference(confId)) {
320 const auto& subcalls(conf->getSubCalls());
321 return {subcalls.begin(), subcalls.end()};
322 }
323 return {};
324}
325
326std::string
327getConferenceId(const std::string& accountId, const std::string& callId)
328{
329 if (const auto account = jami::Manager::instance().getAccount(accountId))
330 if (auto call = account->getCall(callId))
331 if (auto conf = call->getConference())
332 return conf->getConfId();
333 return {};
334}
335
336bool
337startRecordedFilePlayback(const std::string& filepath)
338{
340}
341
342void
347
348bool
349toggleRecording(const std::string& accountId, const std::string& callId)
350{
351 return jami::Manager::instance().toggleRecordingCall(accountId, callId);
352}
353
354void
355setRecording(const std::string& accountId, const std::string& callId)
356{
357 toggleRecording(accountId, callId);
358}
359
360void
365
366bool
367getIsRecording(const std::string& accountId, const std::string& callId)
368{
369 if (const auto account = jami::Manager::instance().getAccount(accountId)) {
370 if (auto call = account->getCall(callId)) {
371 return call->isRecording();
372 } else if (auto conf = account->getConference(callId)) {
373 return conf->isRecording();
374 }
375 }
376 return false;
377}
378
379std::map<std::string, std::string>
380getCallDetails(const std::string& accountId, const std::string& callId)
381{
382 if (const auto account = jami::Manager::instance().getAccount(accountId))
383 if (auto call = account->getCall(callId))
384 return call->getDetails();
385 return {};
386}
387
388std::vector<std::string>
393
394std::vector<std::string>
395getCallList(const std::string& accountId)
396{
397 if (accountId.empty())
399 else if (const auto account = jami::Manager::instance().getAccount(accountId))
400 return account->getCallList();
401 JAMI_WARN("Unknown account: %s", accountId.c_str());
402 return {};
403}
404
405std::vector<std::map<std::string, std::string>>
406getConferenceInfos(const std::string& accountId, const std::string& confId)
407{
408 if (const auto account = jami::Manager::instance().getAccount(accountId)) {
409 if (auto conf = account->getConference(confId))
410 return conf->getConferenceInfos();
411 else if (auto call = account->getCall(confId))
412 return call->getConferenceInfos();
413 }
414 return {};
415}
416
417void
418playDTMF(const std::string& key)
419{
420 auto code = key.data()[0];
422
423 if (auto current_call = jami::Manager::instance().getCurrentCall())
424 current_call->carryingDTMFdigits(code);
425}
426
427void
428startTone(int32_t start, int32_t type)
429{
430 if (start) {
431 if (type == 0)
433 else
435 } else
437}
438
439bool
440switchInput(const std::string& accountId, const std::string& callId, const std::string& resource)
441{
442 if (const auto account = jami::Manager::instance().getAccount(accountId)) {
443 if (auto conf = account->getConference(callId)) {
444 conf->switchInput(resource);
445 return true;
446 } else if (auto call = account->getCall(callId)) {
447 call->switchInput(resource);
448 return true;
449 }
450 }
451 return false;
452}
453
454bool
455switchSecondaryInput(const std::string& accountId,
456 const std::string& confId,
457 const std::string& resource)
458{
459 JAMI_ERR("Use requestMediaChange");
460 return false;
461}
462
463void
464sendTextMessage(const std::string& accountId,
465 const std::string& callId,
466 const std::map<std::string, std::string>& messages,
467 const std::string& from,
468 bool isMixed)
469{
470 jami::runOnMainThread([accountId, callId, messages, from, isMixed] {
471 jami::Manager::instance().sendCallTextMessage(accountId, callId, messages, from, isMixed);
472 });
473}
474
475void
476setModerator(const std::string& accountId,
477 const std::string& confId,
478 const std::string& peerId,
479 const bool& state)
480{
481 if (const auto account = jami::Manager::instance().getAccount(accountId)) {
482 if (auto conf = account->getConference(confId)) {
483 conf->setModerator(peerId, state);
484 } else {
485 JAMI_WARN("Fail to change moderator %s, conference %s not found",
486 peerId.c_str(),
487 confId.c_str());
488 }
489 }
490}
491
492void
493muteParticipant(const std::string& accountId,
494 const std::string& confId,
495 const std::string& peerId,
496 const bool& state)
497{
498 JAMI_ERROR("muteParticipant is deprecated, please use muteStream");
499 if (const auto account = jami::Manager::instance().getAccount(accountId)) {
500 if (auto conf = account->getConference(confId)) {
501 conf->muteParticipant(peerId, state);
502 } else if (auto call = account->getCall(confId)) {
503 Json::Value root;
504 root["muteParticipant"] = peerId;
505 root["muteState"] = state ? jami::TRUE_STR : jami::FALSE_STR;
506 call->sendConfOrder(root);
507 }
508 }
509}
510
511void
512muteStream(const std::string& accountId,
513 const std::string& confId,
514 const std::string& accountUri,
515 const std::string& deviceId,
516 const std::string& streamId,
517 const bool& state)
518{
519 if (const auto account = jami::Manager::instance().getAccount(accountId)) {
520 if (auto conf = account->getConference(confId)) {
521 conf->muteStream(accountUri, deviceId, streamId, state);
522 } else if (auto call = account->getCall(confId)) {
523 if (call->conferenceProtocolVersion() == 1) {
524 Json::Value sinkVal;
525 sinkVal["muteAudio"] = state;
526 Json::Value mediasObj;
527 mediasObj[streamId] = sinkVal;
528 Json::Value deviceVal;
529 deviceVal["medias"] = mediasObj;
530 Json::Value deviceObj;
531 deviceObj[deviceId] = deviceVal;
532 Json::Value accountVal;
533 deviceVal["devices"] = deviceObj;
534 Json::Value root;
535 root[accountUri] = deviceVal;
536 root["version"] = 1;
537 call->sendConfOrder(root);
538 } else if (call->conferenceProtocolVersion() == 0) {
539 Json::Value root;
540 root["muteParticipant"] = accountUri;
541 root["muteState"] = state ? jami::TRUE_STR : jami::FALSE_STR;
542 call->sendConfOrder(root);
543 }
544 }
545 }
546}
547
548void
549setActiveParticipant(const std::string& accountId,
550 const std::string& confId,
551 const std::string& participant)
552{
553 JAMI_ERR() << "setActiveParticipant is deprecated, please use setActiveStream";
554 if (const auto account = jami::Manager::instance().getAccount(accountId)) {
555 if (auto conf = account->getConference(confId)) {
556 conf->setActiveParticipant(participant);
557 } else if (auto call = account->getCall(confId)) {
558 Json::Value root;
559 root["activeParticipant"] = participant;
560 call->sendConfOrder(root);
561 }
562 }
563}
564
565void
566setActiveStream(const std::string& accountId,
567 const std::string& confId,
568 const std::string& accountUri,
569 const std::string& deviceId,
570 const std::string& streamId,
571 const bool& state)
572{
573 if (const auto account = jami::Manager::instance().getAccount<jami::JamiAccount>(accountId)) {
574 if (auto conf = account->getConference(confId)) {
575 conf->setActiveStream(streamId, state);
576 } else if (auto call = std::static_pointer_cast<jami::SIPCall>(account->getCall(confId))) {
577 call->setActiveMediaStream(accountUri, deviceId, streamId, state);
578 }
579 }
580}
581
582void
583hangupParticipant(const std::string& accountId,
584 const std::string& confId,
585 const std::string& accountUri,
586 const std::string& deviceId)
587{
588 if (const auto account = jami::Manager::instance().getAccount(accountId)) {
589 if (auto conf = account->getConference(confId)) {
590 conf->hangupParticipant(accountUri, deviceId);
591 } else if (auto call = std::static_pointer_cast<jami::SIPCall>(account->getCall(confId))) {
592 if (call->conferenceProtocolVersion() == 1) {
593 Json::Value deviceVal;
594 deviceVal["hangup"] = jami::TRUE_STR;
595 Json::Value deviceObj;
596 deviceObj[deviceId] = deviceVal;
597 Json::Value accountVal;
598 deviceVal["devices"] = deviceObj;
599 Json::Value root;
600 root[accountUri] = deviceVal;
601 root["version"] = 1;
602 call->sendConfOrder(root);
603 } else if (call->conferenceProtocolVersion() == 0) {
604 Json::Value root;
605 root["hangupParticipant"] = accountUri;
606 call->sendConfOrder(root);
607 }
608 }
609 }
610}
611
612void
613raiseParticipantHand(const std::string& accountId,
614 const std::string& confId,
615 const std::string& peerId,
616 const bool& state)
617{
618 JAMI_ERR() << "raiseParticipantHand is deprecated, please use raiseHand";
619 if (const auto account = jami::Manager::instance().getAccount(accountId)) {
620 if (auto conf = account->getConference(confId)) {
621 if (auto call = std::static_pointer_cast<jami::SIPCall>(
622 conf->getCallFromPeerID(peerId))) {
623 if (auto* transport = call->getTransport())
624 conf->setHandRaised(std::string(transport->deviceId()), state);
625 }
626 } else if (auto call = account->getCall(confId)) {
627 Json::Value root;
628 root["handRaised"] = peerId;
629 root["handState"] = state ? jami::TRUE_STR : jami::FALSE_STR;
630 call->sendConfOrder(root);
631 }
632 }
633}
634
635void
636raiseHand(const std::string& accountId,
637 const std::string& confId,
638 const std::string& accountUri,
639 const std::string& deviceId,
640 const bool& state)
641{
642 if (const auto account = jami::Manager::instance().getAccount<jami::JamiAccount>(accountId)) {
643 if (auto conf = account->getConference(confId)) {
644 auto device = deviceId;
645 if (device.empty())
646 device = std::string(account->currentDeviceId());
647 conf->setHandRaised(device, state);
648 } else if (auto call = std::static_pointer_cast<jami::SIPCall>(account->getCall(confId))) {
649 if (call->conferenceProtocolVersion() == 1) {
650 Json::Value deviceVal;
651 deviceVal["raiseHand"] = state;
652 Json::Value deviceObj;
653 std::string device = deviceId.empty() ? std::string(account->currentDeviceId())
654 : deviceId;
655 deviceObj[device] = deviceVal;
656 Json::Value accountVal;
657 deviceVal["devices"] = deviceObj;
658 Json::Value root;
659 std::string uri = accountUri.empty() ? account->getUsername() : accountUri;
660 root[uri] = deviceVal;
661 root["version"] = 1;
662 call->sendConfOrder(root);
663 } else if (call->conferenceProtocolVersion() == 0) {
664 Json::Value root;
665 root["handRaised"] = account->getUsername();
666 root["handState"] = state ? jami::TRUE_STR : jami::FALSE_STR;
667 call->sendConfOrder(root);
668 }
669 }
670 }
671}
672
673} // namespace libjami
Main sound class.
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:1429
bool answerCall(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:1090
bool startRecordedFilePlayback(const std::string &)
Start playback fo a recorded file if and only if audio layer is not already started.
Definition manager.cpp:2322
static LIBJAMI_TEST_EXPORT Manager & instance()
Definition manager.cpp:676
void playDtmf(char code)
Play the dtmf-associated sound.
Definition manager.cpp:1805
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:1614
std::vector< std::string > getCallList() const
Get list of calls (internal subcalls are filter-out)
Definition manager.cpp:2901
bool detachParticipant(const std::string &callId)
Detach a participant from a conference, put the call on hold, do not hangup it.
Definition manager.cpp:1573
bool refuseCall(const std::string &accountId, const std::string &id)
Functions which occur with a user's action Refuse the call.
Definition manager.cpp:1298
bool toggleRecordingCall(const std::string &accountId, const std::string &id)
Set recording on / off Start recording.
Definition manager.cpp:2299
bool offHoldCall(const std::string &accountId, const std::string &callId)
Functions which occur with a user's action Put the call off hold.
Definition manager.cpp:1232
void playTone()
Play a ringtone.
Definition manager.cpp:2081
void createConfFromParticipantList(const std::string &accountId, const std::vector< std::string > &)
Create a conference from a list of participant.
Definition manager.cpp:1515
bool hangupCall(const std::string &accountId, const std::string &callId)
Functions which occur with a user's action Hangup the call.
Definition manager.cpp:1142
void recordingPlaybackSeek(const double value)
Definition manager.cpp:2344
bool onHoldCall(const std::string &accountId, const std::string &callId)
Functions which occur with a user's action Put the call on hold.
Definition manager.cpp:1194
void playToneWithMessage()
Play a special ringtone ( BUSY ) if there's at least one message on the voice mail.
Definition manager.cpp:2090
void stopRecordedFilePlayback()
Stop playback of recorded file.
Definition manager.cpp:2350
bool detachHost(const std::shared_ptr< Conference > &conf={})
Detach the local participant from curent conference.
Definition manager.cpp:1558
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:1357
std::string outgoingCall(const std::string &accountId, const std::string &callee, const std::vector< libjami::MediaMap > &mediaList={})
Place a new call.
Definition manager.cpp:1062
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:1931
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:1266
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:1451
bool holdConference(const std::string &accountId, const std::string &confId)
Hold every participant to a conference.
Definition manager.cpp:1313
void stopTone()
Acts on the audio streams and audio files.
Definition manager.cpp:2068
bool unHoldConference(const std::string &accountId, const std::string &confId)
Unhold all conference participants.
Definition manager.cpp:1330
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:1180
#define JAMI_ERR(...)
Definition logger.h:218
#define JAMI_ERROR(formatstr,...)
Definition logger.h:228
#define JAMI_DBG(...)
Definition logger.h:216
#define JAMI_WARN(...)
Definition logger.h:217
#define JAMI_WARNING(formatstr,...)
Definition logger.h:227
static constexpr const char TRUE_STR[]
static constexpr const char FALSE_STR[]
static void runOnMainThread(Callback &&cb)
Definition manager.h:909
void muteParticipant(const std::string &accountId, const std::string &confId, const std::string &peerId, const bool &state)
DEPRECATED USE muteStream.
LIBJAMI_PUBLIC bool start(const std::filesystem::path &config_file={}) noexcept
Start asynchronously daemon created by init().
Definition ring_api.cpp:81
bool unholdConference(const std::string &accountId, const std::string &confId)
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)
void startSmartInfo(uint32_t refreshTimeMs)
std::string getConferenceId(const std::string &accountId, const std::string &callId)
bool hold(const std::string &accountId, const std::string &callId)
void stopSmartInfo()
std::string placeCall(const std::string &accountId, const std::string &to)
bool switchSecondaryInput(const std::string &accountId, const std::string &confId, const std::string &resource)
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)
bool unhold(const std::string &accountId, const std::string &callId)
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)
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 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)
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)
SIPCall are SIP implementation of a normal Call.