[Freeswitch-users] inherit_codec failing with pre-media

sangdrax8 sangdrax8 at gmail.com
Wed Sep 18 21:55:32 MSD 2013


Did I explain a bit to much detail for the users list?

Does anyone use "inherit_codec=true" and have it working?


On Tue, Sep 17, 2013 at 2:27 PM, sangdrax8 <sangdrax8 at gmail.com> wrote:
> I pulled the latest freeswitch from git this morning, and am still
> having issues using inherit_codec=true.  It seems the only way I can
> get it to defer to the choice of the b-leg call is to remove the
> ringback, and thus the need for early media.
>
> My setup has 2 phones with the following codecs configured:
>
> phone1000:  g722, ulaw
> phone1001:  ulaw
>
> My goal is to have a call initiated by phone1000 (a-leg) to defer the
> codec choice until phone1001 (b-leg) chooses one.  This would allow
> them to talk with no transcoding required by freeswitch.  With the
> following dial plan, this fails to work.
>
> <extension name="Local_Extension">
>       <condition field="destination_number" expression="^(10[01][0-9])$">
>         <action application="export" data="dialed_extension=$1"/>
>         <action application="set" data="ringback=${us-ring}"/>
>         <action application="set" data="transfer_ringback=$${hold_music}"/>
>         <action application="set" data="call_timeout=30"/>
>         <action application="set" data="hangup_after_bridge=true"/>
>         <action application="set" data="inherit_codec=true" />
>         <action application="bridge"
> data="user/${dialed_extension}@${domain_name}"/>
>       </condition>
> </extension>
>
> It does log that it is going to defer:
>
> 2013-09-17 13:15:10.956535 [DEBUG] mod_sofia.c:4542 [zrtp_passthru]
> Setting a-leg inherit_codec=true
> 2013-09-17 13:15:10.956535 [DEBUG] mod_sofia.c:4545 [zrtp_passthru]
> Setting b-leg absolute_codec_string='G722 at 8000h@20i at 64000b,PCMU at 8000h@20i at 64000b'
>
>
> then it tries to provide the ringback for the a-leg, and it negotiates
> to g722 since freeswitch supports that and it is the first match.
> Later when the b-leg is answered, it also negotiates, this time to
> ulaw as that is all b supports.  My call completes, but freeswitch has
> to transcode between the two.
>
> In an attempt to see inherit_codec work, I then commented out the
> ringback line from the above dialplan.  With only this one change,
> freeswitch now waits until the b-leg negotiation, and passes that back
> to the a-leg.  The call completes and both handsets are using ulaw and
> no transcoding is required.  The problem being that the calling party
> never gets a ring while waiting.
>
> I can't imagine that the only way to use inherit_codec=true is with
> all ringing turned off.  Can someone tell me if there is an additional
> option I am missing?  All documentation I read seems to indicate that
> just adding "inherit_codec=true" will fix things, but even the
> default.xml provided as an example uses ringback and therefore fails.



Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users mailing list