Index: kernel/generic/include/ipc/ipc.h
===================================================================
--- kernel/generic/include/ipc/ipc.h	(revision a0ce870840bae13124d349be1c51897d54caf223)
+++ kernel/generic/include/ipc/ipc.h	(revision bf75e3cb2c7ba437dce4bc70fc808e165cdb0206)
@@ -165,5 +165,7 @@
  *                       error is sent back to caller. Otherwise 
  *                       the call is accepted and the response is sent back.
- *                     - the allocated phoneid is passed to userspace 
+ *                     - the hash of the client task is passed to userspace
+ *                       (on the receiving side) as ARG4 of the call.
+ *                     - the hash of the allocated phone is passed to userspace
  *                       (on the receiving side) as ARG5 of the call.
  *
@@ -319,4 +321,7 @@
 typedef struct {
 	sysarg_t args[IPC_CALL_LEN];
+	/** Task which made or forwarded the call with IPC_FF_ROUTE_FROM_ME. */
+	struct task *task;
+	/** Phone which made or last masqueraded this call. */
 	phone_t *phone;
 } ipc_data_t;
Index: kernel/generic/src/ipc/ipc.c
===================================================================
--- kernel/generic/src/ipc/ipc.c	(revision a0ce870840bae13124d349be1c51897d54caf223)
+++ kernel/generic/src/ipc/ipc.c	(revision bf75e3cb2c7ba437dce4bc70fc808e165cdb0206)
@@ -295,4 +295,5 @@
 		atomic_inc(&phone->active_calls);
 		call->data.phone = phone;
+		call->data.task = TASK;
 	}
 	
@@ -406,4 +407,5 @@
 			call->caller_phone = call->data.phone;
 		call->data.phone = newphone;
+		call->data.task = TASK;
 	}
 	
Index: kernel/generic/src/ipc/sysipc.c
===================================================================
--- kernel/generic/src/ipc/sysipc.c	(revision a0ce870840bae13124d349be1c51897d54caf223)
+++ kernel/generic/src/ipc/sysipc.c	(revision bf75e3cb2c7ba437dce4bc70fc808e165cdb0206)
@@ -248,4 +248,6 @@
 			/* The connection was accepted */
 			phone_connect(phoneid, &answer->sender->answerbox);
+			/* Set 'task hash' as arg4 of response */
+			IPC_SET_ARG4(answer->data, (sysarg_t) TASK);
 			/* Set 'phone hash' as arg5 of response */
 			IPC_SET_ARG5(answer->data,
