By condensation of octadecyl bromide (I) with N-(3-aminopropyl)diethanolamine (II) by means of K2CO3 at 120 C.