We're updating the issue view to help you get more done. 

Add hold/unhold in API calls for Yealink

Description

User story

As a developer I want an API to hold/unhold a calls (me or id)

  • PUT /calls/{call_id}/hold/start

  • PUT /calls/{call_id}/hold/stop

  • PUT /users/me/calls/{call_id}/hold/start

  • PUT /users/me/calls/{call_id}/hold/stop

Also validate that user can call the /users/me api and receive events

Scenarios

Given I have a Yealink phone and two active calls
Given I have a websocket connected as a user
When I press the Hold button on my phone
Then the Hold button lights for the held call
Then the Hold button DOES NOT light for the other call
Then the other party hears my MOH
Then the other party does not hear me anymore
Then I don’t hear the other party
Then I receive a Websocket event that my call was held in less than a second

The exact same scenario must happen with the following action:
When I send an API request PUT /users/me/calls/{call_id}/hold/start

The inverse scenarios must happen when unholding the call.

Scope

  • Only recent Yealink phones are supported in this first version

Technical solution

Technical challenges

  • The challenge is to do this with a channel not being in stasis 🙂

  • wazo-calld or phoned need to know what model of phone is behind, in order to know what to send in SIP NOTIFY.

    • either ask wazo-provd with a deviceid

    • or parse the User-Agent of the SIP REGISTER (cached or retrieved from Asterisk)

Environment

None

Assignee

Alexandre Fournier

Reporter

Sylvain Boily

Labels

Approvers

Sébastien Duthil

Pair

None

Sprint

None

Fix versions

Priority

Medium
Configure