mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-04-22 15:58:46 +00:00
Fix URI handler when calling without a sip address.
This commit is contained in:
parent
2d6026b73b
commit
55a425af3a
2 changed files with 11 additions and 3 deletions
|
|
@ -95,9 +95,9 @@ void CallsListModel::launchAudioCall (const QString &sipAddress, const QString&
|
|||
CoreManager::getInstance()->getTimelineListModel()->mAutoSelectAfterCreation = true;
|
||||
shared_ptr<linphone::Core> core = CoreManager::getInstance()->getCore();
|
||||
|
||||
shared_ptr<linphone::Address> address = core->interpretUrl(Utils::appStringToCoreString(sipAddress));
|
||||
shared_ptr<linphone::Address> address = Utils::interpretUrl(sipAddress);
|
||||
if (!address){
|
||||
qCritical() << "The calling address is not a SIP address : " << sipAddress;
|
||||
qCritical() << "The calling address is not an interpretable SIP address: " << sipAddress;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,15 @@ constexpr int SafeFilePathLimit = 100;
|
|||
}
|
||||
|
||||
std::shared_ptr<linphone::Address> Utils::interpretUrl(const QString& address){
|
||||
return CoreManager::getInstance()->getCore()->interpretUrl(Utils::appStringToCoreString(address));
|
||||
auto interpretedAddress = CoreManager::getInstance()->getCore()->interpretUrl(Utils::appStringToCoreString(address), true);
|
||||
if(!interpretedAddress){// Try by removing scheme.
|
||||
QStringList splitted = address.split(":");
|
||||
if(splitted.size() > 0 && splitted[0] == "sip"){
|
||||
splitted.removeFirst();
|
||||
interpretedAddress = CoreManager::getInstance()->getCore()->interpretUrl(Utils::appStringToCoreString(splitted.join(":")), true);
|
||||
}
|
||||
}
|
||||
return interpretedAddress;
|
||||
}
|
||||
char *Utils::rstrstr (const char *a, const char *b) {
|
||||
size_t a_len = strlen(a);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue