3 Way Call Conference

1848 views
Skip to first unread message

Ashish Gautam

unread,
Jul 2, 2018, 10:43:26 AM7/2/18
to JsSIP

Hello Team,


How can we implement the 3 Ways Call Conference?


image





Iñaki Baz Castillo

unread,
Jul 2, 2018, 10:48:33 AM7/2/18
to jssip
Just do it in your SIP servers backend and it will work. JsSIP does support incoming INVITE without SDP.

--
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 jssip+un...@googlegroups.com.
To post to this group, send email to js...@googlegroups.com.
Visit this group at https://groups.google.com/group/jssip.
For more options, visit https://groups.google.com/d/optout.


--
Iñaki Baz Castillo
<i...@aliax.net>

Guest

unread,
Jul 5, 2018, 9:40:47 AM7/5/18
to JsSIP
Hi. Maybe you solved this problem? 



Iñaki Baz Castillo

unread,
Jul 5, 2018, 9:45:23 AM7/5/18
to jssip
Which problem? There is no problem here.

El jue., 5 jul. 2018 15:40, Guest <elena....@mifort.org> escribió:
Hi. Maybe you solved this problem? 



Guest

unread,
Jul 5, 2018, 9:51:13 AM7/5/18
to JsSIP
If i understood correctly, I can make 3 way conference only on backend? On frontend side it is impossible?

четверг, 5 июля 2018 г., 16:45:23 UTC+3 пользователь Iñaki Baz Castillo написал:

Iñaki Baz Castillo

unread,
Jul 5, 2018, 9:53:23 AM7/5/18
to jssip
For making a 3 way conference you need backend cooperation, yes, sure.

Leonardo Costa

unread,
Jun 7, 2019, 10:31:15 AM6/7/19
to JsSIP
Hello, guys!

Thanks for the great job! I'm using JsSIP 3.3.6 and everything is working fine!

Now I'm trying to implement a "3-Way Conference - Third Party Is Added" as described on RFC 5359 (Session Initiation Protocol Service Examples), page 101.
Is it possible using JsSIP to send a re-INVITE (like F5 as below) with the same Call-ID, changing the Contact and adding the tag isfocus? I was looking into the API docs and I could't find a method to send this re-INVITE... I was looking into classes JsSIP.RTCSession and JsSIP.UA..

Could you point me some direction?

Thanks!


2.10. 3-Way Conference - Third Party Is Added

