Skip to main content
To create a voice agent, you need to build a Flow on the Cognigy.AI side using Voice Nodes. These Nodes provide the basic verbs required for your voice agent. If you require additional verbs that are not available in the Voice Nodes, you can add them using a Code Node. For incoming calls, you can use Voice Nodes and a Code Node. However, for outgoing calls, you must specify all parameters in the call request body, as described in the Advanced Configuration Request section.

List of Verbs

The table presents the list of supported verbs.
VerbDescriptionNode Analogue
Answering Machine Detection (/voice-gateway/references/verbs/amd)This verb can be enabled on outbound calls to provide an indication of whether a call has been answered by a person or a machine. To use this feature, provide the amd property in a dial verb.Transfer (Dial > Answering Machine Detection settings)
ConfigThis verb lets the developer modify the default speech settings for the current session or to collect speech or DTMF input in the background while other verbs are executed.Set Session Config
DialThis verb initiates a new call by connecting to a telephone number, registered SIP user, or SIP URI.Transfer (Dial settings)
DubThis verb adds a background audio track to the conversation.Set Session Config
DTMFThis verb generates a string of DTMF digit signals, which are transmitted as RTP payloads according to RFC 2833.DTMF
GatherThis verb collects DTMF or speech input.-
HangupThis verb terminates the call and ends the session.Hangup
ListenThis verb sends real-time audio streams to your application over a WebSocket connection for processing. The Call Recording feature relies on this verb.Call Recording
PlayThis verb streams recorded audio to a call.Play
SayThis verb sends synthesized speech to the remote party. The text provided may be either plain text or use SSML tags.Say
SIP:requestThis verb sends a SIP INFO, NOTIFY, or MESSAGE request on an established call, which is an in-dialog request.Send Metadata
SIP:referThis verb transfers a call and disconnect.Transfer (Refer settings)
TranscribeThis verb generates real-time transcriptions of speech.Set Session Config (Recognizer - Speech-To-Text settings)

Custom Verbs in Code Nodes

The example shows how a Code Node can send a customized dial verb with an Answering Machine Detection (amd) action hook.
api.output(null, {
    "_cognigy": {
        "_voice-gateway2": {
            "json": {
                "verb": "dial",
                "actionHook": "dial",
                "callerId": "+49XXXXXXXXXXX",
                "target": [
                    {
                        "type": "phone",
                        "number": "+49XXXXXXXXXXX",
                    }
                ],
                "amd": {
                    "actionHook": "amd",
                    "recognizer": {
                        "vendor": "microsoft",
                        "language": "en-US",
                    }
                }
            }
        }
    }
})

More Information

I