An armed man allegedly fired at police with a shotgun before holding a man and a baby hostage in Melbourne 's west.