Alice Bob Carol | INVITE F1 | | |--------------->| | | 180 Ringing F2 | | |<---------------| | | 200 OK F3 | | |<---------------| | | ACK F4 | | |--------------->| | | RTP | | |<==============>| | | INVITE F5 | | |<---------------| | | 200 OK F6 | | |--------------->| | | ACK F7 | | |<---------------| INVITE F8 | | |------------->| | | 180 F9 | | |<-------------| | | 200 OK F10 | | |<-------------| | | ACK F11 | | |------------->| | | RTP | | |<============>| In this scenario, Alice and Bob are in a 2-party call (session) when Bob wishes to add Carol into the conversation. Bob is capable of media mixing in a 3-party call. Bob first sends a re-INVITE to Alice, changing Contact URIs to one that indicates Bob's mixer and acts like a focus. As a result, Bob includes the "isfocus" feature tag [RFC3840] as described in [RFC4579]. Bob then INVITEs Carol using the same Contact URI. Note that Bob could wait to re-INVITE Alice until after Carol has answered. Bob could also put Alice on hold before calling Carol. Message Details F1 INVITE Alice -> Bob INVITE sips:b...@biloxi.example.com SIP/2.0 Via: SIP/2.0/TLS client.atlanta.example.com:5061 ;branch=z9hG4bK74bf9
      Max-Forwards: 70
      From: Alice <sips:al...@atlanta.example.com>;tag=1234567
      To: Bob <sips:b...@biloxi.example.com>
      Call-ID: 1234...@atlanta.example.com
      CSeq: 1 INVITE
      Contact: <sips:al...@client.atlanta.example.com>
      Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
      Supported: replaces
      Content-Type: application/sdp
      Content-Length: ...

      v=0
      o=alice 2890844526 2890844526 IN IP4 client.atlanta.example.com
      s=
      c=IN IP4 client.atlanta.example.com
      t=0 0
      m=audio 49170 RTP/AVP 0
      a=rtpmap:0 PCMU/8000


      F2 180 Ringing Bob -> Alice

      SIP/2.0 180 Ringing
      Via: SIP/2.0/TLS client.atlanta.example.com:5061
       ;branch=z9hG4bK74bf9
       ;received=192.0.2.103
      From: Alice <sips:al...@atlanta.example.com>;tag=1234567
      To: Bob <sips:b...@biloxi.example.com>;tag=23431
      Call-ID: 1234...@atlanta.example.com
      CSeq: 1 INVITE
      Contact: <sips:b54g...@biloxi.example.com>
      Content-Length: 0


      F3 200 OK Bob -> Alice

      SIP/2.0 200 OK

      Via: SIP/2.0/TLS client.atlanta.example.com:5061
       ;branch=z9hG4bK74bf9
       ;received=192.0.2.103
      From: Alice <sips:al...@atlanta.example.com>;tag=1234567
      To: Bob <sips:b...@biloxi.example.com>;tag=23431
      Call-ID: 1234...@atlanta.example.com
      CSeq: 1 INVITE
      Contact: <sips:b54g...@biloxi.example.com>
      Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
      Supported: replaces, gruu
      Content-Type: application/sdp
      Content-Length: ...

      v=0
      o=bob 2890844527 2890844527 IN IP4 client.biloxi.example.com
      s=
      c=IN IP4 client.biloxi.example.com
      t=0 0
      m=audio 3456 RTP/AVP 0
      a=rtpmap:0 PCMU/8000


      F4 ACK Alice -> Bob

      ACK sips:b54g...@biloxi.example.com SIP/2.0
      Via: SIP/2.0/TLS client.atlanta.example.com:5061
       ;branch=z9hG4bK74bfL
      Max-Forwards: 70
      From: Alice <sips:al...@atlanta.example.com>;tag=1234567
      To: Bob <sips:b...@biloxi.example.com>;tag=23431
      Call-ID: 1234...@atlanta.example.com
      CSeq: 1 ACK
      Content-Length: 0

      /* Alice and Bob have established a session.
         Bob re-INVITEs, changing Contact URIs. */


      F5 INVITE Bob -> Alice

      INVITE sips:al...@client.atlanta.example.com SIP/2.0
      Via: SIP/2.0/TLS client.biloxi.example.com:5061
       ;branch=z9hG4bKnashds
      Max-Forwards: 70
      From: Bob <sips:b...@biloxi.example.com>;tag=23431
      To: Alice <sips:al...@atlanta.example.com>;tag=1234567
      Call-ID: 1234...@atlanta.example.com
      CSeq: 1024 INVITE
      Contact: <sips:bob-...@client.biloxi.example.com>;isfocus
      Content-Type: application/sdp
      Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
      Supported: replaces, gruu
      Content-Length: ...

      v=0
      o=bob 2890844527 2890844528 IN IP4 client.biloxi.example.com
      s=
      c=IN IP4 client.biloxi.example.com
      t=0 0
      m=audio 49172 RTP/AVP 0
      a=rtpmap:0 PCMU/8000


      F6 200 OK Alice -> Bob

      SIP/2.0 200 OK

      Via: SIP/2.0/TLS client.biloxi.example.com:5061
       ;branch=z9hG4bKnashds7
       ;received=192.0.2.113
      From: Bob <sips:b...@biloxi.example.com>;tag=23431
      To: Alice <sips:al...@atlanta.example.com>;tag=1234567
      Call-ID: 1234...@atlanta.example.com
      CSeq: 1024 INVITE
      Contact: <sips:al...@client.atlanta.example.com>
      Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
      Supported: replaces
      Content-Type: application/sdp
      Content-Length: ...

      v=0
      o=alice 2890844526 2890844526 IN IP4 client.atlanta.example.com
      s=
      c=IN IP4 client.atlanta.example.com
      t=0 0
      m=audio 49170 RTP/AVP 0
      a=rtpmap:0 PCMU/8000


      F7 ACK Bob -> Alice

      ACK sips:al...@client.atlanta.example.com SIP/2.0
      Via: SIP/2.0/TLS client.biloxi.example.com:5061
       ;branch=z9hG4bKnash3G
      Max-Forwards: 70
      From: Bob <sips:b...@biloxi.example.com>;tag=23431
      To: Alice <sips:al...@atlanta.example.com>;tag=1234567
      Call-ID: 1234...@atlanta.example.com
      CSeq: 1024 ACK
      Content-Length: 0

      /* Bob calls Carol. */
      F8 INVITE Bob -> Carol

      INVITE sips:ca...@chicago.example.com SIP/2.0
      Via: SIP/2.0/TLS client.biloxi.example.com:5061
       ;branch=z9hG4bKnashJfd
      Max-Forwards: 70
      From: Bob <sips:b...@biloxi.example.com>;tag=8675309
      To: Carol <sips:ca...@chicago.example.com>
      Call-ID: sdjfd...@biloxi.example.com
      CSeq: 42 INVITE
      Contact: <sips:bob-...@client.biloxi.example.com>;isfocus
      Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
      Supported: replaces, gruu
      Content-Type: application/sdp
      Content-Length: ...

      v=0
      o=bob 28908445834 2890844834 IN IP4 client.biloxi.example.com
      s=
      c=IN IP4 client.biloxi.example.com
      t=0 0
      m=audio 48174 RTP/AVP 0
      a=rtpmap:0 PCMU/8000


      F9 180 Ringing Carol -> Bob

      SIP/2.0 200 OK
      Via: SIP/2.0/TLS client.biloxi.example.com:5061
       ;branch=z9hG4bKnashJfd
       ;received=192.0.2.113
      From: Bob <sips:b...@biloxi.example.com>;tag=8675309
      To: Carol <sips:ca...@chicago.example.com>;tag=341313
      Call-ID: sdjfd...@biloxi.example.com
      CSeq: 42 INVITE
      Contact: <sips:ca...@client.chicago.example.com>
      Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
      Supported: replaces
      Content-Length: 0


      F10 200 OK Carol -> Bob

      SIP/2.0 200 OK
      Via: SIP/2.0/TLS client.biloxi.example.com:5061
       ;branch=z9hG4bKnashJfd
       ;received=192.0.2.113
      From: Bob <sips:b...@biloxi.example.com>;tag=8675309
      To: Carol <sips:ca...@chicago.example.com>;tag=341313
      Call-ID: sdjfd...@biloxi.example.com
      CSeq: 42 INVITE
      Contact: <sips:ca...@client.chicago.example.com>
      Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
      Supported: replaces
      Content-Type: application/sdp
      Content-Length: ...

      v=0
      o=carol 2890844922 2890844922 IN IP4 client.chicago.example.com
      s=
      c=IN IP4 client.chicago.example.com
      t=0 0
      m=audio 3456 RTP/AVP 0
      a=rtpmap:0 PCMU/8000


      F11 ACK Bob -> Carol

      ACK sips:ca...@client.chicago.example.com SIP/2.0
      Via: SIP/2.0/TLS client.biloxi.example.com:5061
       ;branch=z9hG4bKnash431
      Max-Forwards: 70
      From: Bob <sips:b...@biloxi.example.com>;tag=8675309
      To: Carol <sips:ca...@chicago.example.com>;tag=341313
      Call-ID: sdjfd...@biloxi.example.com
      CSeq: 42 ACK
      Content-Length: 0


      /* Bob's mixer now mixes media from both Alice and Carol
         to create the 3-way conference. */


