[Freeswitch-users] Codec Negotiation Help

Spencer Thomason spencer at 5ninesolutions.com
Wed May 8 06:47:49 MSD 2013


Hi Robert,
That was exactly what I was looking for.  Even after I got the codecs offered the way I wanted, I found many of my endpoints didn't honor the preferences in the answer so even though I was offering PCMU,G729,G722,GSM and the phone was configured for G722,PCMU,G729 Cisco SPAs would answer with G722.  So much for RFC3264... 

Thanks for the help!

Spencer 


On May 7, 2013, at 1:37 PM, Robert Hadley wrote:

> Hi Spencer,
> 
> I also use late_negotiation and inherit_codec=true.  I configure outbound codecs to append ep_codec_string using originator_codec.
> 
>    <extension name="configure_outbound_codec" continue="true">
>      <condition field="${ep_codec_string}" expression="^(.+)$">
>        <action inline="true" application="set" data="originator_codec=${ep_codec_string}"/>
>      </condition>
>    </extension>
> 
> Regards,
> Robert
> 
> 
> -----Original Message-----
> From: Spencer Thomason [mailto:spencer at 5ninesolutions.com] 
> Sent: Tuesday, May 07, 2013 9:03 AM
> To: FreeSWITCH Users Help
> Subject: [Freeswitch-users] Codec Negotiation Help
> 
> Hello all,
> I'm having a bit of trouble getting codec negotiation working the way I'd like to.  I'm trying to avoid transcoding unless its absolutely necessary for the call to be setup.  I use two profiles with late negotiation enabled, an internal facing registered user endpoints and an external facing the PSTN via various ITSPs.  For calls to users I've been setting codec_string=${ep_codec_string} in my dial strings and normal bridges work fine but I'm now reworking the hunt groups using enterprise originate and that doesn't seem to work correctly (the callee's preferences are always used).  So I'd like to do the the "right" way now :-)
> 
> The basic scenario is this:
> 
> On the internal profile I have:
> CODECS IN        	G722,PCMU,G729,GSM
> CODECS OUT       	G722,PCMU,G729,GSM
> 
> On the external profile I have:
> CODECS IN        	G722,PCMU,G729
> CODECS OUT       	G722,PCMU,G729
> 
> What I'm trying to accomplish is this:
> Call from PSTN, use caller's codecs as priority for the bridge, i.e.
> PSTN GW --- PCMU, G729 -->  FreeSWITCH --- PCMU,G729,G722, GSM ---> Local Endpoint PSTN GW --- G729,PCMU -->  FreeSWITCH --- G729,PCMU,G722, GSM ---> Local Endpoint PSTN GW --- G722,PCMU -->  FreeSWITCH --- G722,PCMU,G729, GSM ---> Local Endpoint
> 
> 
> Call from local endpoint to PSTN, use callee's codecs as priority for the bridge, i.e.
> Local Endpoint Offers G722, PCMU, G729
> GW Responds PCMU,G729
> Local Endpoint --- G722,PCMU,G729 ---> FreeSWITCH --- G722,PCMU, G729 --> PSTN Desired negotiation: Both legs use PCMU
> 
> Local Endpoint Offers G722, PCMU, G729
> GW Responds G729,PCMU
> Local Endpoint --- G722,PCMU,G729 ---> FreeSWITCH --- G722,PCMU,G729 --> PSTN Desired negotiation: Both legs use G729
> 
> Local Endpoint Offers GSM
> GW Responds PCMU, G729
> Local Endpoint --- GSM ---> FreeSWITCH --- G722,PCMU,G729 --> PSTN Desired negotiation: Leg A uses GSM, Leg B uses PCMU, FreeSWITCH transcodes.
> 
> Any help is greatly appreciated!
> 
> 
> Thanks,
> Spencer
> 
> 
> 
> 
> 
> 
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
> 
> 
> 
> 
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
> 
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
> 




Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list