[Asterisk-Users] Problems with SIP codec selection

Jamie Neil jamie at versado.net
Thu Feb 24 04:48:57 MST 2005


We've been using SIP with Asterisk for a couple of years now, and it's 
generally worked fine. However we're now trying to use a more 
complicated codec setup, and I've hit a problem with how codecs are 
selected that I can't get around.

For a simple configuration:

  XLite > GSM > Asterisk

where GSM is the _only_ codec selected on XLite, and in sip.conf we have:

  [general]
  ...
  disallow=all
  allow=gsm

it works fine, however if we change the sip.conf to this:

  [general]
  ...
  disallow=all
  allow=g729

  [test_extension]
  ...
  disallow=all
  allow=gsm

we get a "No compatible codecs!" error.

I've done a bit of testing, and discovered that the codec settings for 
extensions do not seem to be taken into account during the call setup 
phase, only when the connection is completed do the extension specific 
codecs take effect. So in the above example, the call is rejected 
without ever referring to the test_extension codec settings.

I've confirmed this by setting ILBC as the only allowed codec in XLite, 
and setting sip.conf to:

  [general]
  ...
  disallow=all
  allow=ilbc

  [test_extension]
  ...
  disallow=all
  allow=gsm

The call is accepted (both ends support ILBC), but when the call is 
connected it reenables GSM on Xlite and uses that instead.

The obvious answer is to reenable gsm in the general section, but this 
causes a problem with unknown inbound SIP calls, which I want force to G729.

Is this a bug, by design or is it a problem specific to Xlite?

Any help appreciated.

-- 
Jamie Neil | <jamie at versado.net> | 0870 7777 454
Versado I.T. Services Ltd. | http://versado.net/ | 0845 450 1254



More information about the asterisk-users mailing list