forked from Siperb/node-pjsip
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.cpp
More file actions
28 lines (23 loc) · 668 Bytes
/
test.cpp
File metadata and controls
28 lines (23 loc) · 668 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <pjsua2.hpp>
#include <iostream>
int main() {
try {
pj::Endpoint ep;
ep.libCreate();
std::cout << "libCreate OK" << std::endl;
pj::EpConfig cfg;
cfg.logConfig.level = 4;
cfg.logConfig.consoleLevel = 4;
cfg.uaConfig.maxCalls = 4;
cfg.uaConfig.threadCnt = 0;
cfg.uaConfig.mainThreadOnly = true;
ep.libInit(cfg);
std::cout << "libInit OK" << std::endl;
ep.libDestroy();
std::cout << "libDestroy OK" << std::endl;
} catch (pj::Error& err) {
std::cerr << "PJSUA2 ERROR: " << err.info() << std::endl;
return 1;
}
return 0;
}