The mechanism of superconductivity in pnictides is discussed through direct doping in superconducting FeAs and also in charge reservoir REO layers of SmFeAsO. The un-doped SmFeAsO is charge neutral Spin Density Wave (SDW) compound with magnetic ordering below 150 K. The Superconducting FeAs layers are doped with Co and Ni at Fe site, whereas REO layers are doped with F at O site. The electron doping in SmFeAsO through Co results in superconductivity with transition temperature (Tc) maximum up to 15 K, whereas F doping results in Tc up to 47 K in SmFeAsO. All these REFe/Co/NiAsO/F compounds are iso-structural to ZrCuSiAs structure. The samples are crystallized in a tetragonal structure with space group P4/nmm. Variation of Tc with different doping routes shows the versatility of the structure and mechanism of occurrence of superconductivity. It seems doping in redox layer is more effective than direct doping in superconducting FeAs layer.