String pair production in non homogeneous backgrounds