[asterisk-users] SIP codec negotiation / manipulation

Kevin Sandy kevin.sandy at snohio.net
Wed Mar 17 10:37:42 CDT 2010


We're having an odd issue with codec negotiation from one of our SIP providers. Here's the basic situation.

We receive an invite from them advertising support for G711, G729, and G723. In our response, we send back that we support G711 and G729. In about half the cases, this results in no problems, with audio being encoded with G711. The other half of the time, they send us a second invite requesting G729. However, they proceed to send us a G711 encoded audio stream...

They have somewhat acknowledged the problem, but their advice is for us to only accept a single codec in our 200 OK. We don't want to disable either; we have customers using G729, so we'd like to avoid transcoding when possible, but we also do some T38 faxing, which I believe requires G711 to start off.

My first thought was to selectively force the codec on inbound calls - if it is for a voice number, use 729, otherwise 711. However, I can't find any way of doing this within Asterisk. (We do have an OpenSIPS server sitting between us and the provider, and I could use OpenSIPS features to do this; however, right now the OpenSIPS server is fairly dumb - it's only proxying traffic between us and the provider and knows nothing about our specific DIDs.)

A couple more details in case anyone has seen a similar issue. The provider is Broadvox, and this issue only seems to manifest on calls coming to them via Skype. They claim to not have any direct link with Skype, but it seems odd that the problem would be specific to Skype callers if the call is coming to Broadvox as a standard PSTN call.

Is there any way to do this? Am I totally missing something and making a stupid mistake, or making the issue more complicated than it needs to be?




More information about the asterisk-users mailing list