diff --git a/src/mod_netconf.c b/src/mod_netconf.c
index c9cfecd..1df0a1e 100644
--- a/src/mod_netconf.c
+++ b/src/mod_netconf.c
@@ -227,21 +227,16 @@
 	if (sid) json_object_object_add(err_reply, "session-id", json_object_new_string(sid));
 }
 
-static char* netconf_connect(server_rec* server, apr_pool_t* pool, apr_hash_t* conns, const char* host, const char* port, const char* user, const char* pass)
+static char* netconf_connect(server_rec* server, apr_pool_t* pool, apr_hash_t* conns, const char* host, const char* port, const char* user, const char* pass, struct nc_cpblts * cpblts)
 {
 	struct nc_session* session;
 	struct session_with_mutex * locked_session;
 	char *session_key;
-	struct nc_cpblts * cpblts = nc_session_get_cpblts_default ();
-
-	nc_cpblts_add(cpblts, "urn:cesnet:tmc:netopeer:1.0");
 
 	/* connect to the requested NETCONF server */
 	password = (char*)pass;
 	session = nc_session_connect(host, (unsigned short) atoi (port), user, cpblts);
 
-	nc_cpblts_free (cpblts);
-
 	/* if connected successful, add session to the list */
 	if (session != NULL) {
 		/* generate hash for the session */
@@ -708,15 +703,15 @@
 	ssize_t buffer_len;
 	struct pollfd fds;
 	int status, buffer_size, ret;
-	json_object *request, *reply, *json_obj;
+	json_object *request, *reply, *json_obj, *capabilities;
 	int operation;
-	int i, chunk_len;
+	int i, chunk_len, len = 0;
 	char* session_key, *data;
 	const char *host, *port, *user, *pass;
 	const char *msgtext, *cpbltstr;
 	const char *target, *source, *filter, *config, *defop, *erropt, *sid;
 	struct nc_session *session = NULL;
-	struct nc_cpblts* cpblts;
+	struct nc_cpblts* cpblts = NULL;
 	NC_DATASTORE ds_type_s, ds_type_t;
 	NC_EDIT_DEFOP_TYPE defop_type = 0;
 	NC_EDIT_ERROPT_TYPE erropt_type = 0;
@@ -868,12 +863,21 @@
 				port = json_object_get_string(json_object_object_get(request, "port"));
 				user = json_object_get_string(json_object_object_get(request, "user"));
 				pass = json_object_get_string(json_object_object_get(request, "pass"));
+            if ((capabilities = json_object_object_get(request, "capabilities")) != NULL || (len = json_object_array_length(capabilities)) != 0) {
+                  cpblts = nc_cpblts_new (NULL);
+                  for (i=0; i<len; i++) {
+                     nc_cpblts_add (cpblts, json_object_get_string(json_object_array_get_idx(capabilities, i)));
+                  }
+            } else {
+               ap_log_error (APLOG_MARK, APLOG_ERR, 0, server, "no capabilities specified");
+            }
 				ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, server, "host: %s, port: %s, user: %s", host, port, user);
 				if ((host == NULL) || (user == NULL)) {
 					ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, server, "Cannot connect - insufficient input.");
 					session_key = NULL;
 				} else {
-					session_key = netconf_connect(server, pool, netconf_sessions_list, host, port, user, pass);
+					session_key = netconf_connect(server, pool, netconf_sessions_list, host, port, user, pass, cpblts);
+               nc_cpblts_free (cpblts);
 					ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, server, "hash: %s", session_key);
 				}
 
diff --git a/src/test-client.c b/src/test-client.c
index 0c3fa75..1b3ff96 100644
--- a/src/test-client.c
+++ b/src/test-client.c
@@ -95,7 +95,7 @@
 
 int main (int argc, char* argv[])
 {
-	json_object* msg = NULL, *reply = NULL;
+	json_object* msg = NULL, *reply = NULL, *capabilities = NULL;
 	const char* msg_text;
 	int sock;
 	struct sockaddr_un addr;
@@ -153,6 +153,18 @@
 		printf("\n");
 		line[(strlen(line)-1)] = 0;
 		json_object_object_add(msg, "pass", json_object_new_string(line));
+      printf("Supported capabilities\n");
+      capabilities = json_object_new_array();
+      json_object_object_add(msg, "capabilities", capabilities);
+      while (1) {
+         printf("Next capability (empty for end): ");
+		   getline (&line, &len, stdin);
+         if (line == NULL || strcmp(line,"\n") == 0) {
+            break;
+         }
+         line[(strlen(line)-1)] = 0;
+         json_object_array_add (capabilities, json_object_new_string(line));
+      }
 	} else if (strcmp(argv[1], "disconnect") == 0) {
 		/*
 		 * Close NETCONF session
