Accept a call/Miss a call

Skip to first unread message

Алексей Макуш

Mar 8, 2022, 7:31:51 AMMar 8
to JsSIP
Hey guys,
Maybe someone can help me. How I can define 2 different situations.
1) User accept a call
2) User miss a call
In this two cases fired the same events ('accepting/confirmed')
Any idea?

Alex Balashov

Mar 8, 2022, 7:50:08 AMMar 8
Привет Алексей,

Both inbound and outbound calls generate an event, on the JsSIP.UA level, called ‘RTCSession’:

This is the key to activating both inbound and outbound calls.

In the case of the outbound call, initiates the call, and the RTCSession event is caught merely to establish the audio path, attach MediaStream tracks to audio/video elements and so forth.

In the case of inbound, however, one must call session.answer() in order to accept the call:

const ua = new jssip.UA({...});

ua.on(‘RTCSession’, s => {
s.session.connection.addEventListener(’track’, t => {

// Inbound handling specifically.

if(s.session.direction === ‘inbound’) {
// Promise-based modal dialog to accept the call?

modal.confirmDialog.then(() => {
() => {
// catch / reject.


// Outbound call would be initiated this way.'sip:uri@host’, { config etc });

Hopefully that helps! Удачи!

— Alex
> --
> You received this message because you are subscribed to the Google Groups "JsSIP" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> To view this discussion on the web visit

Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)

Reply all
Reply to author
0 new messages