Geoffroy de Corbiac 0 Posted December 30, 2020 Report Share Posted December 30, 2020 Hello everyone, I'm trying to integrate some Vodia services to our personnal ERP. Here is the situation : A company is hosting our pbx : for example company.pbx.com We are hosting our ERP : for example erp.com Is it possible to initiate a js WebSocket inside a script hosted by our ERP to the pbx ? I tried several authentication methods without any success. Another problem : I want to integrate call buttons inside pages of our ERP (according to the documentation https://api.vodia.com/click-to-call_api) but I didn't manage to get rid of the authentication popup. And by the way, the autentication popup failed to let me in when I fill in the correct login and password. Is the documentation still valid ? Thanks in advance for your help. Quote Link to post Share on other sites
Vodia PBX 0 Posted December 30, 2020 Report Share Posted December 30, 2020 Web socket will be a problem — however if you have it running on a public (routable) IP where both the ERP and the PBX can send each other requests there is usually no need for a web socket connection. If you like we can give you a JavaScript template that you can use as a starting point to script your own ERP interactions. Please open a ticket at support.vodia.com is you are interested in that. There is another document at https://doc.vodia.com/click2dial that you might want to look at. If you can control what is sent from the ERP system, you can include clickable links that will start the calls and you can also hang up from there (like a small WebRTC based soft phone). The other benefit of this solution is that the users don't have to enter any passwords as long as they are logged into the ERP. Quote Link to post Share on other sites
Geoffroy de Corbiac 0 Posted December 30, 2020 Author Report Share Posted December 30, 2020 ok thank you for your proposal, I will open a ticket. Concerning the link to the click2dial document, I will try again tomorrow but last time I tried, it didn't work. It always challenged me with user and password Quote Link to post Share on other sites
Geoffroy de Corbiac 0 Posted December 31, 2020 Author Report Share Posted December 31, 2020 So I tried again to integrate links according to https://doc.vodia.com/click2dial document. None of different links worked as expected : http://pbx/remote_call.htm?user=123&extension=true&dest=123456789&time=current_time&duration=3600&auth=hash I tried with user 101@pbx_domain, 101 and for "auth" field I tried with both 101@pbx_domain and 101. No success, it shows me the authentication popup http://pbx/remote_call.htm?user=123%40domain.com&dest=123456789&auth=MTIzQGRvbWFpbi5jb206cGFzc3dvcmQ%3D i tried with many users and passwords, no success neither. it shows the autentication popup. What is weird is that when I fill in the popup the user and password, the autentication does not work. Whereas, when I use the same credentials to log in https://pbx_domain, it's working. Did I miss something ? Is it a configuration mistake of my pbx provider ? Quote Link to post Share on other sites
Geoffroy de Corbiac 0 Posted December 31, 2020 Author Report Share Posted December 31, 2020 14 hours ago, Vodia PBX said: Please open a ticket at support.vodia.com is you are interested in that I don't have an account on support.vodia.com. Can you please provide me one or send me via direct message the js template that you mentionned ? Quote Link to post Share on other sites
Support 0 Posted January 4 Report Share Posted January 4 You need to create one on vodia.zammad.com Quote Link to post Share on other sites
Vodia Telephone System 0 Posted January 4 Report Share Posted January 4 Have you base64 encode the username and password for auth parameter as mentioned in the doc: auth=base-64-encode(123@domain.com:password) As you can see the username is present in the auth again. Quote Link to post Share on other sites
Geoffroy de Corbiac 0 Posted January 5 Author Report Share Posted January 5 13 hours ago, Vodia Telephone System said: Have you base64 encode the username and password for auth parameter as mentioned in the doc: auth=base-64-encode(123@domain.com:password) As you can see the username is present in the auth again. Yes I did. I finally managed to get it work by adding the auth in the header of the request : hash = base64encode("user@pbxdomain:password") url = "https://pbxdomain/remote_call.htm?user=" + urlencode("user@pbxdomain") + "&dest=" + number + "&auth=" + urlencode(hash) + "&connect=true" header = Authorization: Basic hash Without the header part, I was still having the authentication popup. Quote Link to post Share on other sites
Recommended Posts