[asterisk-bugs] [Asterisk 0013384]: Asterisk doesn't respect the codec order

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Aug 27 10:44:42 CDT 2008


The following issue has been UPDATED. 
====================================================================== 
http://bugs.digium.com/view.php?id=13384 
====================================================================== 
Reported By:                ibc
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13384
Category:                   Channels/chan_sip/CodecHandling
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     closed
Asterisk Version:           1.4.21.1 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
Resolution:                 suspended
Fixed in Version:           
====================================================================== 
Date Submitted:             2008-08-27 10:24 CDT
Last Modified:              2008-08-27 10:44 CDT
====================================================================== 
Summary:                    Asterisk doesn't respect the codec order
Description: 
I receive calls from a E1 in Europe (so audio is encoded in PCMA). Then
Asterisk does a Dial to a SIP proxy defined as:

---------------
[proxy]
type = peer
host = xxxxxxxx
allow = g729   ; <--- FIRST
allow = alaw
allow = ulaw
context = from-proxy
----------------


But the INVITE generated by Asterisk has the following SDP:
-------------
 v=0
 o=root 5394 5394 IN IP4 88.99.3.2
 s=session
 c=IN IP4 88.99.3.2
 t=0 0
 m=audio 14868 RTP/AVP 8 18 0 3 101
 a=rtpmap:8 PCMA/8000
 a=rtpmap:18 G729/8000
 a=fmtp:18 annexb=no
 a=rtpmap:0 PCMU/8000
 a=rtpmap:3 GSM/8000
 a=rtpmap:101 telephone-event/8000
 a=fmtp:101 0-16
 a=silenceSupp:off - - - -
 a=ptime:20
 a=sendrecv
-------------

As you can see, the preferred codec is PCMA instead of G729.
I've also tryed adding in the dialplan:
  exten => _XXXXX.,n,Set(__SIP_CODEC=g729)
but it does nothing.


Well, I can understand that in order to avoid transcoding Asterisk chooses
PCMA (since it's the same codification as the audio coming from the E1),
but it should be possible to respect the codec order set in the peer
configuration.

Of course this is very important for a SIP provider.

So I wonder why there is not a way to get it, and also why this is the
default behaviour (non respecting the codec order set in sip.conf).
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0004825 [patch][post 1.4] New codec negotiation...
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-08-27 10:44 blitzrage      Status                   new => closed       
2008-08-27 10:44 blitzrage      Resolution               open => suspended   
======================================================================




More information about the asterisk-bugs mailing list