You need to run it via the 'eval' API.

On 8 September 2014 01:43, David Villasmil <david.villasmil.work@gmail.com> wrote:
Hello Guys,

from perl i'm connecting to FS using FS' ESL library and issuing an originate command which fails when i try to use ${distributor()}

It seems FS' ESL Library or perl itself is changing "$" for "%", i get an error:

2014-09-07 20:25:57.484946 [ERR] mod_sofia.c:4249 Invalid Gateway '%{distributor(mylist)}'

The command is actually:

my $uuid = $con->bgapi("originate", "sofia/gateway/\${distributor(mylist)}/$destination &callcenter(myqueue)"); 

So i'm scaping $

Has anyone experienced this?

Thanks for you help!

David

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org