# Question about a convex combination of characteristic functions

To show that $$\sum_k p_k\phi_k$$ is a characteristic function where each $$\phi_k$$ is, it shown here that $$\sum_kp_k =1$$ is sufficient.

I don't understand how $$X_N = \sum_k X_k1_{N=k}$$ has the characteristic function $$\sum_kp_k\phi_k$$, where $$N$$ is independent of $$X_k$$ and are defined on the same underlying space? $$\phi_{X_N}(t)=E[\text{exp}(it\sum_k X_k1_{N=k})] = E[\Pi_k \text{exp}(it X_k1_{N=k})]=?$$

\begin{align} \sum_k P(N=k) \phi_k(t) &= \sum_k E(1_{N=k}) Ee^{itX_k}\\ &= \sum_k E(1_{N=k}e^{itX_k}) \tag 1\\ &= E(\sum_k 1_{N=k}e^{itX_k})\tag 2\\ &= E(\exp(it \sum_k X_k 1_{N=k})) \tag 3\\ &= \phi_{X_N}(t) \end{align}
$$(1)$$: $$N$$ and $$X_k$$ are independent
$$(2)$$: $$\sum_k \int | 1_{N=k}e^{itX_k}| dP = \sum_k \int 1_{N=k} dP = \sum_k P(N=k) = 1 <\infty$$ so switching the sum and the expectation is licit
$$(3)$$: $$\sum_k 1_{N=k}e^{itX_k} = \exp(it \sum_k X_k 1_{N=k})$$
If $$\phi$$ is a characteristic function and $$\lambda>0$$, $$e^{\lambda(\phi-1)}$$ is a characteristic function.
Indeed consider $$N$$ a Poisson$$(\lambda)$$ r.v. and $$Y$$ a r.v. having characteristic function $$\phi$$. Let $$Y_0=0$$ and $$(Y_n)_{n\geq 1}$$ i.i.d according to $$Y$$. Set $$X_n=\sum_{k=0}^n Y_k$$. Then $$\phi_{X_n}(t)=\phi(t)^n$$, hence $$\sum_{k\geq 0} P(N=k) \phi_k(t) = \sum_{k\geq 0} \frac{\lambda^k}{k!} e^{-\lambda} \phi(t)^k= e^{\lambda(\phi(t)-1)}$$