Em quinta-feira, 5 de julho de 2018 10:53:23 UTC-3, Iñaki Baz Castillo escreveu:
For making a 3 way conference you need backend cooperation, yes, sure.
On Thu, 5 Jul 2018 at 15:51, Guest <elena....@mifort.org> wrote:
>
> If i understood correctly, I can make 3 way conference only on backend? On frontend side it is impossible?
>
> четверг, 5 июля 2018 г., 16:45:23 UTC+3 пользователь Iñaki Baz Castillo написал:
>>
>> Which problem? There is no problem here.
>>
>> El jue., 5 jul. 2018 15:40, Guest <elena....@mifort.org> escribió:
>>>
>>> Hi. Maybe you solved this problem?
>>>
>>>>
>>>>
>>> --
>>> 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 jssip+un...@googlegroups.com.
>>> To post to this group, send email to js...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/jssip.
>>> For more options, visit https://groups.google.com/d/optout.
>
> --
> 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 js...@googlegroups.com.

José Luis Millán

unread,
Jun 7, 2019, 11:50:24 AM6/7/19
to js...@googlegroups.com
Do you just need to add the isfocus parameter in the Contact header field?


For more options, visit https://groups.google.com/d/optout.


--
José Luis Millán

Leonardo Costa

unread,
Jun 7, 2019, 1:09:20 PM6/7/19
to JsSIP
Hello, José!

