Geoffroy de Corbiac 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 comment Share on other sites More sharing options...
Vodia PBX 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 comment Share on other sites More sharing options...
Geoffroy de Corbiac 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 comment Share on other sites More sharing options...
Geoffroy de Corbiac 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 comment Share on other sites More sharing options...
Geoffroy de Corbiac 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 comment Share on other sites More sharing options...
Support Posted January 4, 2021 Report Share Posted January 4, 2021 You need to create one on vodia.zammad.com Quote Link to comment Share on other sites More sharing options...
Vodia Telephone System Posted January 4, 2021 Report Share Posted January 4, 2021 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 comment Share on other sites More sharing options...
Geoffroy de Corbiac Posted January 5, 2021 Author Report Share Posted January 5, 2021 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 comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.