I am trying to show that $$\int_0^{\infty} \frac {\sin{\phi_1 x}} x \frac {\sin{\phi_2 x}} x \cdots \frac {\sin{\phi_n x}} x \cos{a_1 x} \cdots \cos{a_m x} \frac {\sin ax} x \, \mathrm d x = \frac {\pi} 2 \phi_1 \phi_2 \cdots \phi_n,$$ if $\phi_1,\phi_2, \ldots, \phi_n, a_1,a_2, \ldots, a_m$ are real, $a$ is positive and $$a>|\phi_1|+|\phi_2|+\cdots + |\phi_n| + |a_1| + \cdots + |a_m|.$$
As with $\int_0^\infty \frac {\sin x} x\,\mathrm d x$ and $\int_0^\infty \left(\frac{\sin x} x\right)^2\,\mathrm d x$ I have tried integrating over a semi-circular contour with an indentation at the origin and then using Jordan's lemma, which should still work as the integrand is an even function. But when I expand the sines and cosines out in terms of exponentials I cannot decide whether the semi-circle should be in the upper-half or the lower-half plane since I cannot know what the signs of the constants in the exponents are. Hints on how to go about this would thus be appreciated.
Let $$f(x) = f_+(x) + f_-(x) = \\ \frac {e^{i a x}} {2 i x} \prod_{k = 1}^n \frac {\sin \phi_k x} x \prod_{k = 1}^m \cos a_k x - \frac {e^{-i a x}} {2 i x} \prod_{k = 1}^n \frac {\sin \phi_k x} x \prod_{k = 1}^m \cos a_k x.$$
Convert $f_+(x)$ into exponentials and expand. Each exponent will be of the form $i(a \pm \phi_1 \pm \dots \pm \phi_n \pm a_1 \pm \dots \pm a_m)x$. The condition on the parameters ensures that the imaginary part of each of those coefficients in front of $x$ is positive. The integral over a large half-circle in the upper half-plane is small.
Next, $$c_{-1} = \operatorname{Res}_{z = 0} f_+(z) = \frac 1 {2 i} \prod_{k = 1}^n \phi_k,$$ and the integral over a small half-circle is the integral of $c_{-1}z^{-1}$, which is $i \pi c_{-1}$, plus a small remainder.
$f_-(x)$ produces the same contribution.