In fact I want to follow the 3-way conference example flow as described on the RFC to make it work! I already have one conversation call (session) stablished between 2 users (Bob and Alice)! Following the RFC flow, the next step is to Bob send a re-INVITE to Alice (step F5), changing the Contatct URI and adding a the tag isfocus (see below). I don't know how to send this re-INVITE request to continue to work on the flow...

F5 INVITE Bob -> Alice

      INVITE sips:al...@client.atlanta.example.com SIP/2.0
      Via: SIP/2.0/TLS client.biloxi.example.com:5061
       ;branch=z9hG4bKnashds
      Max-Forwards: 70
      From: Bob <sips:b...@biloxi.example.com>;tag=23431
      To: Alice <sips:al...@atlanta.example.com>;tag=1234567
      Call-ID: 1234...@atlanta.example.com
      CSeq: 1024 INVITE
      Contact: <sips:bob-...@client.biloxi.example.com>;isfocus
      Content-Type: application/sdp
      Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
      Supported: replaces, gruu
      Content-Length: ...

      v=0
      o=bob 2890844527 2890844528 IN IP4 client.biloxi.example.com
      s=
      c=IN IP4 client.biloxi.example.com
      t=0 0
      m=audio 49172 RTP/AVP 0
      a=rtpmap:0 PCMU/8000

