[Freeswitch-users] Catch events from ESL socket
João Mesquita
jmesquita at freeswitch.org
Thu Apr 18 22:18:55 MSD 2013
Let me get this straight, these are logs, not events... Correct? You want
to parse logs with ESL? That's possible as well, but just want to make sure
that's you want. I am not familiar with skypopen to know this much but I
can help you with ESL.
João Mesquita
FreeSWITCH™ Solutions
On Thu, Apr 18, 2013 at 11:12 AM, Anton Vojlenko <stargray at bigmir.net>wrote:
> Thank for you explanation. I need catch this output:
> 2013-04-18 16:22:11.045518 [DEBUG] skypopen_protocol.c:1767 [|]
> [DEBUG_SKYPE 1767 ][sk1 ][IDLE,IDLE] SENDING: |||PING||||
> 2013-04-18 16:22:11.045518 [DEBUG] skypopen_protocol.c:207 [|]
> [DEBUG_SKYPE 207 ][sk1 ][IDLE,IDLE] READING: |||PONG|||
> But sometimes in array i see this:
> 2013-04-18 16:22:13.025304 [DEBUG] skypopen_protocol.c:734 [|]
> [DEBUG_SKYPE 734 ][sk1 ][IDLE,IDLE] NO ACTIVE calls in this
> moment, skype_call 1347 is RINGING, to ask PARTNER_DISPNAME and
> PARTNER_HANDLE
> 2013-04-18 16:22:13.025304 [DEBUG] skypopen_protocol.c:1767 [|]
> [DEBUG_SKYPE 1767 ][sk1 ][IDLE,IDLE] SENDING: |||GET CALL 1347
> PARTNER_DISPNAME||||
>
> Can you explain how to catch only command output?
>
>
>
> 2013/4/18 João Mesquita <jmesquita at freeswitch.org>
>
>> Recveventtimed might return null if an event does not arrive in those ms
>> time. Make sure to use recvevent only if you don't want that.
>>
>> Sent from my iPhone
>>
>> On Apr 18, 2013, at 4:14 AM, Anton Vojlenko <stargray at bigmir.net> wrote:
>>
>> > Hello,
>> > I am using skypopen module and i need catch API answers from skype
>> client. I wrote simple perl script:
>> >
>> > require ESL;
>> > my $con = new ESL::ESLconnection("localhost", "8021", "ClueCon");
>> > while (1){
>> > $con->sendRecv("log 7");
>> > $e = $con->bgapi("skypopen sk1 PING");
>> > #$uuid = $e->getHeader("Job-UUID");
>> > #print $e->serialize("plain");
>> > $n = 2;
>> > while($n){
>> > $event = $con->recvEventTimed(100);
>> > if ($event and $event->getHeader("Log-File") eq
>> "skypopen_protocol.c") {
>> > push(@dmesg, $event->getBody());
>> >
>> > }
>> > $n--;
>> > }
>> > print "@dmesg\n";
>> > sleep(3);
>> > @dmesg = ();
>> > }
>> >
>> > But sometimes I get empty array, because script catch differect events.
>> How to catch events from ESL socket by UUID?
>> >
>> _________________________________________________________________________
>> > Professional FreeSWITCH Consulting Services:
>> > 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
>> > 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 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
>> 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 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
> 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/20130418/d7b8da46/attachment.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list