On Fri, Apr 12, 2013 at 3:16 PM, Ken Rice <krice@freeswitch.org> wrote:
You are prefing G729, so its going to try it first

In other words, you have G729 listed in your codec prefs ahead of PCMA. If you changed it to something like this it would probably work:

<X-PRE-PROCESS cmd="set" data="outbound_codec_prefs=PCMA,PCMU,G729,GSM"/>
-MC
 



On 4/12/13 5:00 PM, "Juan Antonio Ibañez Santorum" <juanito1982@gmail.com> wrote:

Hello,

   I am doing some codec negotiation (early) tests but FS does not work as I expected.

I can read at wiki: "
When FS calls leg B, the list of codecs in outbound-codec-prefs for the SIP profile is reorganized by pushing the codec negotiated above for leg A at the top. If B does not accept any of the codecs, the calls fails, obviously
"


Codec prefs setted as:

  <X-PRE-PROCESS cmd="set" data="global_codec_prefs=G729,G7221@32000h,G7221@16000h,G722,PCMU,PCMA,GSM"/>
  <X-PRE-PROCESS cmd="set" data="outbound_codec_prefs=G729,PCMU,PCMA,GSM"/>

FS select PCMA for A leg

FS offers following SDP to B leg:

 v=0
   o=FreeSWITCH 1365781615 1365781616 IN IP4 176.31.117.49
   s=FreeSWITCH
   c=IN IP4 176.31.117.49
   t=0 0
   m=audio 19780 RTP/AVP 8 101 13
   a=rtpmap:101 telephone-event/8000
   a=fmtp:101 0-16
   a=ptime:30
   m=audio 19780 RTP/AVP 18 0 8 3 101 13
   a=rtpmap:101 telephone-event/8000
   a=fmtp:101 0-16
   a=ptime:20

Session progress from B leg contains:

   v=0
   o=root 3311 3311 IN IP4 91.192.110.234
   s=session
   c=IN IP4 91.192.110.234
   t=0 0
   m=audio 16194 RTP/AVP 18 8 0 101
   a=rtpmap:18 G729/8000
   a=fmtp:18 annexb=no
   a=rtpmap:8 PCMA/8000
   a=rtpmap:0 PCMU/8000
   a=rtpmap:101 telephone-event/8000
   a=fmtp:101 0-16
   a=silenceSupp:off - - - -
   a=ptime:20
   a=sendrecv

FS codec comparison debug look as:

sofia_glue.c:5094 Audio Codec Compare [G729:18:8000:20:8000]/[PCMA:8:8000:30:64000]
sofia_glue.c:5094 Audio Codec Compare [G729:18:8000:20:8000]/[G729:18:8000:20:8000]
sofia_glue.c:3077 Set Codec sofia/external/0034950004588 G729/8000 20 ms 160 samples 8000 bits

FS start comparing G729 instead PCMA selected in A leg

Is that ok? is there any way to get selected PCMA for B leg without using late negotiation nor disabling transcoding

Regards


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

--
Ken
http://www.FreeSWITCH.org
http://www.ClueCon.com
http://www.OSTAG.org
irc.freenode.net #freeswitch

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org




--
Michael S Collins
Twitter: @mercutioviz
http://www.FreeSWITCH.org
http://www.ClueCon.com
http://www.OSTAG.org