Thank you!
].  Bob then INVITEs Carol
   using the same Contact URI.  Note that Bob could wait to re-INVITE
   Alice until after Carol has answered.  Bob could also put Alice on
   hold before calling Carol.

   Message Details

      F1 INVITE Alice -> Bob

      INVITE sips...@biloxi.example.com SIP/2.0
      Via: SIP/2.0/TLS client.atlanta.example.com:5061
       ;branch=z9hG4bK74bf9
      Max-Forwards: 70
      From: Alice <sips:...@atlanta.example.com>;tag=1234567
      To: Bob <sips...@biloxi.example.com>
      Call-ID: 1234...@atlanta.example.com
      CSeq: 1 INVITE
      Contact: <sips:...@client.atlanta.example.com>
      Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
      Supported: replaces
      Content-Type: application/sdp
      Content-Length: ...

      v=0
      o=alice 2890844526 2890844526 IN IP4 client.atlanta.example.com
      s=
      c=IN IP4 client.atlanta.example.com
      t=0 0
      m=audio 49170 RTP/AVP 0
      a=rtpmap:0 PCMU/8000


      F2 180 Ringing Bob -> Alice

      SIP/2.0 180 Ringing
      Via: SIP/2.0/TLS client.atlanta.example.com:5061
       ;branch=z9hG4bK74bf9
       ;received=192.0.2.103
      From: Alice <sips:...@atlanta.example.com>;tag=1234567
      To: Bob <sips...@biloxi.example.com>;tag=23431
      Call-ID: 1234...@atlanta.example.com
      CSeq: 1 INVITE
      Contact: <sips:b5...@biloxi.example.com>
      Content-Length: 0


      F3 200 OK Bob -> Alice

      SIP/2.0 200 OK

      Via: SIP/2.0/TLS client.atlanta.example.com:5061
       ;branch=z9hG4bK74bf9
       ;received=192.0.2.103
      From: Alice <sips:...@atlanta.example.com>;tag=1234567
      To: Bob <sips...@biloxi.example.com>;tag=23431
      Call-ID: 1234...@atlanta.example.com
      CSeq: 1 INVITE
      Contact: <sips:b5...@biloxi.example.com>
      Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
      Supported: replaces, gruu
      Content-Type: application/sdp
      Content-Length: ...

      v=0
      o=bob 2890844527 2890844527 IN IP4 client.biloxi.example.com
      s=
      c=IN IP4 client.biloxi.example.com
      t=0 0
      m=audio 3456 RTP/AVP 0
      a=rtpmap:0 PCMU/8000


      F4 ACK Alice -> Bob

      ACK sips:b5...@biloxi.example.com SIP/2.0
      Via: SIP/2.0/TLS client.atlanta.example.com:5061
       ;branch=z9hG4bK74bfL
      Max-Forwards: 70
      From: Alice <sips:...@atlanta.example.com>;tag=1234567
      To: Bob <sips...@biloxi.example.com>;tag=23431
      Call-ID: 1234...@atlanta.example.com
      CSeq: 1 ACK
      Content-Length: 0

      /* Alice and Bob have established a session.
         Bob re-INVITEs, changing Contact URIs. */


      F5 INVITE Bob -> Alice

      INVITE sips:...@client.atlanta.example.com SIP/2.0
      Via: SIP/2.0/TLS client.biloxi.example.com:5061
       ;branch=z9hG4bKnashds
      Max-Forwards: 70
      From: Bob <sips...@biloxi.example.com>;tag=23431
      To: Alice <sips:...@atlanta.example.com>;tag=1234567
      Call-ID: 1234...@atlanta.example.com
      CSeq: 1024 INVITE
      Contact: <sips:bo...@client.biloxi.example.com>;isfocus
      Content-Type: application/sdp
      Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
      Supported: replaces, gruu
      Content-Length: ...

      v=0
      o=bob 2890844527 2890844528 IN IP4 client.biloxi.example.com
      s=
      c=IN IP4 client.biloxi.example.com
      t=0 0
      m=audio 49172 RTP/AVP 0
      a=rtpmap:0 PCMU/8000


      F6 200 OK Alice -> Bob

      SIP/2.0 200 OK

      Via: SIP/2.0/TLS client.biloxi.example.com:5061
       ;branch=z9hG4bKnashds7
       ;received=192.0.2.113
      From: Bob <sips...@biloxi.example.com>;tag=23431
      To: Alice <sips:...@atlanta.example.com>;tag=1234567
      Call-ID: 1234...@atlanta.example.com
      CSeq: 1024 INVITE
      Contact: <sips:...@client.atlanta.example.com>
      Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
      Supported: replaces
      Content-Type: application/sdp
      Content-Length: ...

      v=0
      o=alice 2890844526 2890844526 IN IP4 client.atlanta.example.com
      s=
      c=IN IP4 client.atlanta.example.com
      t=0 0
      m=audio 49170 RTP/AVP 0
      a=rtpmap:0 PCMU/8000


      F7 ACK Bob -> Alice

      ACK sips:...@client.atlanta.example.com SIP/2.0
      Via: SIP/2.0/TLS client.biloxi.example.com:5061
       ;branch=z9hG4bKnash3G
      Max-Forwards: 70
      From: Bob <sips...@biloxi.example.com>;tag=23431
      To: Alice <sips:...@atlanta.example.com>;tag=1234567
      Call-ID: 1234...@atlanta.example.com
      CSeq: 1024 ACK
      Content-Length: 0

      /* Bob calls Carol. */
      F8 INVITE Bob -> Carol

      INVITE sips:...@chicago.example.com SIP/2.0
      Via: SIP/2.0/TLS client.biloxi.example.com:5061
       ;branch=z9hG4bKnashJfd
      Max-Forwards: 70
      From: Bob <sips...@biloxi.example.com>;tag=8675309
      To: Carol <sips:...@chicago.example.com>
      Call-ID: sdjfd...@biloxi.example.com
      CSeq: 42 INVITE
      Contact: <sips:bo...@client.biloxi.example.com>;isfocus
      Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
      Supported: replaces, gruu
      Content-Type: application/sdp
      Content-Length: ...

      v=0
      o=bob 28908445834 2890844834 IN IP4 client.biloxi.example.com
      s=
      c=IN IP4 client.biloxi.example.com
      t=0 0
      m=audio 48174 RTP/AVP 0
      a=rtpmap:0 PCMU/8000


      F9 180 Ringing Carol -> Bob

      SIP/2.0 200 OK
      Via: SIP/2.0/TLS client.biloxi.example.com:5061
       ;branch=z9hG4bKnashJfd
       ;received=192.0.2.113
      From: Bob <sips...@biloxi.example.com>;tag=8675309
      To: Carol <sips:...@chicago.example.com>;tag=341313
      Call-ID: sdjfd...@biloxi.example.com
      CSeq: 42 INVITE
      Contact: <sips:...@client.chicago.example.com>
      Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
      Supported: replaces
      Content-Length: 0


      F10 200 OK Carol -> Bob

      SIP/2.0 200 OK
      Via: SIP/2.0/TLS client.biloxi.example.com:5061
       ;branch=z9hG4bKnashJfd
       ;received=192.0.2.113
      From: Bob <sips...@biloxi.example.com>;tag=8675309
      To: Carol <sips:...@chicago.example.com>;tag=341313
      Call-ID: sdjfd...@biloxi.example.com
      CSeq: 42 INVITE
      Contact: <sips:...@client.chicago.example.com>
      Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
      Supported: replaces
      Content-Type: application/sdp
      Content-Length: ...

      v=0
      o=carol 2890844922 2890844922 IN IP4 client.chicago.example.com
      s=
      c=IN IP4 client.chicago.example.com
      t=0 0
      m=audio 3456 RTP/AVP 0
      a=rtpmap:0 PCMU/8000


      F11 ACK Bob -> Carol

      ACK sips:...@client.chicago.example.com SIP/2.0
      Via: SIP/2.0/TLS client.biloxi.example.com:5061
       ;branch=z9hG4bKnash431
      Max-Forwards: 70
      From: Bob <sips...@biloxi.example.com>;tag=8675309
      To: Carol <sips:...@chicago.example.com>;tag=341313
      Call-ID: sdjfd...@biloxi.example.com


