[Freeswitch-users] BLF for database flag
Stefan Kainz
s.kainz at wnt.at
Tue Sep 14 08:37:48 UTC 2021
Hi Jerry,
yes there is a way.
We use a BLF Key to determine if we're in or out of office hours, which changes depending on time and/or other parameters.
There is a hook-setting in conf/autoload_configs/lua.conf.xml.
<hook event="all" script="events.lua"/>
In that file there are a few event-paramters, which you can get with for example event:getHeader("Event-Name").
Which gives you the event name/type.
I think you are looking for the PRESENCE_PROBE Event.
Regards,
Stefan
-----Ursprüngliche Nachricht-----
Von: FreeSWITCH-users <freeswitch-users-bounces at lists.freeswitch.org> Im Auftrag von Jerry Kendall
Gesendet: Sonntag, 12. September 2021 07:00
An: freeswitch-users at lists.freeswitch.org
Betreff: [Freeswitch-users] BLF for database flag
Hello.....
Does anyone know if there is a way to have a BLF (presence monitor) for an object that is NOT a device.
I would like to have the BLF lamp toggle red/green based on a status of a variable that is a field in the database...
For example:
A user dials *85x
If the use dials *850, this can mean turn the light OFF
If the use dials *85n, this can mean turn the light ON
Then the device (x301) has a BLF set for *851.
The sip_subscriptions table will have the following:
*************************** 1. row ***************************
proto: sip
sip_user: 301
sip_host: domain
sub_to_user: *851
sub_to_host: domain
presence_hosts:
event: dialog
contact: "user"<sip:301 at ip:port;fs_nat=yes;fs_path=sip%3Aa.b.c.d%3Annn%3Btransport%3Dudp>
call_id:508931318-14314-3 at BA.CEG.HG.ED
full_from:<sip:301 at domain>;tag=673185170
full_via: SIP/2.0/UDP ip:port;branch=z9hG4bK1903845623;rport=...;received=.....
expires: 1631421776
user_agent: xyz
accept: application/dialog-info+xml, multipart/related, application/rlmi+xml
profile_name: customer
hostname: host
network_port: ...
network_ip: a.b.c.d
version: 121
orig_proto:
full_to:<sip:*852 at domain>;tag=HQrMabwmsTlX
*************************** 1. row ***************************
Thanks, any help would be great...
_________________________________________________________________________
The FreeSWITCH project is sponsored by SignalWire https://signalwire.com Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.
Join our online community to chat in real time https://signalwire.community
Professional FreeSWITCH Services
sales at freeswitch.com
https://freeswitch.com
Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://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
https://freeswitch.com
More information about the FreeSWITCH-users
mailing list