We examine collisions of moving solitons in a fiber Bragg grating with a triplet composed of two closely set repulsive defects of the grating and an attractive one inserted between them. A doublet (dipole), consisting of attractive and repulsive defects with a small distance between them,is considered too. Systematic simulations demonstrate that the triplet provides for superior results, as concerns the capture of a free pulse and creation of a standing optical soliton, in comparison with recently studied traps formed by single and paired defects, as well as the doublet: 2/3 of the energy of the incident soliton can be captured when its velocity attains half the light speed in the fiber (the case most relevant to the experiment), and the captured soliton quickly relaxes to a stationary state. A subsequent collision between another free soliton and the pinned one is examined too, demonstrating that the impinging soliton always bounces back, while the pinned one either remainsin the same state, or is kicked out forward, depending on the collision velocity and phase shift between the solitons.