--
José Luis Millán

José Luis Millán

unread,
Jun 8, 2019, 1:24:27 PM6/8/19
to js...@googlegroups.com
What about this detail in the example?

"Bob is capable of media mixing in a 3-party call." 

This is, Bob sends to Alice Carol's audio and his own audio mixed, he sends to Calor Alice's audio and his own audio mixed. How do you plan to achieve it :-)?


For more options, visit https://groups.google.com/d/optout.


--
José Luis Millán

Leonardo Costa

unread,
Jun 10, 2019, 10:13:51 AM6/10/19
to JsSIP
Hello, José!

Doing a quick research, maybe we could achieve the mixing process using the Web Audio API (https://www.w3.org/TR/webaudio/)! I found this good example, Mix.js (http://kevvv.in/mix/), where they were able to mix 12 different tracks to play a music!

Taking this to our example (3-way conference), I think that we need to mix Bob's voice (microphone) with the audio that he receives from Alice, and finally send this mixed audio to Carol (and the reverse way too)! Bob will act like a bridge!

What do you think? Is it possible try to implement this feature on the JsSIP? I guess it would be a great plus to the library!

Thank you!

Em sábado, 8 de junho de 2019 14:24:27 UTC-3, José Luis Millán escreveu:
What about this detail in the example?

"Bob is capable of media mixing in a 3-party call." 

This is, Bob sends to Alice Carol's audio and his own audio mixed, he sends to Calor Alice's audio and his own audio mixed. How do you plan to achieve it :-)?

El vie., 7 jun. 2019 a las 19:09, Leonardo Costa (<tradi...@gmail.com>) escribió:
Hello, José!

