Package multiple CML actions
CML actions provided by your callback webhooks must be included in an actions object, whether the actions object contains a single action or multiple actions. An actions object is a JSON array of CML instructions.
The following example CML actions play text-to-speech content, play an audio file, then hang up the call.
Execution flow and control transfer
CML actions run in sequence, but some actions (fetch, captureDtmf, dial) can transfer control to a new set of CML actions. This causes any subsequent actions defined in the initial set to be skipped.
In the following example, the second say action is never executed because the fetch action transfers control to a new set of actions.
If the fetch action fails (webhook not available or malformed CML actions returned), the Infobip platform sends the error to your errorUrl (on the CML configuration or as defined in the action). If the errorUrl does not return correct CML actions, the call is hung up.
DTMF capture exception
The captureDtmf action is an exception to the control transfer behavior. Consider the following actions:
If the end user does not respond to the DTMF prompt during the defined timeout period and the captureDtmf action does not use the callOnEmpty flag, then the next action runs (in this case, hangup).