<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Thank you Chris for sharing your lua files with us.<div class=""><br class=""></div><div class="">I tried but probably I missed something, because I got that error:</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(175, 173, 36);" class="">EXECUTE <a href="mailto:sofia/internal/91@192.168.130.12" class="">sofia/internal/91@192.168.130.12</a> lua(set_presence.lua vm_blf_extension confirmed)</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(195, 55, 32);" class="">2015-03-30 21:13:31.775263 [ERR] mod_lua.cpp:203 scripts/presence.lua:2: attempt to index global 'Presence' (a nil value)</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(195, 55, 32);" class="">stack traceback:</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(195, 55, 32);" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>scripts/presence.lua:2: in main chunk</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(195, 55, 32);" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>[C]: in function 'dofile'</div><div class=""><span class="Apple-tab-span" style="color: rgb(195, 55, 32); font-family: Menlo; font-size: 11px; white-space: pre;">        </span><span style="color: rgb(195, 55, 32); font-family: Menlo; font-size: 11px;" class="">/usr/local/freeswitch/scripts/set_presence.lua:1: in main chunk</span></div><div class=""><br class=""></div><div class="">Any idea?</div><div class=""><br class=""></div><div class="">I have named the files <span style="font-family: Menlo; font-size: 11px;" class="">set_presence.lua and presence.lua(for the functions) and both are located under scripts.</span></div><div class=""><span style="font-family: Menlo; font-size: 11px;" class=""><br class=""></span></div><div class=""><span style="font-family: Menlo; font-size: 11px;" class="">Thanks!</span></div><div class=""> <div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 30 Mar 2015, at 20:43, Chris Tunbridge <<a href="mailto:blasterjr@gmail.com" class="">blasterjr@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div class=""><div class=""><div class=""><div class="">This can be done with lua, what i've done is created a small lua set of functions that make presence easy to handle.<br class=""><br class=""></div>here's the presence function file: <a href="http://pastie.org/private/8qfyjbwzsmwm2a4uz7owq" class="">http://pastie.org/private/8qfyjbwzsmwm2a4uz7owq</a><br class=""><br class=""></div>then you setup a lua file (call it scripts/set_presence.lua) that is similar to the following<br class=""><br class="">dofile "presence.lua"<br class=""><br class=""></div><div class="">state = argv[2]<br class=""></div>user = argv[1]<br class=""></div>domain = session:getVariable('domain')<br class=""></div><div class=""><div class=""><div class=""><br class="">local p = Presence:new()<br class="">p:init{user = user, domain = domain, uuid = 'custom_blf_key'};<br class=""><br class=""></div><div class="">p:set(state,false);<br class=""><br class=""></div><div class="">you can execute this by adding the following line into your extension that controls it.<br class=""><br class=""></div><div class=""><action application="lua" data="set_presence.lua vm_blf_extension confirmed"/><br class=""><br class=""></div><div class="">you can swap out the "vm_blf_extension" with anything you want, and as long as the phone "Subscribes" to this, it will work.<br class=""><br class=""></div><div class="">You can use early, confirmed, terminated for the statuses.<br class=""></div><div class=""><div class=""><div class=""><br class=""></div></div></div></div></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Mon, Mar 30, 2015 at 9:37 AM, Andrew Cassidy <span dir="ltr" class=""><<a href="mailto:andrew@cassidywebservices.co.uk" target="_blank" class="">andrew@cassidywebservices.co.uk</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">There's always the SEND_PRESENCE esl event...</div><div class="gmail_extra"><div class=""><div class="h5"><br class=""><div class="gmail_quote">On 30 March 2015 at 16:25, Raphael Lechner <span dir="ltr" class=""><<a href="mailto:raphael.lechner@gmail.com" target="_blank" class="">raphael.lechner@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">We migrated a customer from asterisk to FreeSWITCH 2 weeks ago and they had also a lamp for indicating if the “today closed” playback or call forward to voicemail is enabled or not.<span class=""><font color="#888888" class=""><div class=""><br class=""></div></font></span><div class=""><span class=""><font color="#888888" class="">Raphael</font></span><div class=""><div class=""><br class=""><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On 30 Mar 2015, at 17:17, Sean Devoy <<a href="mailto:sdevoy@bizfocused.com" target="_blank" class="">sdevoy@bizfocused.com</a>> wrote:</div><br class=""><div class=""><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class="">I have a customer who had this same request as well as one for a lamp indicating a call parked using “valet parking”. They are worried a parked call could get forgotten. I would love to hear a solution to either/both.<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class=""> </span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class="">Sean<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class=""> </span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif" class=""><b class=""><span style="font-size:11pt;font-family:Calibri,sans-serif" class="">From:</span></b><span style="font-size:11pt;font-family:Calibri,sans-serif" class=""><span class=""> </span><a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" style="color:purple;text-decoration:underline" target="_blank" class="">freeswitch-users-bounces@lists.freeswitch.org</a><span class=""> </span>[<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" style="color:purple;text-decoration:underline" target="_blank" class="">mailto:freeswitch-users-bounces@lists.freeswitch.org</a>]<span class=""> </span><b class="">On Behalf Of<span class=""> </span></b>Paul Atreides<br class=""><b class="">Sent:</b><span class=""> </span>Monday, March 30, 2015 10:32 AM<br class=""><b class="">To:</b><span class=""> </span>FreeSWITCH Users Help<br class=""><b class="">Subject:</b><span class=""> </span>Re: [Freeswitch-users] Changing BLF lamp persistently<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif" class=""><u class=""></u> <u class=""></u></div><div class=""><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif" class="">I want to have an indicator if the company voice mail is active or not.<br class=""><br class="">At the moment I am calling a number and setting a global variable to activate the central company voice mail.<u class=""></u><u class=""></u></div></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif" class="">But I would like to use the BLF from a dummy account so that the user can see at the phone whether the voice mail is<u class=""></u><u class=""></u></div></div><div class=""><p class="MsoNormal" style="margin:0in 0in 12pt;font-size:12pt;font-family:'Times New Roman',serif">active or not.<u class=""></u><u class=""></u></p></div></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif" class=""><u class=""></u> <u class=""></u></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif" class="">On Mon, Mar 30, 2015 at 4:08 PM, Michael Jerris <<a href="mailto:mike@jerris.com" style="color:purple;text-decoration:underline" target="_blank" class="">mike@jerris.com</a>> wrote:<u class=""></u><u class=""></u></div><blockquote style="border-style:none none none solid;border-left-color:rgb(204,204,204);border-left-width:1pt;padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in" class=""><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif" class="">Can you describe a bit more exactly what you are trying to accomplish? Presence changes in reaction to events that happen in calls.<u class=""></u><u class=""></u></div></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif" class=""><u class=""></u> <u class=""></u></div><div class=""><div class=""><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif" class="">On Mon, Mar 30, 2015 at 9:46 AM, Paul Atreides <<a href="mailto:paul.atreides83@googlemail.com" style="color:purple;text-decoration:underline" target="_blank" class="">paul.atreides83@googlemail.com</a>> wrote:<u class=""></u><u class=""></u></div></div></div><blockquote style="border-style:none none none solid;border-left-color:rgb(204,204,204);border-left-width:1pt;padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in" class=""><div class=""><div class=""><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif" class="">Hi,<br class=""><br class="">does someone know how to change the BLF lamp persistently? I found the channel variable<br class="">presence id but this one will only last as long as the channel is active. Is there a way to change<br class="">it permerently?<br class=""><br class="">Thanks for helping.<u class=""></u><u class=""></u></div><div class=""><p class="MsoNormal" style="margin:0in 0in 12pt;font-size:12pt;font-family:'Times New Roman',serif"><u class=""></u></p></div></div></div></div></blockquote></div></div></blockquote></div></div></div></div></blockquote></div></div></div></div></div></div></blockquote></div></div></div></div></blockquote></div></div></div></blockquote></div><br class=""></div></div></body></html>