A Routine is a sequence of commands to be performed on a connection. Each command in the Routine is responsible for sending and receiving media streams from the target connection until some ending condition is reached, at which point the next command in the Routine begins. Routines are specified as JSON lists that are passed as parameters to certain API requests or returned in the response body of some callbacks.