How can I use sipml5 with 3CX?

835 views Asked by At

I try to call a 3CX extension from browser using sipml5.

SIPml.init(
    function (e) {
        var stack = new SIPml.Stack({
            realm: '192.168.*.**', impi: '2003', impu: 'sip:[email protected].**', password: '**********',
            websocket_proxy_url: 'ws://192.168.*.**:5060', // optional

            events_listener: {
                events: 'started', listener: function (e) {
                    var callSession = stack.newSession('call-audiovideo', {
                        video_local: document.getElementById('video-local'), // <video id="video-local" .../>
                        video_remote: document.getElementById('video-remote'), // <video id="video-remote" .../>
                        audio_remote: document.getElementById('audio-remote') // <audio id="audio-remote" .../>
                    });
                    callSession.call('2004');
                }
            }
        });
        stack.start();
    }
);

I used this example but it cannot connect to 3CX.

1

There are 1 answers

0
Kerem On

I could not connect too, and it returns error like that:

> Error: ERR_INVALID_PARAMETER_VALUE: 'listener' must not be null