Hello,
On my system, I play music on hold via an external Icecast (mod_shout) stream, and have written some custom dialplan apps that play audio in early media. Given that I have mixed codecs across my connected endpoints and would like to avoid transcoding where possible (since it introduces aliasing), I'd like the system to select a codec for early media, then re-invite the originating client when the call is answered and re-negotiate the codec. For instance:
Extension 701 (supporting G722) calls a PSTN number.
Early media (MOH, dialplan apps, etc.) play in G722.
The PSTN leg is answered. Since the callee only supports PCMU, re-invite and, since late negotiation and inherit_codec are enabled, the codec switches to PCMU.
How can I achieve this? Thanks in advance!
On my system, I play music on hold via an external Icecast (mod_shout) stream, and have written some custom dialplan apps that play audio in early media. Given that I have mixed codecs across my connected endpoints and would like to avoid transcoding where possible (since it introduces aliasing), I'd like the system to select a codec for early media, then re-invite the originating client when the call is answered and re-negotiate the codec. For instance:
Extension 701 (supporting G722) calls a PSTN number.
Early media (MOH, dialplan apps, etc.) play in G722.
The PSTN leg is answered. Since the callee only supports PCMU, re-invite and, since late negotiation and inherit_codec are enabled, the codec switches to PCMU.
How can I achieve this? Thanks in advance!