Follow Me BLF for on/off on Polycom VVX410

Status
Not open for further replies.

gking77

New Member
Sep 9, 2019
12
4
3
46
Hi,

1st post, please forgive. I am on FusionPBX 4.5.11, and freeswitch 1.10.2. I am trying to set up a BLF for followme on a Polycom VVX410. I am able to get the followme feature to work fine using *21@{domain} (basic speed dial), but no BLF. I was able to find the thread on here" Follow me status - notify to Yealink BLF LED", and I was able to get the same results. Using the info from the thread, I created a dial plan as below pointing to the follow_me.lua script. I have also removed the comment from <param name="startup-script" value="call_flow_monitor.lua"/> from the /etc/freeswitch/autoload_configs/lua.conf.xml.

Does anybody have a functioning BLF for FollowMe on a Polycom VVX410? This doesn't need to be server side controlled, just a BLF for on/off. Any help would be GREATLY appreciated. Thank you.

1579031612139.png
I have added to the blf_subscribe.lua ...

local find_fm do

local find_fm_sql = [[select t2.follow_me_enabled
from v_extensions t1 inner join v_follow_me t2 on t1.follow_me_uuid = t2.follow_me_uuid
inner join v_domains t3 on t1.domain_uuid = t3.domain_uuid
where t3.domain_name = :domain_name and (t1.extension = :extension or t1.number_alias = :extension)
]]

find_fm = function(user)
local ext, domain_name = split_first(user, '@', true)
if not domain_name then return end
local dbh = Database.new('system')
if not dbh then return end
local fm = dbh:first_value(find_fm_sql, {domain_name = domain_name, extension = ext})
dbh:release()
return fm

end

end

protocols.fm = function(event)
local from, to = event:getHeader('from'), event:getHeader('to')
local expires = tonumber(event:getHeader('expires'))
if expires and expires > 0 then
local proto, user = split_first(to, '+', true)
user = user or proto
local fm_status = find_fm(user)
if fm_status then
log.noticef("Find Follow Me: %s status: %s", to, tostring(fm_status))
presence_in.turn_lamp(fm_status == "true", to)
else
log.warningf("Can not find Follow Me: %s", to)
end
else
log.noticef("%s UNSUBSCRIBE from %s", from, to)
end
end


I have added this to the follow_me.lua script.

local presence_in = require "resources.functions.presence_in"


--trigger BLF led status change
if (enabled == "false") then
blf_status = "false"
end

if string.find(extension, 'fm+', nil, true) ~= 1 then
presence_in.turn_lamp( blf_status,
'fm+'..extension.."@"..domain_name
);
end





All my NOTIFY messages are as below with confirmed as the state.
1579032384130.png
 
Status
Not open for further replies.