Skip to content
Snippets Groups Projects
Commit cdade5de authored by Philippe Gorley's avatar Philippe Gorley Committed by Sébastien Blin
Browse files

sipcall: set peer registered name on outgoing call


Change-Id: Ibac1ee25ce9c2df377e66918887ac43db6d4839a
Reviewed-by: default avatarSebastien Blin <sebastien.blin@savoirfairelinux.com>
parent 2f54707d
No related branches found
No related tags found
No related merge requests found
...@@ -393,6 +393,14 @@ RingAccount::startOutgoingCall(const std::shared_ptr<SIPCall>& call, const std:: ...@@ -393,6 +393,14 @@ RingAccount::startOutgoingCall(const std::shared_ptr<SIPCall>& call, const std::
call->setState(Call::ConnectionState::TRYING); call->setState(Call::ConnectionState::TRYING);
std::weak_ptr<SIPCall> wCall = call; std::weak_ptr<SIPCall> wCall = call;
#if HAVE_RINGNS
nameDir_.get().lookupAddress(toUri, [wCall](const std::string& result, const NameDirectory::Response& response){
if (response == NameDirectory::Response::found)
if (auto call = wCall.lock())
call->setPeerRegistredName(result);
});
#endif
// Find listening Ring devices for this account // Find listening Ring devices for this account
dht::InfoHash peer_account(toUri); dht::InfoHash peer_account(toUri);
forEachDevice(peer_account, [wCall, toUri, peer_account](const std::shared_ptr<RingAccount>& sthis, const dht::InfoHash& dev) forEachDevice(peer_account, [wCall, toUri, peer_account](const std::shared_ptr<RingAccount>& sthis, const dht::InfoHash& dev)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment