public static function create_hold($mode, $channels, $response, $timeout = null)
    {
        $channels = self::parse_channels($channels);
        $ichannels = self::get_hold_channels($channels);
        $hold = array();
        $hold['mode'] = $mode;
        $hold['channels'] = $ichannels;
        if (!is_null($timeout)) {
            $hold['timeout'] = $timeout;
        }
        $iresponse = self::get_hold_response($response);
        $instruct = array();
        $instruct['hold'] = $hold;
        if (!is_null($iresponse)) {
            $instruct['response'] = $iresponse;
        }
        return json_encode($instruct);
    }