[Freeswitch-users] Freeswitch transcoding

Steven Ayre steveayre at gmail.com
Tue Jun 14 17:14:08 MSD 2011


At a guess, it's this line:
<action application="set" data="bypass_media=true"/>
Unless the media is going through FS it can't trancode. The SDP (codec list)
will be forwarded from the aleg to the bleg so absolute_codec_string would
be ignored.

Also this has no effect, unless have proxy_media set to true on the sip
profile. You don't need to set them to false, they'll already be false.
You're correct to have this disabled though, as that would also prevent
transcoding.
<action application="set" data="proxy_media=false"/>

This won't do as you think:
<action application="set" data="absolute_codec_string=PCMU"/>
It chooses the codec before you get to the dialplan. absolute_codec_string
will only apply to the bleg. The incoming codec will either be picked from
the inbound-codec-prefs param on the sip profile that receives the a-leg, or
if you're using late-negotiation it'll pick that after the bridge so that
it'll try to use the same codec as the bleg if possible and pick one of the
other choices and transcode if that's not possible. absolute_codec_string
overrides the outbound-codec-prefs sip profile param on the bleg.

Try these on your sip profile:
 <param name="inbound-codec-prefs" value="PCMU" />
 <param name="outbound-codec-prefs" value="PCMA" />

Then this will transcode:
<extension name="external">
     <condition field="destination_number" expression="^666654351428063">
          <action application="set" data="hangup_after_bridge=true"/>
          <action application="set" data="progress_timeout=20"/>
          <action application="set"
data="export_vars=et_routing_number,et_routing_host,et_routed_number,et_routed_host,et_random_key"/>
          <action application="set"
data="et_routing_number=666654351428063"/>
          <action application="set" data="et_routing_host=10.0.0.12"/>
          <action application="set"
data="et_random_key=029645322327599477"/>
          <action application="set"
data="et_routed_number=555554351428063"/>
          <action application="set" data="et_routed_host=10.0.0.14"/>
          <action application="bridge" data="sofia/external/
555554351428063 at 10.0.0.14"/>
     </condition>
</extension>

If you want to offer other codecs you can add them to the codec-pref params.
They'll be listed in the preference order. FS will handle the transcoding
automatically.

You might also find it useful to read the Codec Negotiation page on the
Wiki, if you haven't already done so:
http://wiki.freeswitch.org/wiki/Codec_Negotiation

-Steve




On 14 June 2011 13:35, Gustavo Espeche <gustavo.espeche at easyipcall.com>wrote:

> Hi we are trying to do transcoding with freeswitch g711a-->g711u or
> g711-->speex but we can't do that FS do a trascoding, follow is a
> dialplan that we use with mod_curl
>
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <document type="freeswitch/xml">
> <section name="dialplan" description="Regex/XML Dialplan">
> <context name="public">
> <extension name="external">
> <condition field="destination_number" expression="^666654351428063">
> <action application="set" data="hangup_after_bridge=true"/>
> <action application="set" data="progress_timeout=20"/>
> <action application="set"
>
> data="export_vars=et_routing_number,et_routing_host,et_routed_number,et_routed_host,et_random_key"/>
> <action application="set" data="et_routing_number=666654351428063"/>
> <action application="set" data="et_routing_host=10.0.0.12"/>
> <action application="set" data="et_random_key=029645322327599477"/>
> <action application="set" data="proxy_media=false"/>
> <action application="set" data="bypass_media=true"/>
> <action application="set" data="absolute_codec_string=PCMU"/>
> <action application="export" data="nolocal:absolute_codec_string=PCMA"/>
> <action application="set" data="et_routed_number=555554351428063"/>
> <action application="set" data="et_routed_host=10.0.0.14"/>
> <action application="bridge"
> data="sofia/external/555554351428063 at 10.0.0.14"/>
> </condition>
> </extension>
> </context>
> </section>
> </document>
>
>  we relay can't understand what are we doing wrong.
> are we need configure someone special in FS? we are using
> sip_external_profile with port 5060.
>
>
> Regards.
>
> --
>
> Gustavo Espeche
> EasyIpCall S.R.L.
> www.easyipcall.com
> Bv Mitre 517 24° E
> Cordoba - Argentina
> Te: +54 - 351 - 4280633
>
>
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110614/e2084ba7/attachment.html 


More information about the FreeSWITCH-users mailing list