[Freeswitch-users] Set disable-transcoding in dialplan

Dmitry Bely dmitry.bely at gmail.com
Fri Sep 4 04:26:39 PDT 2009


I had a similar problem when I needed to talk to a gateway using g729
while g711 was used by default. The following works for me:

vars.xml
(...)
  <X-PRE-PROCESS cmd="set"
data="global_codec_prefs=PCMU,PCMA,G7221 at 32000h,G7221 at 16000h,G722,GSM,G729,G723"/>
  <X-PRE-PROCESS cmd="set" data="outbound_codec_prefs=PCMU,PCMA,GSM,G729,G723"/>

sip_profiles/internal.xml
(...)
    <param name="inbound-late-negotiation" value="true"/>

dialplan/default/01_example.com.xml
(...)
      <action application="set" data="absolute_codec_string=G729"/>
      <action application="bridge"
data="{absolute_codec_string='G729'}sofia/gateway/${default_gateway}/$1"/>

On Fri, Sep 4, 2009 at 9:54 AM, rod<kawarod at laposte.net> wrote:
> Hi Nandy,
>
> yes already tried this, but if I use proxy_media=true, FS makes no
> control on the content of the RTP stream. But the pbm is that I need to
> use this:
> http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_start_dtmf_generate
> This function enables transcoding of SIP_INFO or RFC2833 to Inband DTMF
> in G711
>
> But this feature doesn't work if I'm using proxy_media=true.
>
> In fact my setup is the following:
>
> CPE using G711A, G729 and SIP INFO for DTMF
> PEER_A using G729 only and RFC_2833
> PEER_B using G711 and SIP INFO
>
> I have been able to make this works, with proxy_media=true for PEER_B
> cause I don't need transcoding of DTMF (SIP INFO to SIP INFO).
> For PEER_A, proxy_media is set to false (default) cause  I need
> transcoding SIP INFO to RFC2833. I'm able to use G729 using
> codec_negotiation=greedy and setting G729 with highest priority on my
> internal profile.
>
> But the pbm is that I need to add PEER_C.
> PEER_C needs G711 with transcoding DTMF from SIP_INFO to Inband.
>
> And this is where I'm stuck, cause using "greedy settings and G729 with
> priority 1 in my codec list and proxy_media=false" force FS to negotiate
> G729 on leg A. But Leg B is willing to use G711 and FS is unable to
> transcode G729 <---> G711.
>
> I was wondering if there is a way for FS to force the codec order on Leg
> A with some knowledge of the preferred codec on Leg B, ie I know that
> Leg B will always use G711 so that I want to biase the SDP answer on Leg
> A based on this fact.
>
> regards,
> rod
>
> Nandy Dagondon a écrit :
>> rod,
>>
>> have you tried this?
>> http://lists.freeswitch.org/pipermail/freeswitch-users/2008-March/002199.html
>>
>> /nandy
>>
>>
>> On Thu, Sep 3, 2009 at 2:50 PM, rod <kawarod at laposte.net
>> <mailto:kawarod at laposte.net>> wrote:
>>
>>     Hi Michael,
>>
>>     I did some tests but I haven't been successful, so there is what I'm
>>     trying to achieve:
>>
>>     On A leg, my phone is using: PCMA and G729 (in this priority order)
>>
>>     With PEER A, I want to use only G729 (thats is the only codec that
>>     this
>>     PEER support), so that the RTP flow will be:
>>        Phone-----G729----FS-----G729-----PEER_A
>>
>>     With PEER B, I want to use only G711, so:
>>        Phone-----G711----FS-----G711-----PEER_B
>>
>>     In fact, I'd like to force FS announcing the codec list priority based
>>     on the priority of the codec announced by the PEER, cause FS is unable
>>     to transcode G729 <--> G711.
>>
>>     Tried a lot of things (greedy for codec-negociation, late_codec,
>>     disable_transcoding, codec-prefs) without success.
>>
>>     If you have some clue.
>>
>>     regards,
>>     rod
>>
>>     Michael Collins a écrit :
>>     > Check out this page:
>>     > http://wiki.freeswitch.org/wiki/Codec_negotiation
>>     >
>>     > Late negotiation will probably let you handle all the cases you
>>     need.
>>     > -MC
>>     >
>>     > On Mon, Aug 31, 2009 at 8:00 AM, rod <kawarod at laposte.net
>>     <mailto:kawarod at laposte.net>
>>     > <mailto:kawarod at laposte.net <mailto:kawarod at laposte.net>>> wrote:
>>     >
>>     >     Hi all,
>>     >
>>     >     I'm wondering if I can do something like this:
>>     >        - in my internal profile, I have this because of some PEER
>>     >     using G729:
>>     >              - <param name="disable-transcoding" value="true"/>
>>     >
>>     >     But for a specific PEER, I'd like to activate transcoding:
>>     >              - for this PEER, only G711 is used
>>     >              - I'd like to transcode DTMF SIP INFO or RFC2833 to
>>     INBAND
>>     >
>>     >     So in my dialplan, I tried before bridging:
>>     >
>>     >        - <action application="set"
>>     data="disable-transcoding=false"/>
>>     >        - <action application="start_dtmf_generate" data="true"/>
>>     >
>>     >     But I still see RFC2833 events between my FS and PEER and
>>     the DTMF are
>>     >     not working.
>>     >
>>     >     So 2 questions:
>>     >        - does application "start_dtmf_generate" requires transcoding
>>     >        - if yes, can I set the variable disable-transcoding in
>>     my dialplan
>>     >
>>     >     regards,
>>     >     rod

- Dmitry Bely




More information about the FreeSWITCH-users mailing list