Pipe retort treatment