[Freeswitch-users] ESL Log to console

Michael Collins msc at freeswitch.org
Thu Aug 2 23:07:18 MSD 2012


Well, it all depends on how you're calling this script. Is it being called
from the dialplan?
-MC

On Thu, Aug 2, 2012 at 11:25 AM, David Villasmil <
david.villasmil.work at gmail.com> wrote:

> Ouch!
>
> Ok, this is not like in Lua... Ok, I'll try that.... is there any
> documentation regarding what can and can't be set and the conditions for
> setting them? What about bridging channels, etc?
>
> :(
>
> David
>
> On Thu, Aug 2, 2012 at 8:19 PM, Michael Collins <msc at freeswitch.org>wrote:
>
>> Can't use execute and set unless this is an outbound ESL connection,
>> which it seems not to be. I'd try this:
>>
>> $con->api("uuid_setvar","$uuid customer_company $local_variable");
>>
>> -MC
>>
>>
>> On Thu, Aug 2, 2012 at 11:01 AM, David Villasmil <
>> david.villasmil.work at gmail.com> wrote:
>>
>>> Hello Michael,
>>>
>>> Yes, there's a call in progress. Executing it like you said worked. (api)
>>>
>>>
>>> Now, I'm trying to set a variable like so:
>>>
>>> $con->execute("set","customer_company             = " .  $local_variable
>>> , $uuid );
>>>
>>> But it doesn't get set...
>>>
>>> :(
>>>
>>> Thanks for your help!
>>>
>>> David
>>>
>>>
>>> On Thu, Aug 2, 2012 at 6:25 PM, Michael Collins <msc at freeswitch.org>wrote:
>>>
>>>> David,
>>>>
>>>> Do you have a call in progress at this point? If not then you'll need
>>>> to supply a uuid of a live call, as mentioned here:
>>>> http://wiki.freeswitch.org/wiki/Event_Socket_Library#execute
>>>>
>>>> Remember, "execute" means "execute dialplan application" so if there's
>>>> no channel then "execute" really doesn't mean a whole lot.
>>>>
>>>> Alternatively you could try something like this:
>>>>
>>>> $con->api("log","WARNING Don't cross the streams!!");
>>>>
>>>> Remember this rule of thumb: pretty much anything you type at fs_cli is
>>>> an "API" and therefore you can use $con->api(), whereas anything that is a
>>>> diaplan application requires an actual channel on which to run
>>>> $con->execute().
>>>>
>>>> Hope that makes sense... :)
>>>>
>>>> -Michael
>>>>
>>>> On Thu, Aug 2, 2012 at 8:43 AM, David Villasmil <
>>>> david.villasmil.work at gmail.com> wrote:
>>>>
>>>>> Hello Guys,
>>>>>
>>>>> I'm starting off with ESL, which is cool, but I'm trying to log to the
>>>>> console like Lua's "freeswitch.consoleLog("info", "BLAH BLAH");" doing it
>>>>> like:
>>>>>
>>>>> my $con = new ESL::ESLconnection("localhost", "8021", "ClueCon");
>>>>> $con->execute("log", "1, BlahBlah");
>>>>>
>>>>>
>>>>> But nothing gets in the log files or console... and I can't find any
>>>>> documentation as to how to log using "execute"...
>>>>>
>>>>> any ideas?
>>>>>
>>>>> Thanks!
>>>>>
>>>>> David
>>>>>
>>>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120802/543c4641/attachment.html 


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