diff --git a/linphone-app/src/components/calls/CallsListModel.cpp b/linphone-app/src/components/calls/CallsListModel.cpp index dca8d9c49..71782c2a6 100644 --- a/linphone-app/src/components/calls/CallsListModel.cpp +++ b/linphone-app/src/components/calls/CallsListModel.cpp @@ -95,9 +95,9 @@ void CallsListModel::launchAudioCall (const QString &sipAddress, const QString& CoreManager::getInstance()->getTimelineListModel()->mAutoSelectAfterCreation = true; shared_ptr core = CoreManager::getInstance()->getCore(); - shared_ptr address = core->interpretUrl(Utils::appStringToCoreString(sipAddress)); + shared_ptr 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; } diff --git a/linphone-app/src/utils/Utils.cpp b/linphone-app/src/utils/Utils.cpp index 0c1bdacea..1f8c28653 100644 --- a/linphone-app/src/utils/Utils.cpp +++ b/linphone-app/src/utils/Utils.cpp @@ -46,7 +46,15 @@ constexpr int SafeFilePathLimit = 100; } std::shared_ptr 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);