[Freeswitch-users] blf with event socket

Nandy Dagondon nandy1925 at gmail.com
Thu Jul 17 06:03:20 MSD 2014


Hi Darcy,

First, I setup BLF to monitor FXO trunks. Here's the method:
1. When CHANNEL_CALLSTATE is catched,  PRESENCE_IN event is sent to reflect
the status of the call.

When the phone send SUBSCRIBE, the confirmed LEDs (solid red) turns green
(free).  This is our problem.  So I modify the lua script to:

2. Save/update the PRESENCE_IN data into a separate database.  One record
for each FXO port.  This is already tested.

Using another lua script to catch SUBSCRIBE event (or any event from the
phone), every record is pulled out and the data used to send PRESENCE_IN
event. That will restore the active LEDs on the phone.

I have not yet test the other lua script.  I still have to verify if the
PHONE regularly sends SUBSCRIBE messages.  If not, I'll use other events
from the phone.

It easier for me since I created a separate database -  but for the SIP
phones I'll leave that to the FS gurus.

Rgds,
/Nandy

On Thu, Jul 17, 2014 at 9:40 AM, Darcy Primrose <fs at voice2net.ca> wrote:

>  Nandy, can you elaborate more on the work around, how to you get this to
> the phone once a subscribe is received from the Phone.  Lighting it the
> first time is easy, keeping it lit is the issue for me.
>
> Thanks in advance
> Darcy
>
> ----- Original Message -----
> *From:* Nandy Dagondon <nandy1925 at gmail.com>
> *To:* FreeSWITCH Users Help <freeswitch-users at lists.freeswitch.org>
> *Sent:* Wednesday, July 16, 2014 9:08 PM
> *Subject:* Re: [Freeswitch-users] blf with event socket
>
>
> I'd like to put more info here because I'm also having the same problem.
> In my case,  I capture CHANNEL_CALLSTATE of FreeTDM FXO to light BLF LEDs
> on the operator phone.
>
> Perhaps the phone clears the LEDs when it receives SUBSCRIBE reply from
> FS. A refresh is necessary from FS.  As a workaround, I save the channel
> state into a database record.  PRESENCE_IN will be generated from all
> records when a SUBSCRIBE event is received from the phone.
>
> I prefer to see a PRESENCE refresh but I don't know it's compliance to the
> RFCs (I'm still a dummy:-). My cents worth.
>
> /Nandy
>
>
> On Thu, Jul 17, 2014 at 2:06 AM, Darcy Primrose <fs at voice2net.ca> wrote:
>
>>  Some time ago I started this and got side tracked.  I am trying to
>> light a lamp on the phones with event_socket.  I send the following message
>> which does lite the LEDs on the IP Phones, snom, grandstream and yealink.
>> The trouble is, as soon as the phone sends a subscription message re this
>> identity, the freeswitch responds with a message that kills the led.  It
>> appears to me that when the freeswitch gets the event socket it sends the
>> message on to the required phones, but does not keep this status within the
>> freeswitch, so a subsequent subscribe query kills the lamp.    I did create
>> a dummy extension to match the led I need to lite.  We will use this for
>> Nite Answer Keys and Agent Logins.
>>
>> Am I missing something or is there a further step I need to take.
>>
>> sendevent PRESENCE_IN
>> proto: sip
>> from: 70 at xxxx.voice2net.ca
>> login: 70 at xxxx.voice2net.ca
>> event_type: presence
>> alt_event_type: dialog
>> Presence-Call-Direction: inbound
>> answer-state: confirmed
>> unique-id: 00c0120f
>>
>> Darcy Primrose
>> Voice2Net
>>
>>
>> _________________________________________________________________________
>> 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/20140717/2a87388c/attachment-0001.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list