I am using `linphone-sdk` c++. I have written a simple server that gets a SIP address and calls it. Then it starts to get images from the sip call.
My code does work fine when only calls to one SIP address. But when I call the second address, it starts showing weird behavior. Sometimes it works fine but often it does not work properly. Most of the time it freezes when it calls a second address.
here is the main part of my code:
core = linphone::Factory::get()->createCore("", "" ,nullptr);
core->addListener(listeners);
core->enableDnsSrv(true);
core->setAvpfMode(linphone::AVPFMode::Enabled);
core->enableVideoDisplay(true);
core->enableVideoPreview(false);
core->enableVideoAdaptiveJittcomp(true);
core->setMediaEncryption(linphone::MediaEncryption::None);
core->enableConferenceServer(false);
auto transports = core->getTransports();
transports->setTcpPort(LC_SIP_TRANSPORT_DONTBIND);
transports->setTlsPort(LC_SIP_TRANSPORT_DISABLED);
transports->setDtlsPort(LC_SIP_TRANSPORT_DISABLED);
transports->setUdpPort(LC_SIP_TRANSPORT_DISABLED);
core->setTransports(transports);
auto address = core->createPrimaryContactParsed();
address->setDisplayName(<client name>);
address->setUsername(<client name>);
address->setDomain("127.0.0.1");
core->setPrimaryContact(address->asString());
core->start();
//Setup Call
std::shared_ptr<linphone::CallParams> call_params = core->createCallParams(nullptr);
call_params->enableAvpf(true);
call_params->enableAudio(false);
call_params->setSessionName(client_email);
call_params->setVideoDirection(linphone::MediaDirection::RecvOnly);
call = core->inviteWithParams(uri, call_params);
call->enableCamera(false);
VideoStream *vstream = nullptr;
auto call_cptr = call->cPtr();
vstream = (VideoStream *)linphone_call_get_stream(call_cptr, LinphoneStreamTypeVideo);
if (vstream) {
video_stream_set_render_callback(vstream, SipClient::video_stream_render_cb, this);
}