I have some problem with codecs that I cant seem to get right.
My setup is a Cisco AS5350 and an Asterisk and then a SER where clients are connected.
I have for each user a codec to use. All “normal” users should use G.729, and for some with high bandwidth I allow G.711A. However, I have a problem with enforcing this codec through the Asterisk.
As B2BUA there are two “legs”, eg. for an incoming call coming from the Cisco and going to a Client Phone.
- Cisco —> Asterisk: Here I cant control which codec to use on a per user basis.
- Asterisk —> Client-Phone: Here I use different contexts towards the asterisk, eg. ser_alaw + ser_g729, each has its codec enabled.
How do I control the codec between Cisco and Asterisk dynamically to avoid transcoding?