The growing demand for mobile wireless access has stimulated the emergence of new communication technologies. Opportunistic Spectrum Access (OSA) is viewed as a promising alternative to overcome the problems caused by static spectrum assignment. Opportunistic access allows dynamic mapping of the transmission needs and communication opportunities. However, performing this task efficiently is not trivial. Indeed, it has been shown to be NP-complete. In this context, this paper presents an efficient heuristic for solving the problem of channel allocation and routing, according to the opportunities and channels available. The proposed heuristic is optimal in terms of energy consumption, being close to the optimum, about 5% above, in terms of transmission time.