[Freeswitch-users] absolute_codec_string just process one codec
Saeed Ahmed
saeedahmad1981 at gmail.com
Wed Jul 20 14:57:46 MSD 2011
Thanks Steve for a quick reply.
now i understand the mystery behind :)
I'll try to find a way to replace , with : in ${ep_codec_string}.
thanks for detailed explanation.
On Wed, Jul 20, 2011 at 12:16 PM, Steven Ayre <steveayre at gmail.com> wrote:
> You are... but it's perhaps not a very well documented feature so you
> can be forgiven...
>
> The problem is that , separates variable assignments in {} and []
> blocks. So what you're using is actually setting the following
> variables:
> absolute_codec_string=PCMA at 8000h@20i at 64000b
> PCMU at 8000h@20i at 64000b=
> G729 at 8000h@20i at 8000b=
> leg_time_out=10
> process_cdr=b_only
> which hopefully makes it obvious why it's only using the first codec.
>
> It's a known problem (http://jira.freeswitch.org/browse/FS-2126) and
> there *is* a workaround for it. There's a special syntax that lets you
> use a character other than comma for separating the codec names. This
> actually applies to any variable values that are set in the {} and []
> blocks and the special character gets replaced by a comma during the
> variable assignment.
>
> The syntax is to put a prefix of ^^: at the start of the value and
> replace the commas in the value with :
> You can use any (almost) character you like though, it uses the one
> after the initial ^^.
>
> As a short example: [absolute_codec_string=^^:PCMU:PCMA]
>
> For your example you'll want to pass in:
> {absolute_codec_string=^^:PCMA at 8000h@20i at 64000b:PCMU at 8000h@20i at 64000b
> :G729 at 8000h@20i at 8000b,leg_time_out=10,process_cdr=b_only}
>
> Since you appear to be getting that from a variable you'll probably
> want to find some way of substituting the , for the :
>
> -Steve
>
>
>
> On 20 July 2011 10:11, Saeed Ahmed <saeedahmad1981 at gmail.com> wrote:
> > Hi,
> >
> > If i set absoluteye_codec_string in dialplan with multiple codecs, like
> > G729,PCMA,PCMU, then just first codec will be processed, rest will be
> > ignored.
> >
> > Example: {absolute_codec_string=${ep_codec_string}, i even tried using it
> > like: absolute_codec_string='${ep_codec_string}'
> > or absolute_codec_string=\'${ep_codec_string}\'
> > or absolute_codec_string=\\'${ep_codec_string}\\'
> > (as suggested by bkw_ on IRC)
> >
> > Console log shows like that:
> >
> > EXECUTE sofia/profile/1234567 at 1.2.2.3
> > bridge({absolute_codec_string=PCMA at 8000h@20i at 64000b,PCMU at 8000h
> @20i at 64000b,G729 at 8000h@20i at 8000b,leg_time_out=
> > 10,process_cdr=b_only}[SupplierPrefix=]sofia/fstest/456789 at 7.2.1.4)
> >
> >
> > 2011-07-20 11:03:59.448455 [DEBUG] switch_ivr_originate.c:1873 Parsing
> > global variables
> > 2011-07-20 11:03:59.448455 [DEBUG] switch_event.c:1170 Parsing variable
> > [absolute_codec_string]=[PCMA at 8000h@20i at 64000b]
> > 2011-07-20 11:03:59.448455 [DEBUG] switch_event.c:1170 Parsing variable
> > [leg_time_out]=[10]
> > 2011-07-20 11:03:59.448455 [DEBUG] switch_event.c:1170 Parsing variable
> > [process_cdr]=[b_only]
> >
> > Am i doing something wrong or should i open a JIRA?
> >
> >
> > --
> >
> > Kind Regards
> >
> > Saeed Ahmed
> >
> > _______________________________________________
> > Join us at ClueCon 2011, Aug 9-11, Chicago
> > http://www.cluecon.com 877-7-4ACLUE
> >
> > 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, Chicago
> http://www.cluecon.com 877-7-4ACLUE
>
> 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/20110720/eac785d2/attachment-0001.html
More information about the FreeSWITCH-users
mailing list