[Home]

Summary:ASTERISK-00920: Asterisk ignores codecs list from phone
Reporter:jexley (jexley)Labels:
Date Opened:2004-01-26 18:46:14.000-0600Date Closed:2011-06-07 14:10:38
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) sip-capture1.txt
Description:When the sip.conf file has "allow=all" in it (the default - all codecs) the list of codecs supported by the IP phone in the INVITE message SDP part is ignored and Asterisk defaults to GSM.

The problem is compounded when Asterisk sends an INVITE to the B party, and doesn't include any codecs in the SDP part, and so the phone send back a Not Acceptable Here code.

This can be fixed by explicitly setting the codec in the sip.conf file, but it is incorrect operation for Atserisk to use a codec that the phone doesn't support.

****** ADDITIONAL INFORMATION ******

Here's an extract (attached) from an Ethereal dump. Asterisk is at 192.168.1.100, a Zultys ZIP2 phone (the A party) is at 192.168.1.7 and is trying to call another ZIP2 phone (the B party) at 192.168.1.8.

The A party send an INVITE to Asterisk, with PCMA and PCMU specified as codecs in the SDP part.
Asterisk sens an INVITE to the B party but with no codecs in the SDT part.
The B party sends Not Acceptable Here.
Asterisk sends an RTP stream to the A party, saying that the extension is not available. But the RTP stream is using GSM, which the phone does not support and so nothing is heard.

Comments:By: Brian West (bkw918) 2004-01-26 18:49:59.000-0600

Dont use allow=all this is a known issue and we do already ahve a bug open on this.

Do:
disallow=all
allow=ulaw

By: Brian West (bkw918) 2004-01-26 18:52:44.000-0600

Please refer to bug 647

By: jexley (jexley) 2004-01-26 19:54:13.000-0600

Reminder sent to bkw918

Ok - I didn't see ASTERISK-641.

However the problem is different: bug ASTERISK-641 is about GSM being top priority. Bug ASTERISK-920 is about GSM being used when it shouldn't even be an option.

Since the phone has passed it's list of supported codecs to Asterisk, you would expect Asterisk to only use codecs from that list. You wouldn't expect Asterisk to use a codec that it knows the phone doesn't support.

There also seems to be another part - where the B party phone rejects an incoming INVITE from Asterisk (due, I suspect, to the INVITE not having any codecs listed). Specifying the codec in sip.conf makes Asterisk put the codec in the INVITE message and the B party is happy to accept the call.

By: Brian West (bkw918) 2004-01-26 21:02:00.000-0600

No its related.  GSM is being picked because its offered trust me its hard coded like that.  Do as I listed above disallow=all and only allow the codecs you need and the problem will stop.  Mark is working on a way to fix this with a few config file options.