The frequency response and nonlinear resonance frequency shift of an acoustical resonator with losses and having a varying cross section were investigated previously using Lagrangian mechanics and perturbation for resonator shapes that are close to cylindrical [M. F. Hamilton, et al., J. Acoust. Soc. Am. 110, 109-119 (2001)]. The same approach is extended here to include resonators having any shape for which the Webster horn equation is a valid model in the linear approximation. Admissible shapes include cones and bulbs proposed for acoustical compressors. The approach is appropriate for approximate but rapid parameter estimations for resonators with complicated shapes, requiring far less computation time than for direct numerical solution of the one-dimensional model equation frequently used for such resonators [Ilinskii et al., J. Acoust. Soc. Am. 104, 2664-2674 (1998)]. Results for cone and bulb shaped resonators with losses are compared with results from the direct numerical solution. The direction of the resonance frequency shift is determined by the efficiency of second-harmonic generation in modes having natural frequencies below versus above the frequency of the second harmonic, and how the net effect of this coupling compares with the frequency shifts due to cubic nonlinearity and static deformation.