copyright: years: 2018, 2023 lastupdated: "2023-01-06"
Programming SIPREC sessions
When a SIPREC session is active, you can program your Voice Gateway deployment or Watson Assistant instance to control the audio streams of SIPREC sessions.
Actions sent by the Watson Assistant
You can use the participants
parameter for some action tags to specify which audio streams to apply the action.
The participants
parameter is a comma separated list of participants that the action is applied to. If the participants
list isn't provided, the action is applied to all participants or SIPREC streams.
The following code example shows that Watson Assistant passes an action command to Voice Gateway to pause a DTMF collection session for john@example.com.
{
"command": "vgwActPauseDTMF",
"parameters": {
"participants": ["john@example.com"]
}
}
You can use the following action commands during a SIPREC session to define how your agent assistant handles calls.
Action command | Description | Parameters |
---|---|---|
vgwActPauseSTT | Pauses speech-to-text processing until it's reenabled by the vgwActUnPauseSTT action. If recording is enabled and speech-to-text processing is paused, the audio from the caller isn't captured. See Action tags. |
participants |
vgwActUnPauseSTT | Resumes speech-to-text processing that was previously paused by the vgwActPauseSTT action. See Action tags. |
participants |
vgwActPauseDTMF | Disables DTMF input. All DTMF input is ignored until it's re-enabled by the vgwActUnPauseDTMF action. See Action tags. |
participants |
vgwActUnPauseDTMF | Re-enables DTMF input that was disabled by the vgwActPauseDTMF action. See Action tags. |
participants |
vgwActSetSTTConfig | Applies a set of parameters for Voice Gateway to pass to the Watson Speech to Text service. See Action tags. | participants |
vgwActHangup | Hangs up the call. See Action tags. | N/A |
Dynamic programming during SIPREC sessions
When a re-INVITE or UPDATE arrives, Voice Gateway notifies the Watson Assistant service about media capabilities or SIPREC session changes. Voice Gateway initiates a turn to the Watson Assistant service by sending vgwMediaCapsChanged
text.
If SIPREC session details change as a result of a re-INVITE or UPDATE message, then the respective state variables are updated.