网址方案sip:on chrome扩展程序不起作用

On a chrome extension app (in browser works perfect, in the app doesn't) i added

<a href="sip:phonenr"> phonenr </a> 

but every time i click on it i get this message:

This site can’t be reached

The webpage at sip:phonenr might be temporarily down or it may have moved permanently to a new web address.

ERR_UNKNOWN_URL_SCHEME

"tel:phonenr" --- also doesn't work

"mailto:test@test.com" --- don't know how, but it works

Any solutions ?

L-am facut saraciieeeee! (Ignore this :) )

You can catch the error with the loadabort listener, filter out your url specific to your needs, I needed to create a new url from the tel/sip request, and I sent some extra params after the phone number. If the url is created correcty I open a new tab in the browser (chrome.browser.openTab), the url shows a simple page with a link with href="tel:xxxxx", that works find with 3rd party apps. At the end we go back 1 history so the chrome packaged app doesn't display the error message.

That is the compromise solution I have found.

webview.addEventListener('loadabort', function(e) {
        if (e.url.match(/^tel:/)) {
            var url = e.url.replace('tel:', '').replace('link=', '');
            url = url.split('?');
            if(url) {
                chrome.browser.openTab({url: url[1] + '?phone=' + url[0] });
            }
            webview.go(-1);
        }
    });