In fact I want to follow the 3-way conference example flow as described on the RFC to make it work! I already have one conversation call (session) stablished between 2 users (Bob and Alice)! Following the RFC flow, the next step is to Bob send a re-INVITE to Alice (step F5), changing the Contatct URI and adding a the tag isfocus (see below). I don't know how to send this re-INVITE request to continue to work on the flow...

F5 INVITE Bob -> Alice


--
José Luis Millán

Iñaki Baz Castillo

unread,
Jun 10, 2019, 10:17:19 AM6/10/19
to jssip
You can do it by mixing the audio tracks by yourself and then using the resulting media stream or its audio track with the PeerConnection.getSenders()[0].replaceTrack() API of WebRTC. Remember that the rtcSession.connection of JsSIP points to the underlying PeerConnection.

José Luis Millán

unread,
Jun 10, 2019, 10:21:25 AM6/10/19
to js...@googlegroups.com
El lun., 10 jun. 2019 a las 16:17, Iñaki Baz Castillo (<i...@aliax.net>) escribió:
You can do it by mixing the audio tracks by yourself and then using the resulting media stream or its audio track with the PeerConnection.getSenders()[0].replaceTrack() API of WebRTC. Remember that the rtcSession.connection of JsSIP points to the underlying PeerConnection.

Absolutetly agreed. Nothing to be done in the library.
 

For more options, visit https://groups.google.com/d/optout.


--
José Luis Millán
Message has been deleted
Message has been deleted
Message has been deleted

Leonardo Costa

unread,
Jun 13, 2019, 9:25:35 AM6/13/19
to JsSIP
Hello, guys!

It worked for me! I was able to mix all received audio from the sessions with my own voice and the conference worked fine! I tested on Chrome and Firefox! 

I'm just wondering why the RFC example says that we need to do all those steps before mix the audio (send the re-invite, change the contact header, add the isfocus tag, etc)... 

Anyway, here a code example:

//function to create conference by mixing audio
//sessions => array with JsSIP.RTCSessions calls
//remoteAudioId => the ID of your <audio> element to play the received streams
function conference(sessions, remoteAudioId) {
//take all received tracks from the sessions you want to merge
var receivedTracks = [];
sessions.forEach(function(session) {
if(session !== null && session !== undefined) {
    session.connection.getReceivers().forEach(function(receiver) {
    receivedTracks.push(receiver.track);
    });
}
});

//use the Web Audio API to mix the received tracks
var context = new AudioContext();
var allReceivedMediaStreams = new MediaStream();
sessions.forEach(function(session) {
if(session !== null && session !== undefined) {

    var mixedOutput = context.createMediaStreamDestination();
   
    session.connection.getReceivers().forEach(function(receiver) {
    receivedTracks.forEach(function(track) {
    allReceivedMediaStreams.addTrack(receiver.track);
    if(receiver.track.id !== track.id) {
        var sourceStream = context.createMediaStreamSource(new MediaStream([track]));
    sourceStream.connect(mixedOutput);
    }
    });
    });
//mixing your voice with all the received audio
    session.connection.getSenders().forEach(function(sender) {
    var sourceStream = context.createMediaStreamSource(new MediaStream([sender.track]));
    sourceStream.connect(mixedOutput);
    });
    session.connection.getSenders()[0].replaceTrack(mixedOutput.stream.getTracks()[0]);
}
});

//play all received stream to you
var remoteAudio = document.getElementById('remoteAudioId');    
remoteAudio.srcObject = allReceivedMediaStreams;
var promiseRemote = remoteAudio.play();
if(promiseRemote !== undefined) {
promiseRemote.then(_ => {
console.log("playing all received streams to you");
}).catch(error => {
console.log(error);
});
}
}

Thanks!

--
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 js...@googlegroups.com.
To post to this group, send email to js...@googlegroups.com.
Visit this group at https://groups.google.com/group/jssip.


--
José Luis Millán

Iñaki Baz Castillo

