Hello again,
I’ve been using the code that rob posted successfully for the past few months, until the API got updated to version 2.0.1 last week and since then the click2dial does not work:
IPCortex.PBX.Auth.setHost(pbx_url); IPCortex.PBX.Auth.login(function (res) { if (res){ /* Get the API to start collecting data */ IPCortex.PBX.startFeed().then( function (s) { console.log('feed started', s); var owned = IPCortex.PBX.owned; var myPhone = owned[0]; // myPhone.enableRTC(); console.log(myPhone); window.myPhone = myPhone; window.owned = owned; pbx_functions.listen(); }, function (f) { console.log('Live data feed failed'); console.log(f); } ); } else { alert('Unable to log you in to the phone system. Please make sure your username and password are correct.') } }, { username: pbx_username, password: pbx_password } );
If I use the command myPhone.enableRTC(); I get the following error: Error: JsSIP not loaded.
Regardless of that, I manage to successfully log in to the API, but I can’t dial a number through the API.
When I use the dial function ( myPhone.dial(‘01914820444’); ) I get the following error:
Uncaught (in promise) Error: 5s Timeout setting up call at api.js:3952
I can see in the browser that the post to the api.whtm is successful, but then a few seconds later we get the above error.
Is there anything you can suggest? This is very urgent as it is being used in production and it is not working for our clients!
Thanks,
Anthony