[Freeswitch-users] calling limit_usage via ESL

Hector Geraldino Hector.Geraldino at ip-soft.net
Thu Nov 17 19:19:25 MSK 2011


What about:  "execute" + command + " " + arguments
From: freeswitch-users-bounces at lists.freeswitch.org [mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Avi Marcus
Sent: Wednesday, November 16, 2011 6:20 PM
To: FreeSWITCH Users Help
Subject: Re: [Freeswitch-users] calling limit_usage via ESL

The wiki says it's an API also. I have frequently executed it directly in fs_cli.
When I try it without "api" at the start, it hangs.

-Avi

On Thu, Nov 17, 2011 at 1:00 AM, Hector Geraldino <Hector.Geraldino at ip-soft.net<mailto:Hector.Geraldino at ip-soft.net>> wrote:
I think that, if it's an application (i.e. can be executed directly from the dialplan), you shouldn't use the 'api' prefix.

I'm not familiar with the php esl module, but in the Java ESL there's a difference when you try to call an api command vs and application:

API:
                "api " + command + " " + arguments

APP:
SendMsg message = new SendMsg(uuid);
message.addCallCommand("execute");
                message.addExecuteAppName(appName);
                message.addExecuteAppArg(arguments);

Also, you can always inspect the execution result if you're executing the command in sync mode.

From: freeswitch-users-bounces at lists.freeswitch.org<mailto:freeswitch-users-bounces at lists.freeswitch.org> [mailto:freeswitch-users-bounces at lists.freeswitch.org<mailto:freeswitch-users-bounces at lists.freeswitch.org>] On Behalf Of Avi Marcus
Sent: Wednesday, November 16, 2011 5:41 PM
To: FreeSWITCH Users Help
Subject: [Freeswitch-users] calling limit_usage via ESL

I'm using the php esl implementation in fusionpbx.. I'm able to pass "api show channels count" and "api show calls count" and the like, but when I do:
"api limit_usage hash origination usa_pd" it's just blank.
Pasting "limit_usage hash origination usa_pd" into fs_cli yields 0 (or higher as the case may be).

There DOES seem to be a \n returned, but nothing else. I've got no 'friggin clue.
Help, please?

Thanks,
Avi

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting at freeswitch.org<mailto:consulting at freeswitch.org>
http://www.freeswitchsolutions.com




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

FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org<mailto: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/20111117/10cce0f7/attachment-0001.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list