Can you expand ${distributor(mylist)} prior to the originate? On Mon, Sep 8, 2014 at 1:26 PM, David Villasmil < david.villasmil.work@gmail.com> wrote:
Hello Steven,
that's what I'am using.
$call_command = "originate sofia/gateway/\${distributor(mylist)}" . $destination . " &callcenter(" . $queue . ")"; my $uuid = $con->bgapi("eval" , $call_command);
On Mon, Sep 8, 2014 at 4:45 PM, Steven Ayre <steveayre@gmail.com> wrote:
I meant the 'eval' api in freeswitch, not the eval keyword in Perl - sorry for the confusion, I should have been clearer.
https://wiki.freeswitch.org/wiki/Mod_commands#eval
On 8 September 2014 15:08, David Villasmil < david.villasmil.work@gmail.com> wrote:
The commands are being issues properly, this is a trace between fs and my script (port 8021)
ontent-Type: command/reply Reply-Text: -ERR command not found
event xml CHANNEL_ORIGINATE CHANNEL_ANSWER CHANNEL_HANGUP
Content-Type: command/reply Reply-Text: +OK event listener enabled xml
api originate sofia/gateway/${distributor(domestic)}13234829352 &callcenter(agents_queue)
Content-Type: api/response Content-Length: 17
-ERR INVALID_URL api originate sofia/gateway/${distributor(domestic)}12148741890 &callcenter(agents_queue)
so that's not it...
David
On Mon, Sep 8, 2014 at 3:42 PM, David Villasmil < david.villasmil.work@gmail.com> wrote:
Hello Steven,
Still not working for me. Although I don't see any errors (got console on debug), it just doesn't do anything (I'm also running tshark)
tried both with ESL bgapi and with system(/usr/local/freeswitch/fs_cli -x 'originate sofia/gateway/${distributor(domestic)}19139387114 &callcenter(agents_queue)')
Thanks!
On Mon, Sep 8, 2014 at 3:06 PM, Steven Ayre <steveayre@gmail.com> wrote:
It appears that variable substitution isn't done on the dialstring portion.
On 8 September 2014 13:48, David Villasmil < david.villasmil.work@gmail.com> wrote:
Hello Steven and thanks for your answer. I will try that, but why is that?
On Mon, Sep 8, 2014 at 12:54 PM, Steven Ayre <steveayre@gmail.com> wrote:
> my $uuid = $con->bgapi("eval", "originate > sofia/gateway/\${distributor(mylist)}/$destination &callcenter(myqueue)"); > > > On 8 September 2014 11:54, Steven Ayre <steveayre@gmail.com> wrote: > >> 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 >>> >> >> > > > _________________________________________________________________________ > 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 >
_________________________________________________________________________ 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
_________________________________________________________________________ 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
_________________________________________________________________________ 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
_________________________________________________________________________ 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
_________________________________________________________________________ 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