voiceip / tinyphone

Minimalist Windows / OSx / Linux SIP Softphone with API Control
GNU General Public License v3.0
114 stars 36 forks source link

Implement `TinyPhone::Join` (can be used to join two specific calls together) #81

Open pdesaulniers-vertisoft opened 7 months ago

pdesaulniers-vertisoft commented 7 months ago

This PR implements TinyPhone::Join and the following endpoint: /calls/<int>/join/<int>

This method is very similar to TinyPhone::Conference. It can be used to initiate a conference between an active call and a second, specific call (as opposed to TinyPhone::Conference, which joins all ongoing calls together).

AppVeyorBot commented 7 months ago

:x: Build tinyphone 1.0.356 failed (commit https://github.com/voiceip/tinyphone/commit/03a6a5fbfe by @pdesaulniers-vertisoft)

AppVeyorBot commented 7 months ago

:x: Build tinyphone 1.0.356 failed (commit https://github.com/voiceip/tinyphone/commit/03a6a5fbfe by @pdesaulniers-vertisoft)

AppVeyorBot commented 7 months ago

:x: Build tinyphone 1.0.357 failed (commit https://github.com/voiceip/tinyphone/commit/524b2d553a by @pdesaulniers-vertisoft)

AppVeyorBot commented 7 months ago

:x: Build tinyphone 1.0.357 failed (commit https://github.com/voiceip/tinyphone/commit/524b2d553a by @pdesaulniers-vertisoft)

AppVeyorBot commented 7 months ago

:white_check_mark: Build tinyphone 1.0.358 completed (commit https://github.com/voiceip/tinyphone/commit/77cb877add by @pdesaulniers-vertisoft)

AppVeyorBot commented 7 months ago

:white_check_mark: Build tinyphone 1.0.358 completed (commit https://github.com/voiceip/tinyphone/commit/77cb877add by @pdesaulniers-vertisoft)

AppVeyorBot commented 7 months ago

:white_check_mark: Build tinyphone 1.0.359 completed (commit https://github.com/voiceip/tinyphone/commit/bd3fedb9be by @pdesaulniers-vertisoft)

AppVeyorBot commented 7 months ago

:white_check_mark: Build tinyphone 1.0.359 completed (commit https://github.com/voiceip/tinyphone/commit/bd3fedb9be by @pdesaulniers-vertisoft)

kingster commented 7 months ago

Hi @pdesaulniers-vertisoft one thing that I see missing before we can merge this capability is how to unjoin calls.

Second, what would be the behaviour if the join request is made with a 3rd call when call 1 & 2 are already joined. IMO this would need some tracking of bridged (joined) calls and that is the reason conference today works on linking all calls, similar to what smartphones offers.

AppVeyorBot commented 7 months ago

:white_check_mark: Build tinyphone 1.0.360 completed (commit https://github.com/voiceip/tinyphone/commit/1dd61bdb6d by @pdesaulniers-vertisoft)

AppVeyorBot commented 7 months ago

:white_check_mark: Build tinyphone 1.0.360 completed (commit https://github.com/voiceip/tinyphone/commit/1dd61bdb6d by @pdesaulniers-vertisoft)

AppVeyorBot commented 7 months ago

:white_check_mark: Build tinyphone 1.0.361 completed (commit https://github.com/voiceip/tinyphone/commit/09d52caaf4 by @pdesaulniers-vertisoft)

AppVeyorBot commented 7 months ago

:white_check_mark: Build tinyphone 1.0.361 completed (commit https://github.com/voiceip/tinyphone/commit/09d52caaf4 by @pdesaulniers-vertisoft)

pdesaulniers-vertisoft commented 7 months ago

Hello,

one thing that I see missing before we can merge this capability is how to unjoin calls.

OK, I added the unjoin endpoint.

what would be the behaviour if the join request is made with a 3rd call when call 1 & 2 are already joined. IMO this would need some tracking of bridged (joined) calls and that is the reason conference today works on linking all calls, similar to what smartphones offers.

Yes, the current behavior of join/unjoin is not very practical when the conference should contain more than 2 calls...

In that case, would it be reasonable to bridge call_to_join_id with all the currently 'active' calls where current_media.status != PJSUA_CALL_MEDIA_LOCAL_HOLD && current_media.status != PJSUA_CALL_MEDIA_NONE ? I think this approach would be a bit easier to implement than keeping track of bridged calls...

Also, if we use this approach, I suppose it would make sense to change the API route from /calls/<call_id>/join/<call_to_join_id> to /calls/<call_to_join_id>/join, meaning: "join <call_to_join_id> to the current conference"

AppVeyorBot commented 7 months ago

:white_check_mark: Build tinyphone 1.0.362 completed (commit https://github.com/voiceip/tinyphone/commit/55572227a0 by @pdesaulniers-vertisoft)

AppVeyorBot commented 7 months ago

:white_check_mark: Build tinyphone 1.0.362 completed (commit https://github.com/voiceip/tinyphone/commit/55572227a0 by @pdesaulniers-vertisoft)