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