Ring Daemon
Loading...
Searching...
No Matches
configurationmanager.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#ifdef HAVE_CONFIG_H
19#include "config.h"
20#endif
21
23#include "manager.h"
24#include "logger.h"
25#include "fileutils.h"
26#include "sip/sipaccount.h"
27#include "jamidht/jamiaccount.h"
30#include "audio/audiolayer.h"
32#include "account_const.h"
33#include "security_const.h"
34#include "client/jami_signal.h"
37
38#include <dhtnet/ip_utils.h>
39#include <dhtnet/upnp/upnp_context.h>
40#include <dhtnet/certstore.h>
41
42#ifdef __APPLE__
43#include <TargetConditionals.h>
44#endif
45
46#ifdef _MSC_VER
47#include "windirent.h"
48#else
49#include <dirent.h>
50#endif
51
52#include <cerrno>
53#include <cstring>
54
55#ifdef _WIN32
56#undef interface
57#endif
58
59namespace libjami {
60
61constexpr unsigned CODECS_NOT_LOADED = 0x1000;
67
68void
69registerConfHandlers(const std::map<std::string, std::shared_ptr<CallbackWrapperBase>>& handlers)
70{
71 registerSignalHandlers(handlers);
72}
73
74std::map<std::string, std::string>
75getAccountDetails(const std::string& accountId)
76{
78}
79
80std::map<std::string, std::string>
81getVolatileAccountDetails(const std::string& accountId)
82{
84}
85
86std::map<std::string, std::string>
87validateCertificate(const std::string& accountId, const std::string& certificate)
88{
89 try {
90 if (const auto acc = jami::Manager::instance().getAccount<jami::JamiAccount>(accountId))
91 return TlsValidator {acc->certStore(), acc->certStore().getCertificate(certificate)}.getSerializedChecks();
92 } catch (const std::runtime_error& e) {
93 JAMI_WARN("Certificate loading failed: %s", e.what());
94 }
96}
97
98std::map<std::string, std::string>
99validateCertificatePath(const std::string& accountId,
100 const std::string& certificate,
101 const std::string& privateKey,
102 const std::string& privateKeyPass,
103 const std::string& caList)
104{
105 try {
106 if (const auto acc = jami::Manager::instance().getAccount<jami::JamiAccount>(accountId))
107 return TlsValidator {acc->certStore(), certificate, privateKey, privateKeyPass, caList}.getSerializedChecks();
108 } catch (const std::runtime_error& e) {
109 JAMI_WARN("Certificate loading failed: %s", e.what());
111 }
112 return {};
113}
114
115std::map<std::string, std::string>
116getCertificateDetails(const std::string& accountId, const std::string& certificate)
117{
118 try {
119 if (const auto acc = jami::Manager::instance().getAccount<jami::JamiAccount>(accountId))
120 return TlsValidator {acc->certStore(), acc->certStore().getCertificate(certificate)}.getSerializedDetails();
121 } catch (const std::runtime_error& e) {
122 JAMI_WARN("Certificate loading failed: %s", e.what());
123 }
124 return {};
125}
126
127std::map<std::string, std::string>
128getCertificateDetailsPath(const std::string& accountId,
129 const std::string& certificate,
130 const std::string& privateKey,
131 const std::string& privateKeyPassword)
132{
133 try {
134 auto crt = std::make_shared<dht::crypto::Certificate>(jami::fileutils::loadFile(certificate));
135 if (const auto acc = jami::Manager::instance().getAccount<jami::JamiAccount>(accountId)) {
136 TlsValidator validator {acc->certStore(), certificate, privateKey, privateKeyPassword};
137 acc->certStore().pinCertificate(validator.getCertificate(), false);
138 return validator.getSerializedDetails();
139 }
140 } catch (const std::runtime_error& e) {
141 JAMI_WARN("Certificate loading failed: %s", e.what());
142 }
143 return {};
144}
145
146std::vector<std::string>
147getPinnedCertificates(const std::string& accountId)
148{
149 if (const auto acc = jami::Manager::instance().getAccount<jami::JamiAccount>(accountId))
150 return acc->certStore().getPinnedCertificates();
151 return {};
152}
153
154std::vector<std::string>
155pinCertificate(const std::string& accountId, const std::vector<uint8_t>& certificate, bool local)
156{
157 if (const auto acc = jami::Manager::instance().getAccount<jami::JamiAccount>(accountId))
158 return acc->certStore().pinCertificate(certificate, local);
159 return {};
160}
161
162void
163pinCertificatePath(const std::string& accountId, const std::string& path)
164{
165 if (const auto acc = jami::Manager::instance().getAccount<jami::JamiAccount>(accountId))
166 acc->certStore().pinCertificatePath(path);
167}
168
169bool
170unpinCertificate(const std::string& accountId, const std::string& certId)
171{
172 if (const auto acc = jami::Manager::instance().getAccount<jami::JamiAccount>(accountId))
173 return acc->certStore().unpinCertificate(certId);
174 return {};
175}
176
177unsigned
178unpinCertificatePath(const std::string& accountId, const std::string& path)
179{
180 if (const auto acc = jami::Manager::instance().getAccount<jami::JamiAccount>(accountId))
181 return acc->certStore().unpinCertificatePath(path);
182 return {};
183}
184
185bool
186pinRemoteCertificate(const std::string& accountId, const std::string& certId)
187{
188 if (auto acc = jami::Manager::instance().getAccount<jami::JamiAccount>(accountId)) {
189 acc->dht()->findCertificate(dht::InfoHash(certId),
190 [](const std::shared_ptr<dht::crypto::Certificate>& /*crt*/) {});
191 return true;
192 }
193 return false;
194}
195
196bool
197setCertificateStatus(const std::string& accountId, const std::string& certId, const std::string& ststr)
198{
199 try {
200 if (auto acc = jami::Manager::instance().getAccount<jami::JamiAccount>(accountId)) {
201 auto status = dhtnet::tls::TrustStore::statusFromStr(ststr.c_str());
202 return acc->setCertificateStatus(certId, status);
203 }
204 } catch (const std::out_of_range& e) {
205 JAMI_WARNING("Argument out of range when setting certificate status: {}", e);
206 }
207 return false;
208}
209
210std::vector<std::string>
211getCertificatesByStatus(const std::string& accountId, const std::string& ststr)
212{
213 auto status = dhtnet::tls::TrustStore::statusFromStr(ststr.c_str());
214 if (auto acc = jami::Manager::instance().getAccount<jami::JamiAccount>(accountId))
215 return acc->getCertificatesByStatus(status);
216 return {};
217}
218
219void
220setAccountDetails(const std::string& accountId, const std::map<std::string, std::string>& details)
221{
222 jami::Manager::instance().setAccountDetails(accountId, details);
223}
224
225void
226setAccountActive(const std::string& accountId, bool enable, bool shutdownConnections)
227{
228 jami::Manager::instance().setAccountActive(accountId, enable, shutdownConnections);
229}
230
231void
232loadAccountAndConversation(const std::string& accountId, bool loadAll, const std::string& convId)
233{
234 jami::Manager::instance().loadAccountAndConversation(accountId, loadAll, convId);
235}
236
237void
238sendRegister(const std::string& accountId, bool enable)
239{
240 jami::Manager::instance().sendRegister(accountId, enable);
241}
242
243bool
244isPasswordValid(const std::string& accountId, const std::string& password)
245{
246 if (auto acc = jami::Manager::instance().getAccount<JamiAccount>(accountId))
247 return acc->isPasswordValid(password);
248 return false;
249}
250
251std::vector<uint8_t>
252getPasswordKey(const std::string& accountID, const std::string& password)
253{
254 if (auto acc = jami::Manager::instance().getAccount<JamiAccount>(accountID))
255 return acc->getPasswordKey(password);
256 return {};
257}
258
259void
264
265uint64_t
266sendAccountTextMessage(const std::string& accountId,
267 const std::string& to,
268 const std::map<std::string, std::string>& payloads,
269 int32_t flags)
270{
271 bool onlyConnected = flags & 0x1;
272 return jami::Manager::instance().sendTextMessage(accountId, to, payloads, onlyConnected);
273}
274
275std::vector<Message>
276getLastMessages(const std::string& accountId, const uint64_t& base_timestamp)
277{
278 if (const auto acc = jami::Manager::instance().getAccount(accountId))
279 return acc->getLastMessages(base_timestamp);
280 return {};
281}
282
283std::map<std::string, std::string>
284getNearbyPeers(const std::string& accountId)
285{
286 return jami::Manager::instance().getNearbyPeers(accountId);
287}
288
289void
290updateProfile(const std::string& accountId,
291 const std::string& displayName,
292 const std::string& avatar,
293 const std::string& fileType,
294 int32_t flag)
295{
296 if (const auto acc = jami::Manager::instance().getAccount(accountId)) {
297 acc->updateProfile(displayName, avatar, fileType, flag);
298 }
299}
300
301int
302getMessageStatus(uint64_t messageId)
303{
304 return jami::Manager::instance().getMessageStatus(messageId);
305}
306
307int
308getMessageStatus(const std::string& accountId, uint64_t messageId)
309{
310 return jami::Manager::instance().getMessageStatus(accountId, messageId);
311}
312
313void
314setIsComposing(const std::string& accountId, const std::string& conversationUri, bool isWriting)
315{
316 if (const auto acc = jami::Manager::instance().getAccount(accountId))
317 acc->setIsComposing(conversationUri, isWriting);
318}
319
320bool
321setMessageDisplayed(const std::string& accountId,
322 const std::string& conversationUri,
323 const std::string& messageId,
324 int status)
325{
326 if (const auto acc = jami::Manager::instance().getAccount(accountId))
327 return acc->setMessageDisplayed(conversationUri, messageId, status);
328 return false;
329}
330
331int32_t
332addDevice(const std::string& accountId, const std::string& uri)
333{
334 JAMI_DEBUG("[LinkDevice {}] exportToPeer called.", accountId);
335 if (const auto account = jami::Manager::instance().getAccount<jami::JamiAccount>(accountId)) {
336 return account->addDevice(uri);
337 }
338 return static_cast<int32_t>(jami::AccountManager::AddDeviceError::GENERIC);
339}
340
341bool
342confirmAddDevice(const std::string& accountId, uint32_t op_id)
343{
344 if (const auto account = jami::Manager::instance().getAccount<jami::JamiAccount>(accountId)) {
345 return account->confirmAddDevice(op_id);
346 }
347 return false;
348}
349
350bool
351cancelAddDevice(const std::string& accountId, uint32_t op_id)
352{
353 if (const auto account = jami::Manager::instance().getAccount<jami::JamiAccount>(accountId)) {
354 return account->cancelAddDevice(op_id);
355 }
356 return false;
357}
358
359bool
360provideAccountAuthentication(const std::string& accountId,
361 const std::string& credentialsFromUser,
362 const std::string& scheme)
363{
364 if (const auto account = jami::Manager::instance().getAccount<jami::JamiAccount>(accountId)) {
365 // send the password to the channel for communicationg with the old device
366 account->provideAccountAuthentication(credentialsFromUser, scheme);
367 return true;
368 }
369 return false;
370}
371
372bool
373exportToFile(const std::string& accountId,
374 const std::string& destinationPath,
375 const std::string& scheme,
376 const std::string& password)
377{
378 if (const auto account = jami::Manager::instance().getAccount<jami::JamiAccount>(accountId)) {
379 return account->exportArchive(destinationPath, scheme, password);
380 }
381 return false;
382}
383
384bool
385revokeDevice(const std::string& accountId,
386 const std::string& deviceId,
387 const std::string& scheme,
388 const std::string& password)
389{
390 if (const auto account = jami::Manager::instance().getAccount<jami::JamiAccount>(accountId)) {
391 return account->revokeDevice(deviceId, scheme, password);
392 }
393 return false;
394}
395
396std::map<std::string, std::string>
397getKnownRingDevices(const std::string& accountId)
398{
399 if (auto acc = jami::Manager::instance().getAccount<jami::JamiAccount>(accountId))
400 return acc->getKnownDevices();
401 return {};
402}
403
404bool
405changeAccountPassword(const std::string& accountId, const std::string& password_old, const std::string& password_new)
406{
407 if (auto acc = jami::Manager::instance().getAccount<jami::JamiAccount>(accountId))
408 return acc->changeArchivePassword(password_old, password_new);
409 return false;
410}
411
412/* contacts */
413
414void
415addContact(const std::string& accountId, const std::string& uri)
416{
417 if (auto acc = jami::Manager::instance().getAccount<jami::JamiAccount>(accountId))
418 return acc->addContact(uri);
419}
420
421void
422removeContact(const std::string& accountId, const std::string& uri, bool ban)
423{
424 if (auto acc = jami::Manager::instance().getAccount<jami::JamiAccount>(accountId))
425 return acc->removeContact(uri, ban);
426}
427
428std::map<std::string, std::string>
429getContactDetails(const std::string& accountId, const std::string& uri)
430{
431 if (auto acc = jami::Manager::instance().getAccount<jami::JamiAccount>(accountId))
432 return acc->getContactDetails(uri);
433 return {};
434}
435
436std::vector<std::map<std::string, std::string>>
437getContacts(const std::string& accountId)
438{
439 if (auto acc = jami::Manager::instance().getAccount<jami::JamiAccount>(accountId))
440 return acc->getContacts();
441 return {};
442}
443
444/* contact requests */
445std::vector<std::map<std::string, std::string>>
446getTrustRequests(const std::string& accountId)
447{
448 if (auto acc = jami::Manager::instance().getAccount<jami::JamiAccount>(accountId))
449 return acc->getTrustRequests();
450 return {};
451}
452
453bool
454acceptTrustRequest(const std::string& accountId, const std::string& from)
455{
456 if (auto acc = jami::Manager::instance().getAccount<jami::JamiAccount>(accountId))
457 return acc->acceptTrustRequest(from);
458 return false;
459}
460
461bool
462discardTrustRequest(const std::string& accountId, const std::string& from)
463{
464 if (auto acc = jami::Manager::instance().getAccount<jami::JamiAccount>(accountId))
465 return acc->discardTrustRequest(from);
466 return false;
467}
468
469void
470sendTrustRequest(const std::string& accountId, const std::string& to, const std::vector<uint8_t>& payload)
471{
472 if (auto acc = jami::Manager::instance().getAccount<jami::JamiAccount>(accountId))
473 acc->sendTrustRequest(to, payload);
474}
475
477std::map<std::string, std::string>
478getAccountTemplate(const std::string& accountType)
479{
480 if (accountType == Account::ProtocolNames::RING)
482 else if (accountType == Account::ProtocolNames::SIP)
483 return jami::SipAccountConfig().toMap();
484 return {};
485}
486
487std::string
488addAccount(const std::map<std::string, std::string>& details, const std::string& accountId)
489{
490 return jami::Manager::instance().addAccount(details, accountId);
491}
492
493void
494monitor(bool continuous)
495{
496 return jami::Manager::instance().monitor(continuous);
497}
498
499std::vector<std::map<std::string, std::string>>
500getConnectionList(const std::string& accountId, const std::string& conversationId)
501{
502 return jami::Manager::instance().getConnectionList(accountId, conversationId);
503}
504
505std::vector<std::map<std::string, std::string>>
506getConversationConnectivity(const std::string& accountId, const std::string& conversationId)
507{
508 if (auto account = jami::Manager::instance().getAccount<jami::JamiAccount>(accountId)) {
509 return account->getConversationConnectivity(conversationId);
510 }
511 return {};
512}
513
514std::vector<std::map<std::string, std::string>>
515getConversationTrackedMembers(const std::string& accountId, const std::string& conversationId)
516{
517 if (auto account = jami::Manager::instance().getAccount<jami::JamiAccount>(accountId)) {
518 return account->getConversationTrackedMembers(conversationId);
519 }
520 return {};
521}
522
523std::vector<std::map<std::string, std::string>>
524getChannelList(const std::string& accountId, const std::string& connectionId)
525{
526 return jami::Manager::instance().getChannelList(accountId, connectionId);
527}
528
529void
530removeAccount(const std::string& accountId)
531{
532 return jami::Manager::instance().removeAccount(accountId, true); // with 'flush' enabled
533}
534
535std::vector<std::string>
540
545std::vector<unsigned>
547{
548 std::vector<unsigned> list {jami::getSystemCodecContainer()->getSystemCodecInfoIdList(jami::MEDIA_ALL)};
549 if (list.empty())
551 return list;
552}
553
554std::vector<std::string>
559
560std::vector<std::string>
561getSupportedCiphers(const std::string& accountId)
562{
563 if (auto sipaccount = jami::Manager::instance().getAccount<SIPAccount>(accountId))
565 JAMI_ERR("SIP account %s doesn't exist", accountId.c_str());
566 return {};
567}
568
569bool
570setCodecDetails(const std::string& accountId, const unsigned& codecId, const std::map<std::string, std::string>& details)
571{
572 auto acc = jami::Manager::instance().getAccount(accountId);
573 if (!acc) {
574 JAMI_ERR("Unable to find account %s. Unable to set codec details", accountId.c_str());
575 return false;
576 }
577
578 auto codec = acc->searchCodecById(codecId, jami::MEDIA_ALL);
579 if (!codec) {
580 JAMI_ERR("Unable to find codec %d", codecId);
581 return false;
582 }
583 try {
584 if (codec->mediaType & jami::MEDIA_AUDIO) {
585 if (auto foundCodec = std::static_pointer_cast<jami::SystemAudioCodecInfo>(codec)) {
586 foundCodec->setCodecSpecifications(details);
588 return true;
589 }
590 }
591
592 if (codec->mediaType & jami::MEDIA_VIDEO) {
593 if (auto foundCodec = std::static_pointer_cast<jami::SystemVideoCodecInfo>(codec)) {
594 foundCodec->setCodecSpecifications(details);
595 JAMI_WARN("parameters for %s changed ", foundCodec->name.c_str());
596 if (auto call = jami::Manager::instance().getCurrentCall()) {
597 if (call->getVideoCodec() == foundCodec) {
598 JAMI_WARN("%s running. Need to restart encoding", foundCodec->name.c_str());
599 call->restartMediaSender();
600 }
601 }
603 return true;
604 }
605 }
606 } catch (const std::exception& e) {
607 JAMI_ERR("Unable to set codec specifications: %s", e.what());
608 }
609
610 return false;
611}
612
613std::map<std::string, std::string>
614getCodecDetails(const std::string& accountId, const unsigned& codecId)
615{
616 auto acc = jami::Manager::instance().getAccount(accountId);
617 if (!acc) {
618 JAMI_ERR("Unable to find account %s return default codec details", accountId.c_str());
620 }
621
622 auto codec = acc->searchCodecById(codecId, jami::MEDIA_ALL);
623 if (!codec) {
625 return {};
626 }
627
628 if (codec->mediaType & jami::MEDIA_AUDIO)
629 if (auto foundCodec = std::static_pointer_cast<jami::SystemAudioCodecInfo>(codec))
630 return foundCodec->getCodecSpecifications();
631
632 if (codec->mediaType & jami::MEDIA_VIDEO)
633 if (auto foundCodec = std::static_pointer_cast<jami::SystemVideoCodecInfo>(codec))
634 return foundCodec->getCodecSpecifications();
635
637 return {};
638}
639
640std::vector<unsigned>
641getActiveCodecList(const std::string& accountId)
642{
643 if (auto acc = jami::Manager::instance().getAccount(accountId))
644 return acc->getActiveCodecs();
645 JAMI_ERR("Unable to find account %s, returning default", accountId.c_str());
647}
648
649void
650setActiveCodecList(const std::string& accountId, const std::vector<unsigned>& list)
651{
652 if (auto acc = jami::Manager::instance().getAccount(accountId)) {
653 acc->setActiveCodecs(list);
655 } else {
656 JAMI_ERR("Unable to find account %s", accountId.c_str());
657 }
658}
659
660std::vector<std::string>
665
666void
667setAudioPlugin(const std::string& audioPlugin)
668{
669 return jami::Manager::instance().setAudioPlugin(audioPlugin);
670}
671
672std::vector<std::string>
677
678std::vector<std::string>
683
684void
686{
687 return jami::Manager::instance().setAudioDevice(index, AudioDeviceType::PLAYBACK);
688}
689
690void
692{
693 return jami::Manager::instance().setAudioDevice(index, AudioDeviceType::CAPTURE);
694}
695
696void
698{
699 return jami::Manager::instance().setAudioDevice(index, AudioDeviceType::RINGTONE);
700}
701
702std::vector<std::string>
707
708int32_t
709getAudioInputDeviceIndex(const std::string& name)
710{
712}
713
714int32_t
715getAudioOutputDeviceIndex(const std::string& name)
716{
718}
719
720std::string
722{
724 JAMI_DBG("Get audio plugin %s", plugin.c_str());
725 return plugin;
726}
727
728std::string
733
734void
735setNoiseSuppressState(const std::string& state)
736{
738}
739
740std::string
745
746void
747setEchoCancellationState(const std::string& state)
748{
750}
751
752bool
757
758void
763
764bool
769
770void
771setAgcState(bool enabled)
772{
774}
775
776std::string
781
782void
783setRecordPath(const std::string& recPath)
784{
786}
787
788bool
793
794void
799
800bool
802{
803#ifdef ENABLE_VIDEO
804 return jami::Manager::instance().videoPreferences.getRecordPreview();
805#else
806 return false;
807#endif
808}
809
810void
812{
813#ifdef ENABLE_VIDEO
814 jami::Manager::instance().videoPreferences.setRecordPreview(rec);
816#endif
817}
818
819int32_t
821{
822#ifdef ENABLE_VIDEO
823 return jami::Manager::instance().videoPreferences.getRecordQuality();
824#else
825 return 0;
826#endif
827}
828
829void
830setRecordQuality(int32_t quality)
831{
832#ifdef ENABLE_VIDEO
833 jami::Manager::instance().videoPreferences.setRecordQuality(quality);
835#endif
836}
837
838int32_t
843
844void
845setHistoryLimit(int32_t days)
846{
848}
849
850int32_t
852{
853 return static_cast<int32_t>(jami::Manager::instance().getRingingTimeout().count());
854}
855
856void
857setRingingTimeout(int32_t timeout)
858{
859 jami::Manager::instance().setRingingTimeout(std::chrono::seconds(timeout));
860}
861
862std::vector<std::string>
867
868bool
869setAudioManager(const std::string& api)
870{
872}
873
874std::string
879
880void
881setVolume(const std::string& device, double value)
882{
883 if (auto audiolayer = jami::Manager::instance().getAudioDriver()) {
884 JAMI_DBG("set volume for %s: %f", device.c_str(), value);
885
886 if (device == "speaker")
887 audiolayer->setPlaybackGain(value);
888 else if (device == "mic")
889 audiolayer->setCaptureGain(value);
890
892 } else {
893 JAMI_ERR("Audio layer not valid while updating volume");
894 }
895}
896
897double
898getVolume(const std::string& device)
899{
900 if (auto audiolayer = jami::Manager::instance().getAudioDriver()) {
901 if (device == "speaker")
902 return audiolayer->getPlaybackGain();
903 if (device == "mic")
904 return audiolayer->getCaptureGain();
905 }
906
907 JAMI_ERR("Audio layer not valid while updating volume");
908 return 0.0;
909}
910
911// FIXME: we should store "muteDtmf" instead of "playDtmf"
912// in config and avoid negating like this
913bool
918
919void
920muteDtmf(bool mute)
921{
923}
924
925bool
927{
928 if (auto audiolayer = jami::Manager::instance().getAudioDriver())
929 return audiolayer->isCaptureMuted();
930
931 JAMI_ERR("Audio layer not valid");
932 return false;
933}
934
935void
936muteCapture(bool mute)
937{
938 if (auto audiolayer = jami::Manager::instance().getAudioDriver())
939 return audiolayer->muteCapture(mute);
940
941 JAMI_ERR("Audio layer not valid");
942 return;
943}
944
945bool
947{
948 if (auto audiolayer = jami::Manager::instance().getAudioDriver())
949 return audiolayer->isPlaybackMuted();
950
951 JAMI_ERR("Audio layer not valid");
952 return false;
953}
954
955void
956mutePlayback(bool mute)
957{
958 if (auto audiolayer = jami::Manager::instance().getAudioDriver())
959 return audiolayer->mutePlayback(mute);
960
961 JAMI_ERR("Audio layer not valid");
962 return;
963}
964
965bool
967{
968 if (auto audiolayer = jami::Manager::instance().getAudioDriver())
969 return audiolayer->isRingtoneMuted();
970
971 JAMI_ERR("Audio layer not valid");
972 return false;
973}
974
975void
976muteRingtone(bool mute)
977{
978 if (auto audiolayer = jami::Manager::instance().getAudioDriver())
979 return audiolayer->muteRingtone(mute);
980
981 JAMI_ERR("Audio layer not valid");
982 return;
983}
984
985void
986setAccountsOrder(const std::string& order)
987{
989}
990
991std::string
992getAddrFromInterfaceName(const std::string& interface)
993{
994 return dhtnet::ip_utils::getInterfaceAddr(interface, AF_INET);
995}
996
997std::vector<std::string>
999{
1000 return dhtnet::ip_utils::getAllIpInterface();
1001}
1002
1003std::vector<std::string>
1005{
1006 return dhtnet::ip_utils::getAllIpInterfaceByName();
1007}
1008
1009std::vector<std::map<std::string, std::string>>
1010getCredentials(const std::string& accountId)
1011{
1012 if (auto sipaccount = jami::Manager::instance().getAccount<SIPAccount>(accountId))
1013 return sipaccount->getCredentials();
1014 return {};
1015}
1016
1017void
1018setCredentials(const std::string& accountId, const std::vector<std::map<std::string, std::string>>& details)
1019{
1020 if (auto sipaccount = jami::Manager::instance().getAccount<SIPAccount>(accountId)) {
1021 sipaccount->doUnregister();
1022 sipaccount->editConfig([&](jami::SipAccountConfig& config) { config.setCredentials(details); });
1023 sipaccount->loadConfig();
1024 if (sipaccount->isEnabled())
1025 sipaccount->doRegister();
1026 jami::Manager::instance().saveConfig(sipaccount);
1027 }
1028}
1029
1030void
1032{
1033 JAMI_WARN("received connectivity changed - attempting to re-connect enabled accounts");
1034
1035 // reset the UPnP context
1036#if !(defined(TARGET_OS_IOS) && TARGET_OS_IOS)
1037 try {
1038 jami::Manager::instance().upnpContext()->connectivityChanged();
1039 } catch (std::runtime_error& e) {
1040 JAMI_ERR("UPnP context error: %s", e.what());
1041 }
1042#endif
1043
1044 for (const auto& account : jami::Manager::instance().getAllAccounts()) {
1045 account->connectivityChanged();
1046 }
1047}
1048
1049bool
1050lookupName(const std::string& account, const std::string& nameserver, const std::string& name)
1051{
1052 if (account.empty()) {
1053 auto cb =
1054 [name](const std::string& regName, const std::string& address, jami::NameDirectory::Response response) {
1056 name,
1057 (int) response,
1058 address,
1059 regName);
1060 };
1061 if (nameserver.empty())
1062 jami::NameDirectory::lookupUri(name, "", cb);
1063 else
1064 jami::NameDirectory::instance(nameserver).lookupName(name, cb);
1065 return true;
1066 } else if (auto acc = jami::Manager::instance().getAccount<JamiAccount>(account)) {
1067 acc->lookupName(name);
1068 return true;
1069 }
1070 JAMI_ERROR("lookupName: Unknown account: {}", account);
1071 return false;
1072}
1073
1074bool
1075lookupAddress(const std::string& account, const std::string& nameserver, const std::string& address)
1076{
1077 if (account.empty()) {
1079 .lookupAddress(address,
1080 [address](const std::string& regName,
1081 const std::string& addr,
1084 address,
1085 (int) response,
1086 addr,
1087 regName);
1088 });
1089 return true;
1090 } else if (auto acc = jami::Manager::instance().getAccount<JamiAccount>(account)) {
1091 acc->lookupAddress(address);
1092 return true;
1093 }
1094 JAMI_ERROR("lookupAddress: Unknown account: {}", account);
1095 return false;
1096}
1097
1098bool
1099searchUser(const std::string& account, const std::string& query)
1100{
1101 if (auto acc = jami::Manager::instance().getAccount<JamiAccount>(account)) {
1102 return acc->searchUser(query);
1103 }
1104 return false;
1105}
1106
1107bool
1108registerName(const std::string& account, const std::string& name, const std::string& scheme, const std::string& password)
1109{
1110 if (auto acc = jami::Manager::instance().getAccount<JamiAccount>(account)) {
1111 acc->registerName(name, scheme, password);
1112 return true;
1113 }
1114 JAMI_ERROR("registerName: Unknown account: {}", account);
1115 return false;
1116}
1117
1118void
1119setPushNotificationToken(const std::string& token)
1120{
1121 for (const auto& account : jami::Manager::instance().getAllAccounts()) {
1122 account->setPushNotificationToken(token);
1123 }
1124}
1125
1126void
1127setPushNotificationTopic(const std::string& topic)
1128{
1129 for (const auto& account : jami::Manager::instance().getAllAccounts()) {
1130 account->setPushNotificationTopic(topic);
1131 }
1132}
1133
1134void
1135setPushNotificationConfig(const std::map<std::string, std::string>& data)
1136{
1137 for (const auto& account : jami::Manager::instance().getAllAccounts()) {
1138 account->setPushNotificationConfig(data);
1139 }
1140}
1141
1142void
1143pushNotificationReceived(const std::string& from, const std::map<std::string, std::string>& data)
1144{
1145 try {
1146 auto it = data.find("to");
1147 if (it != data.end()) {
1148 if (auto account = jami::Manager::instance().getAccount<JamiAccount>(it->second))
1149 account->pushNotificationReceived(from, data);
1150 }
1151#if defined(__ANDROID__) || defined(ANDROID) || defined(__Apple__)
1152 else {
1153 for (const auto& sipAccount : jami::Manager::instance().getAllAccounts<SIPAccount>()) {
1154 sipAccount->pushNotificationReceived(from, data);
1155 }
1156 }
1157#endif
1158 } catch (const std::exception& e) {
1159 JAMI_ERR("Error processing push notification: %s", e.what());
1160 }
1161}
1162
1163bool
1164isAudioMeterActive(const std::string& id)
1165{
1167}
1168
1169void
1170setAudioMeterState(const std::string& id, bool state)
1171{
1173}
1174
1175void
1176setDefaultModerator(const std::string& accountId, const std::string& peerURI, bool state)
1177{
1178 jami::Manager::instance().setDefaultModerator(accountId, peerURI, state);
1179}
1180
1181std::vector<std::string>
1182getDefaultModerators(const std::string& accountId)
1183{
1185}
1186
1187void
1188enableLocalModerators(const std::string& accountId, bool isModEnabled)
1189{
1190 jami::Manager::instance().enableLocalModerators(accountId, isModEnabled);
1191}
1192
1193bool
1194isLocalModeratorsEnabled(const std::string& accountId)
1195{
1197}
1198
1199void
1200setAllModerators(const std::string& accountId, bool allModerators)
1201{
1202 jami::Manager::instance().setAllModerators(accountId, allModerators);
1203}
1204
1205bool
1206isAllModerators(const std::string& accountId)
1207{
1208 return jami::Manager::instance().isAllModerators(accountId);
1209}
1210
1211void
1212setResourceDirPath(const std::string& resourceDir)
1213{
1215}
1216
1217} // namespace libjami
Main sound class.
#define PCM_DMIX_DSNOOP
Definition audiolayer.h:50
#define PCM_DEFAULT
Definition audiolayer.h:48
static std::vector< unsigned > getDefaultCodecsId()
Definition account.cpp:260
static std::map< std::string, std::string > getDefaultCodecDetails(const unsigned &codecId)
Definition account.cpp:266
bool setRecordPath(const std::string &r)
static std::vector< std::string > getSupportedAudioManagers()
const std::string & getRecordPath() const
Ring Account is build on top of SIPAccountBase and uses DHT to handle call connectivity.
Definition jamiaccount.h:93
void setAudioDevice(int index, AudioDeviceType streamType)
Set audio device.
Definition manager.cpp:2177
std::map< std::string, std::string > getAccountDetails(const std::string &accountID) const
Retrieve details about a given account.
Definition manager.cpp:2700
void setVoiceActivityDetectionState(bool state)
Set the voice activity detection engine state in the current audio layer.
Definition manager.cpp:2493
void enableLocalModerators(const std::string &accountID, bool state)
Definition manager.cpp:3289
void loadAccountAndConversation(const std::string &accountId, bool loadAll, const std::string &convId)
Definition manager.cpp:3032
std::vector< std::shared_ptr< T > > getAllAccounts() const
Get a list of account pointers of type T (baseclass Account)
Definition manager.h:763
std::string getEchoCancellationState() const
Get the echo cancellation engine state in the current audio layer.
Definition manager.cpp:2475
std::vector< std::string > getDefaultModerators(const std::string &accountID)
Definition manager.cpp:3276
std::vector< std::string > getAccountList() const
Get account list.
Definition manager.cpp:2687
bool isLocalModeratorsEnabled(const std::string &accountID)
Definition manager.cpp:3296
void setAccountsOrder(const std::string &order)
Set the account order in the config file.
Definition manager.cpp:2678
void setAllModerators(const std::string &accountID, bool allModerators)
Definition manager.cpp:3307
std::vector< std::map< std::string, std::string > > getConnectionList(const std::string &accountId, const std::string &conversationId)
Definition manager.cpp:975
static LIBJAMI_TEST_EXPORT Manager & instance()
Definition manager.cpp:694
void setAccountActive(const std::string &accountID, bool active, bool shutdownConnections)
Definition manager.cpp:3015
void registerAccounts()
Send registration for all enabled accounts.
Definition manager.cpp:2951
std::shared_ptr< dhtnet::upnp::UPnPContext > upnpContext() const
Definition manager.cpp:1740
void setHistoryLimit(int days)
Set the maximum number of days to keep in the history.
Definition manager.cpp:2369
std::map< std::string, std::string > getVolatileAccountDetails(const std::string &accountID) const
Retrieve volatile details such as recent registration errors.
Definition manager.cpp:2714
std::shared_ptr< T > getAccount(std::string_view accountId) const
Get an account pointer, looks for account of type T.
Definition manager.h:753
std::vector< std::string > getAudioOutputDeviceList()
Get list of supported audio output device.
Definition manager.cpp:2202
bool getIsAlwaysRecording() const
Get is always recording functionality.
Definition manager.cpp:2296
void setAccountDetails(const std::string &accountID, const std::map< std::string, std::string > &details)
Save the details of an existing account, given the account ID This will load the configuration map wi...
Definition manager.cpp:2727
std::string addAccount(const std::map< std::string, std::string > &details, const std::string &accountId={})
Add a new account, and give it a new account ID automatically.
Definition manager.cpp:2773
void saveConfig()
Save config to file.
Definition manager.cpp:1755
void setNoiseSuppressState(const std::string &state)
Set the noise reduction engine state in the current audio layer.
Definition manager.cpp:2469
std::vector< std::map< std::string, std::string > > getChannelList(const std::string &accountId, const std::string &connectionId)
Definition manager.cpp:1002
std::string getAudioManager() const
Get the audio manager.
Definition manager.cpp:2425
void setAudioPlugin(const std::string &audioPlugin)
Set input audio plugin.
Definition manager.cpp:2161
void setDefaultModerator(const std::string &accountID, const std::string &peerURI, bool state)
Definition manager.cpp:3260
std::map< std::string, std::string > getNearbyPeers(const std::string &accountID)
Definition manager.cpp:3252
bool setAudioManager(const std::string &api)
Set the audio manager.
Definition manager.cpp:2397
RingBufferPool & getRingBufferPool()
Return a pointer to the instance of the RingBufferPool.
Definition manager.cpp:3197
int getAudioInputDeviceIndex(const std::string &name)
Get index of an audio device.
Definition manager.cpp:2431
VoipPreference voipPreferences
Voip related preferences.
Definition manager.h:85
void monitor(bool continuous)
Definition manager.cpp:949
uint64_t sendTextMessage(const std::string &accountID, const std::string &to, const std::map< std::string, std::string > &payloads, bool fromPlugin=false, bool onlyConnected=false)
Definition manager.cpp:2976
int getHistoryLimit() const
Get the maximum number of days to keep in the history.
Definition manager.cpp:2377
bool isAllModerators(const std::string &accountID)
Definition manager.cpp:3314
bool getVoiceActivityDetectionState() const
Get the voice activity detection engine state from the current audio layer.
Definition manager.cpp:2487
std::string getCurrentAudioOutputPlugin() const
Get current alsa plugin.
Definition manager.cpp:2457
void setIsAlwaysRecording(bool isAlwaysRec)
Set is always recording functionality, every calls will then be set in RECORDING mode once answered.
Definition manager.cpp:2302
std::chrono::seconds getRingingTimeout() const
Get ringing timeout (number of seconds after which a call will enter BUSY state if not answered).
Definition manager.cpp:2391
std::string getNoiseSuppressState() const
Get the noise reduction engine state from the current audio layer.
Definition manager.cpp:2463
void removeAccount(const std::string &accountID, bool flush=false)
Delete an existing account, unregister VoIPLink associated, and purge from configuration.
Definition manager.cpp:2822
bool isAGCEnabled() const
Definition manager.cpp:2499
void setAGCState(bool enabled)
Definition manager.cpp:2505
void sendRegister(const std::string &accountId, bool enable)
ConfigurationManager - Send registration request.
Definition manager.cpp:2960
std::vector< std::string > getAudioInputDeviceList()
Get list of supported audio input device.
Definition manager.cpp:2218
AudioPreference audioPreference
Audio preferences.
Definition manager.h:90
int getAudioOutputDeviceIndex(const std::string &name)
Definition manager.cpp:2444
int getMessageStatus(uint64_t id) const
Definition manager.cpp:3001
void setRingingTimeout(std::chrono::seconds timeout)
Set ringing timeout (number of seconds after which a call will enter BUSY state if not answered).
Definition manager.cpp:2383
void setEchoCancellationState(const std::string &state)
Get the echo cancellation engine state from the current audio layer.
Definition manager.cpp:2481
std::vector< std::string > getCurrentAudioDevicesIndex()
Get string array representing integer indexes of output, input, and ringtone device.
Definition manager.cpp:2234
void lookupName(const std::string &name, LookupCallback cb)
void lookupAddress(const std::string &addr, LookupCallback cb)
static void lookupUri(std::string_view uri, const std::string &default_server, LookupCallback cb)
static NameDirectory & instance()
void setAudioMeterState(const std::string &id, bool state)
bool isAudioMeterActive(const std::string &id)
static const std::vector< std::string > & getSupportedTlsCiphers()
static const std::vector< std::string > & getSupportedTlsProtocols()
void setPlayDtmf(bool dtmf)
bool getPlayDtmf() const
std::shared_ptr< dht::crypto::Certificate > getCertificate() const
std::map< std::string, std::string > getSerializedChecks()
Convert all checks results into a string map.
std::map< std::string, std::string > getSerializedDetails()
Get a map with all common certificate details.
#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
void set_resource_dir_path(const std::filesystem::path &resourceDirPath)
Set the program's resource directory path.
std::vector< uint8_t > loadFile(const std::filesystem::path &path, const std::filesystem::path &default_dir)
Read the full content of a file at path.
decltype(getGlobalInstance< SystemCodecContainer >) & getSystemCodecContainer
void emitSignal(Args... args)
Definition jami_signal.h:64
AudioDeviceType
Definition audiolayer.h:57
@ MEDIA_AUDIO
Definition media_codec.h:46
@ MEDIA_ALL
Definition media_codec.h:48
@ MEDIA_VIDEO
Definition media_codec.h:47
static constexpr const char RING[]
static constexpr const char SIP[]
static constexpr char EXIST[]
std::vector< std::string > getDefaultModerators(const std::string &accountId)
Get default moderators for an account.
bool unpinCertificate(const std::string &accountId, const std::string &certId)
void setRingingTimeout(int32_t timeout)
void muteRingtone(bool mute)
std::vector< std::string > pinCertificate(const std::string &accountId, const std::vector< uint8_t > &certificate, bool local)
std::vector< Message > getLastMessages(const std::string &accountId, const uint64_t &base_timestamp)
void setAudioPlugin(const std::string &audioPlugin)
void setActiveCodecList(const std::string &accountId, const std::vector< unsigned > &list)
void setAccountDetails(const std::string &accountId, const std::map< std::string, std::string > &details)
void setHistoryLimit(int32_t days)
void setAccountsOrder(const std::string &order)
void setVolume(const std::string &device, double value)
std::vector< std::map< std::string, std::string > > getChannelList(const std::string &accountId, const std::string &connectionId)
std::vector< unsigned > getCodecList()
Send the list of all codecs loaded to the client through DBus.
bool isLocalModeratorsEnabled(const std::string &accountId)
Get local moderators state.
void setRecordPath(const std::string &recPath)
bool setCertificateStatus(const std::string &accountId, const std::string &certId, const std::string &ststr)
bool setAudioManager(const std::string &api)
uint64_t sendAccountTextMessage(const std::string &accountId, const std::string &to, const std::map< std::string, std::string > &payloads, int32_t flags)
void setAudioRingtoneDevice(int32_t index)
std::string getAddrFromInterfaceName(const std::string &interface)
bool lookupName(const std::string &account, const std::string &nameserver, const std::string &name)
int32_t getRecordQuality()
std::vector< std::string > getAudioPluginList()
void loadAccountAndConversation(const std::string &accountId, bool loadAll, const std::string &convId)
bool searchUser(const std::string &account, const std::string &query)
int32_t getAudioOutputDeviceIndex(const std::string &name)
void setPushNotificationToken(const std::string &token)
Set the device push notification token (for all accounts).
void setAudioMeterState(const std::string &id, bool state)
Enables/disables an audio meter for the specified @id.
bool confirmAddDevice(const std::string &accountId, uint32_t op_id)
void setIsAlwaysRecording(bool rec)
int32_t getRingingTimeout()
std::vector< std::map< std::string, std::string > > getConversationTrackedMembers(const std::string &accountId, const std::string &conversationId)
bool setCodecDetails(const std::string &accountId, const unsigned &codecId, const std::map< std::string, std::string > &details)
void mutePlayback(bool mute)
void sendTrustRequest(const std::string &accountId, const std::string &to, const std::vector< uint8_t > &payload)
void pushNotificationReceived(const std::string &from, const std::map< std::string, std::string > &data)
To be called by clients with relevant data when a push notification is received.
void registerConfHandlers(const std::map< std::string, std::shared_ptr< CallbackWrapperBase > > &handlers)
std::vector< std::string > getPinnedCertificates(const std::string &accountId)
std::map< std::string, std::string > getCertificateDetailsPath(const std::string &accountId, const std::string &certificate, const std::string &privateKey, const std::string &privateKeyPassword)
std::vector< std::string > getAccountList()
bool isAllModerators(const std::string &accountId)
Get all moderators state.
std::vector< unsigned > getActiveCodecList(const std::string &accountId)
std::vector< std::string > getSupportedAudioManagers()
std::map< std::string, std::string > getContactDetails(const std::string &accountId, const std::string &uri)
int32_t getAudioInputDeviceIndex(const std::string &name)
void updateProfile(const std::string &accountId, const std::string &displayName, const std::string &avatar, const std::string &fileType, int32_t flag)
void setAccountActive(const std::string &accountId, bool enable, bool shutdownConnections)
std::map< std::string, std::string > getCodecDetails(const std::string &accountId, const unsigned &codecId)
std::string addAccount(const std::map< std::string, std::string > &details, const std::string &accountId)
int32_t addDevice(const std::string &accountId, const std::string &uri)
bool acceptTrustRequest(const std::string &accountId, const std::string &from)
void setIsComposing(const std::string &accountId, const std::string &conversationUri, bool isWriting)
void setRecordPreview(bool rec)
void muteCapture(bool mute)
bool revokeDevice(const std::string &accountId, const std::string &deviceId, const std::string &scheme, const std::string &password)
bool changeAccountPassword(const std::string &accountId, const std::string &password_old, const std::string &password_new)
void setResourceDirPath(const std::string &resourceDir)
Set the resource directory path.
void setAudioInputDevice(int32_t index)
std::string getCurrentAudioOutputPlugin()
std::vector< std::string > getAllIpInterface()
bool pinRemoteCertificate(const std::string &accountId, const std::string &certId)
void setPushNotificationTopic(const std::string &topic)
Set the topic for ios bundle_id for ios 14.5 and higher bundle_id.voip for ios prior 14....
double getVolume(const std::string &device)
void setAudioOutputDevice(int32_t index)
std::vector< std::string > getCertificatesByStatus(const std::string &accountId, const std::string &ststr)
void muteDtmf(bool mute)
void registerSignalHandlers(const std::map< std::string, std::shared_ptr< CallbackWrapperBase > > &handlers)
std::map< std::string, std::string > getCertificateDetails(const std::string &accountId, const std::string &certificate)
std::vector< std::map< std::string, std::string > > getCredentials(const std::string &accountId)
constexpr unsigned CODECS_NOT_LOADED
std::string getRecordPath()
bool isAudioMeterActive(const std::string &id)
Returns whether or not the audio meter is enabled for ring buffer @id.
bool getIsAlwaysRecording()
std::vector< std::string > getAllIpInterfaceByName()
void sendRegister(const std::string &accountId, bool enable)
std::string getNoiseSuppressState()
bool exportToFile(const std::string &accountId, const std::string &destinationPath, const std::string &scheme, const std::string &password)
int32_t getHistoryLimit()
void setNoiseSuppressState(const std::string &state)
bool lookupAddress(const std::string &account, const std::string &nameserver, const std::string &address)
std::vector< std::map< std::string, std::string > > getConnectionList(const std::string &accountId, const std::string &conversationId)
bool registerName(const std::string &account, const std::string &name, const std::string &scheme, const std::string &password)
std::vector< std::string > getAudioInputDeviceList()
bool isPasswordValid(const std::string &accountId, const std::string &password)
std::vector< uint8_t > getPasswordKey(const std::string &accountID, const std::string &password)
std::vector< std::string > getCurrentAudioDevicesIndex()
std::vector< std::map< std::string, std::string > > getTrustRequests(const std::string &accountId)
void setVoiceActivityDetectionState(bool state)
void setAgcState(bool enabled)
void enableLocalModerators(const std::string &accountId, bool isModEnabled)
Enable/disable local moderators for conferences.
void addContact(const std::string &accountId, const std::string &uri)
std::map< std::string, std::string > getKnownRingDevices(const std::string &accountId)
std::string getEchoCancellationState()
std::vector< std::map< std::string, std::string > > getConversationConnectivity(const std::string &accountId, const std::string &conversationId)
bool getVoiceActivityDetectionState()
void removeAccount(const std::string &accountId)
void setRecordQuality(int32_t quality)
std::map< std::string, std::string > getAccountDetails(const std::string &accountId)
bool provideAccountAuthentication(const std::string &accountId, const std::string &credentialsFromUser, const std::string &scheme)
std::vector< std::string > getSupportedTlsMethod()
bool discardTrustRequest(const std::string &accountId, const std::string &from)
void setAllModerators(const std::string &accountId, bool allModerators)
Enable/disable all moderators for conferences.
int getMessageStatus(uint64_t messageId)
std::vector< std::string > getAudioOutputDeviceList()
std::map< std::string, std::string > getVolatileAccountDetails(const std::string &accountId)
void setCredentials(const std::string &accountId, const std::vector< std::map< std::string, std::string > > &details)
bool setMessageDisplayed(const std::string &accountId, const std::string &conversationUri, const std::string &messageId, int status)
void pinCertificatePath(const std::string &accountId, const std::string &path)
std::map< std::string, std::string > getAccountTemplate(const std::string &accountType)
This function is used as a base for new accounts for clients that support it.
void removeContact(const std::string &accountId, const std::string &uri, bool ban)
std::map< std::string, std::string > validateCertificate(const std::string &accountId, const std::string &certificate)
std::map< std::string, std::string > getNearbyPeers(const std::string &accountId)
bool cancelAddDevice(const std::string &accountId, uint32_t op_id)
std::vector< std::map< std::string, std::string > > getContacts(const std::string &accountId)
void setPushNotificationConfig(const std::map< std::string, std::string > &data)
void monitor(bool continuous)
unsigned unpinCertificatePath(const std::string &accountId, const std::string &path)
std::vector< std::string > getSupportedCiphers(const std::string &accountId)
void setDefaultModerator(const std::string &accountId, const std::string &peerURI, bool state)
Add/remove default moderator for conferences.
std::map< std::string, std::string > validateCertificatePath(const std::string &accountId, const std::string &certificate, const std::string &privateKey, const std::string &privateKeyPass, const std::string &caList)
std::string getAudioManager()
void setEchoCancellationState(const std::string &state)
A SIP Account specify SIP specific functions and object = SIPCall/SIPVoIPLink)
std::map< std::string, std::string > toMap() const override
std::map< std::string, std::string > toMap() const override
void setCredentials(const std::vector< std::map< std::string, std::string > > &creds)