1

Using the code pasted below and the latest Sinch JS SDK sourced from the CDN I get an error - 503 (Unable to connect call) - in the console from a POST to https://callingapi.sinch.com/v1/calls/conference. Does anyone have any thoughts as to why this may be?

        var logMessage = function(message) {
        console.log(message);
    }

    var startConference = function(sinchClient) {
        var callClient = sinchClient.getCallClient();

        var callListeners = {
            onCallEstablished: function(conferenceCall) {
                $('video').attr('src', conferenceCall.incomingStreamURL);
            }
        }

        var call = callClient.callConference('myhouse');

        call.addEventListener(callListeners);
    }

    var sinchClient = new SinchClient({
        applicationKey: '6d37ea4c-446c-47d9-a21e-9b55c080cf3c',
        applicationSecret: 'gJoD7n2d1kmKyRYDZcCtKQ==',
        capabilities: {
            calling: true,
            video: true
        },
        onLogMessage: logMessage,
        startActiveConnection: true
    });

    sinchClient.start({ username: 'ibrown' })
        .fail(logMessage)
        .then(function() {
            startConference(sinchClient);
        });
Ivan Brown
  • 11
  • 2
  • Can you implement onCalDidEnd as well and console log the reason why it couldnt connect. – cjensen Mar 01 '17 at 08:34
  • @cjensen, onCallEnded returns the following error object. Are you looking for the value of a particular property? error : SinchError code : 6002 domain : 5 message : "Unable to connect call" name : "SinchError" – Ivan Brown Mar 01 '17 at 14:16

1 Answers1

0

If you were checking Sinch with trail account then just check if you have completed your trail period.

If it seems expire then add some money into your sinch account or you can create a new trail account and use the new application key.

Also try sending password while sinchClient.start(), as i checked authentication is required to start the session.

Mohit Saini
  • 141
  • 2
  • 6