unread,
Jun 13, 2019, 10:17:06 AM6/13/19
to jssip
Really cool :)
> To view this discussion on the web visit https://groups.google.com/d/msgid/jssip/b887869e-887c-474b-bf5b-4aa8b45c3ead%40googlegroups.com.
Message has been deleted
Message has been deleted

Avi Charlop

unread,
Jun 29, 2020, 12:30:12 PM6/29/20
to JsSIP
Was really hoping to use this but it isn't working for me. Do you have any more details or code you you can share? Is there any peerconnection that needs to happen?

Viet Hung Le

unread,
Jun 30, 2020, 7:27:32 AM6/30/20
to JsSIP
The code Leonardo provided worked for me, but when bridge user agent press mute, then the others can't hear anything (also lost connection when he hang up), so I think use meshed conference (decentralized) will worked but it's so sophisticated and hard to manage connection.
Message has been deleted

Bhupinder Gill

unread,
Jun 30, 2020, 1:05:39 PM6/30/20
to JsSIP
The code you provided worked for me , Thanks. I found some problem with it, Suppose  user A accept call from user B and  user C. Then user A put call in conference with B and C. I found that Audio from B to C and C to B does not work. B and C can not listen each other.  Audio call from A to B , B to A, A to C and C to A work fine.  Please see if you can help me here

Viet Hung Le

unread,
Jun 30, 2020, 11:22:55 PM6/30/20
to JsSIP
Maybe you did something wrong when you mix audio for senders. User B will listen mixed voices  of A and C(from A) and C will listen voices of A and B (from A).

Bhupinder Gill

unread,
Jul 1, 2020, 1:54:19 AM7/1/20
to JsSIP
I found , that problem come when User A who started conference, put conference call on Mute. Only then user B and user C cannot listen each other. Is there other any way to put conference on mute or unmute?

To put conference on mute , I have applied below code.


if(sessions.length > 1) {
sessions.forEach((session) => {
                            session.mute();
});  
}

if(sessions.length > 1) {
sessions.forEach((session) => {
                             session.unmute();
});  
}

Viet Hung Le

unread,
Jul 1, 2020, 2:55:15 AM7/1/20
to JsSIP
As I told in the above post, because user A acts as bridge, when A mute, voice isn't sent,  you have to use other topology: meshed or bridge (ref: https://www.cs.columbia.edu/sip/talks/sip-conferencing.pdf). 
Hello, José!

Message has been deleted

Viet Hung Le

unread,
Jul 2, 2020, 7:41:55 AM7/2/20
to JsSIP
Hi Jose,
I want to implement decentralized conference call, when user A call B to join conference, can I use hold and REFER method to tell other user to make a call to B, or I have to send them message ?


On Monday, July 2, 2018 at 9:43:26 PM UTC+7, Ashish Gautam wrote:

Hello Team,


How can we implement the 3 Ways Call Conference?


image





Message has been deleted

Iñaki Baz Castillo

unread,
Jul 2, 2020, 8:02:49 AM7/2/20
to jssip
On Thu, 2 Jul 2020 at 13:41, Viet Hung Le <leviet...@gmail.com> wrote:
Hi Jose,

This is a mailing list with many people subscribed to it. Please avoid direct mentions.

Vinícius Feres Belló

unread,
Aug 13, 2020, 9:47:20 AM8/13/20
to JsSIP
The code from Leonardo worked from me too. I'm using SIP.js + Asterisk. I just needed adjust session.connection to session.sessionDescriptionHandler.peerConnection. Thanks for sharing, it's really difficult find some examples about call conference.   

Asad Abbas

unread,
Mar 22, 2021, 10:46:29 AMMar 22
to JsSIP
Hi Bhupinder Gill,

I am getting the same issue when bridge user mutes the call than user A and B are unable to listen each other. Did you implement the mesh ? If yes can you give me the idea how I can do that?

Usman Akram

unread,
Jun 21, 2021, 4:58:55 PMJun 21
to JsSIP
Hello Guys, 
I'm facing the same issue of making conference call.
I tried above code but I think code is not completed.
Can somebody give me a clue how I can implement conference call.

Reply all
Reply to author
Forward
0 new messages