0

I made a chrome extension that finds phone number in our crm. Uptil now, it works. I can console.log it and it displays correctly.

We have jitsi softphone which has a URL handler configured. So, whenever I click any link with "sip:444@sipdomain", it fires jitsi and place call directly.

Is it possible to achieve that from my browserAction or simply call that from javascript without reloading the page?

Alex Rizvi
  • 109
  • 1
  • 6
  • One way that I could think of: create a link element with the number, then trigger click event. Is there a better way? – Alex Rizvi Feb 28 '19 at 12:28

1 Answers1

1

This is what I did and resolved the issue:

var link = document.createElement('a');
link.href = "sip:"+phone.val()+"@sip1.nomado.eu";
document.body.appendChild(link);
link.click();  

Thanks to: https://stackoverflow.com/a/15164712/8648175

Alex Rizvi
  • 109
  • 1
  • 6