From README example script: REGISTER ok, CALL nothing happens

21 views
Skip to first unread message

Orion project

unread,
May 16, 2022, 12:23:55 PMMay 16
to JsSIP

Dunno if it's a bug or else, I cannot see any console log message.
I put the example code in the header, body within and without window.onload with same result,
no call at all. the browser does not report anything to (chrome 101)

but with debug enabled it shows

test.lol:3559 Uncaught TypeError: Cannot read properties of undefined (reading 'cause')
at n.failed (test.lol:3559:51)
at test.lol:3517:247603
at n.o.emit (test.lol:3517:247673)
at n.value (test.lol:3517:158850)
at n.value (test.lol:3517:150104)
at Object.onReceiveResponse (test.lol:3517:146227)
at e.value (test.lol:3517:180463)
at Object.onReceiveResponse (test.lol:3517:179744)
at n.value (test.lol:3517:202055)
at n. (test.lol:3517:222837)
failed @ test.lol:3559
(anonymous) @ test.lol:3517
o.emit @ test.lol:3517
value @ test.lol:3517
value @ test.lol:3517
onReceiveResponse @ test.lol:3517
value @ test.lol:3517
onReceiveResponse @ test.lol:3517
value @ test.lol:3517
(anonymous) @ test.lol:3517
value @ test.lol:3517
value @ test.lol:3517
test.lol:787 Uncaught TypeError: msg.toLowerCase is not a function
at uncaughtError (test.lol:787:19)
uncaughtError @ test.lol:787
error (async)
(anonymous) @ test.lol:804

Any clue?
thanks

Orion project

unread,
May 16, 2022, 2:47:58 PMMay 16
to JsSIP
Ok it seems that my pbx needs an ACL to allow media to start.
I modified the example code to show to extend the e object other than e.data
to get some valuable results

    var eventHandlers = {
        'progress':function(e){
            console.log('call is in progress');
        },
        'failed':function(e){
            if(e.data){
                console.log('call failed with cause: '+ e.data.cause);
            }else{
                if(e.cause){
                    alert(e.cause);
                }
            }
        },
        'ended':function(e){
            if(e.data){
                console.log('call ended with cause: '+ e.data.cause);
            }else{
                if(e.cause){
                    alert(e.cause);
                }
            }
        },
        'confirmed':function(e){
            console.log('call confirmed');
        }
    };

sorry for the noise.

Reply all
Reply to author
Forward
0 new messages