Solved Chrome extension doens't handle tel:uri

Status
Not open for further replies.

drenda

Forum User
Joined
May 3, 2020
Messages
30
Reaction score
10
In my application I'm using tel: protocol around my phone numbers. For example:

Code:
<a [href]="'tel:'+row.mobilePhone">+3902123456789</a>

Unfortunally when the web extension is active, it changes the DOM of the web application and the url becomes:

Code:
<a _ngcontent-txu-c315="" href="+390212345678" title="Call +390212345678 via 3CX" tcxhref="+390212345678" target="_blank">+390212345678</a>

So when I click on the link the call doesn't start and a new page of the application is opened.

As stated from Google, https://developers.google.com/web/fundamentals/native-hardware/click-to-call , the tel: protocol should be used where possible. Do you have any hint to solve this problem?

Thanks
 
Hello @drenda,

You can proceed and disable completely or exclude that specific URL from the Chrome Extension. By disabling or excluding the conversion of those numbers will not take place. As a result you can use the tel protocol with whatever application you would like to use it.

1589180637870.png
 
Thanks for your suggestion. I already tried that setting but the resul is: when I click on the <a href="tel:+3902123456"> the 3CX web extension doesn't intercept the request and the browser try to use one of applications registered for the protocol tel.

On the other hand, if I use a <span> tag instead of <a> like: "<span>+3902123456</span>", then the 3CX web extension works fine because 3CX change the DOM in this way:

Code:
<tcxspan tcxhref="+3902123456" title="Call  +3902123456  via 3CX"> +3902123456 </tcxspan>

I think the 3CX should change the DOM differently when a tag like this is met:

Code:
<a href="tel:+3902123456">+3902123456</a>

Right now 3CX does:

Code:
<a href="+3902123456" title="Call +3902123456 via 3CX" tcxhref="+3902123456" target="_blank">+3902123456</a>

that IMHO is wrong because in every web application this open a new page returning a HTTP 404 probably.

Instead I think 3CX should change the <a> tag to a <span> tag in order to handle directly the interaction avoiding any unexpected result.

Thanks!
 
Hello @drenda ,

The scenario that you describe is a behavior due to the implementation that you have in your application. We cannot have the span as part of our conversion process, as this might affect the look and feel of the customer websites.

You might though change your implementation of the a href links and adopt the spans that seem to work correctly in your case.

Also, something that we've noticed is that you use Angular. Angular might prevent the execution of the custom code that we have for the parsing of phone numbers, and as a result, the conversion process is not completed successfully.

Something else that you can try is to try with a static phone link, instead of a dynamic generated by Angular.
 
Thanks for pointing out the fact that Angular cloud block the event. In fact you were right. We solved the problem.

Thanks very much
 
  • Like
Reactions: accentlogic
Status
Not open for further replies.

Forum statistics

Threads
112,025
Messages
590,367
Members
164,976
Latest member
Roman Mazur