<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">The script is located in your FS script directory, check the path in fs_cli:<div class=""><br class=""></div><div class=""><span style="font-family: Menlo; font-size: 11px;" class="">eval ${script_dir}</span></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class=""><br class=""></span></font><div>mod_v8 does the job in this case.</div><div><br class=""></div><div><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class="">Am 03.02.2021 um 20:31 schrieb David Villasmil <<a href="mailto:david.villasmil.work@gmail.com" class="">david.villasmil.work@gmail.com</a>>:</div><br class="Apple-interchange-newline"><div class=""><div dir="auto" class="">Where would this file be located and what module loads it?</div><div class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 3 Feb 2021 at 13:08, Henning Heedfeld <<a href="mailto:heedfeld@gmail.com" class="">heedfeld@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div style="word-wrap:break-word;line-break:after-white-space" class="">Hi,<div class=""><br class=""></div><div class="">you can create a hook for this:</div><div class=""><br class=""></div><div class=""><font face="Courier New" style="font-family: "Courier New";" class=""><configuration name="v8.conf" description="Google V8 JavaScript Plug-Ins"><br class=""><span style="white-space:pre-wrap;font-family:"Courier New"" class=""> </span><settings><br class=""><span style="white-space:pre-wrap;font-family:"Courier New"" class=""> </span><hook event="CUSTOM" subclass="sofia::register" script="event_hook.js"/><br class=""><span style="white-space:pre-wrap;font-family:"Courier New"" class=""> </span><hook event="CUSTOM" subclass="sofia::unregister" script="event_hook.js"/><br class=""><span style="white-space:pre-wrap;font-family:"Courier New"" class=""> </span></settings><br class=""><span style="white-space:pre-wrap;font-family:"Courier New"" class=""> </span><modules><br class=""><span style="white-space:pre-wrap;font-family:"Courier New"" class=""> </span></modules><br class=""></configuration><br class=""></font><br class="">event_hook.js:</div><div class=""><br class=""></div><div class=""><font face="Courier New" style="font-family: "Courier New";" class="">var fromUser = event.getHeader("from-user");<br class="">var fromHost = event.getHeader("from-host");<br class="">var fromUri = event.getHeader("from-user") + "@" + event.getHeader("from-host");<br class="">var addFifo = "add callqueue" + "@" + fromHost + " user/" + fromUri + " 1 20 0";<br class="">var delFifo = "del callqueue" + "@" + fromHost + " user/" + fromUri;<br class="">var rc;<br class="">var regType;<br class=""><br class="">if (event.getHeader("Event-Subclass") == "sofia::register") {<br class=""> regType = "Register";<br class="">} else if (event.getHeader("Event-Subclass") == "sofia::unregister") {<br class=""> regType = "Unregister";<br class="">}<br class=""><br class="">if (fromUser >= 1001 && fromUser <= 1008) {<br class=""> console_log('info', 'USER ' + fromUri + " " + regType);<br class=""> if (regType == "Register") {<br class=""> rc = apiExecute("fifo_member", addFifo);<br class=""> } else if (regType == "Unregister") {<br class=""> rc = apiExecute("fifo_member", delFifo);<br class=""> }<br class=""> console_log(regType + " " + fromUri + " (User Agent: " + event.getHeader("user-agent") + ")");<br class=""> rc = apiExecute("fifo", "count callqueue@" + fromHost);<br class=""> console_log("FIFO status: " + rc);<br class="">}<br class=""></font><br class=""><div class="">This is based on a JS hook, but it will work with Lua, too.</div><div class=""><br class=""></div><div class="">My script does a login / logout for FIFO member if a user between 1001 and 1008 does a SIP login or logout. </div><div class="">You have to adapt the commands for mod_callcenter.</div><div class=""><br class=""></div><div class="">hth</div></div></div><div style="word-wrap:break-word;line-break:after-white-space" class=""><div class=""><div class="">Henning</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><blockquote type="cite" class=""><div class="">Am 03.02.2021 um 12:29 schrieb Nathan Stratton <<a href="mailto:nathan@robotics.net" target="_blank" class="">nathan@robotics.net</a>>:</div><br class=""><div class=""><div dir="ltr" class="">I am playing around with call center, and noticed many times that users will disconnect (stop registering) but be stuck in queue because they did not log out. How hard would it be to have something that runs every minute and log out all agents that are not registered?<br clear="all" class=""><div class=""><div dir="ltr" data-smartmail="gmail_signature" class=""><div dir="ltr" class=""><div class=""><br class="">><><br class="">nathan stratton</div></div></div></div></div>
_________________________________________________________________________<br class=""><br class="">The FreeSWITCH project is sponsored by SignalWire <a href="https://signalwire.com/" target="_blank" class="">https://signalwire.com</a><br class="">Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.<br class="">Build your next product on our scalable cloud platform.<br class=""><br class="">Join our online community to chat in real time <a href="https://signalwire.community/" target="_blank" class="">https://signalwire.community</a><br class=""><br class="">Professional FreeSWITCH Services<br class=""><a href="mailto:sales@freeswitch.com" target="_blank" class="">sales@freeswitch.com</a><br class=""><a href="https://freeswitch.com/" target="_blank" class="">https://freeswitch.com</a><br class=""><br class="">Official FreeSWITCH Sites<br class=""><a href="https://freeswitch.com/oss" target="_blank" class="">https://freeswitch.com/oss</a><br class=""><a href="https://freeswitch.org/confluence" target="_blank" class="">https://freeswitch.org/confluence</a><br class=""><a href="https://cluecon.com/" target="_blank" class="">https://cluecon.com</a><br class=""><br class="">FreeSWITCH-users mailing list<br class=""><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank" class="">FreeSWITCH-users@lists.freeswitch.org</a><br class=""><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank" class="">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br class="">UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank" class="">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br class=""><a href="https://freeswitch.com/" target="_blank" class="">https://freeswitch.com</a></div></blockquote></div><br class=""></div></div>_________________________________________________________________________<br class="">
<br class="">
The FreeSWITCH project is sponsored by SignalWire <a href="https://signalwire.com/" rel="noreferrer" target="_blank" class="">https://signalwire.com</a><br class="">
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.<br class="">
Build your next product on our scalable cloud platform.<br class="">
<br class="">
Join our online community to chat in real time <a href="https://signalwire.community/" rel="noreferrer" target="_blank" class="">https://signalwire.community</a><br class="">
<br class="">
Professional FreeSWITCH Services<br class="">
<a href="mailto:sales@freeswitch.com" target="_blank" class="">sales@freeswitch.com</a><br class="">
<a href="https://freeswitch.com/" rel="noreferrer" target="_blank" class="">https://freeswitch.com</a><br class="">
<br class="">
Official FreeSWITCH Sites<br class="">
<a href="https://freeswitch.com/oss" rel="noreferrer" target="_blank" class="">https://freeswitch.com/oss</a><br class="">
<a href="https://freeswitch.org/confluence" rel="noreferrer" target="_blank" class="">https://freeswitch.org/confluence</a><br class="">
<a href="https://cluecon.com/" rel="noreferrer" target="_blank" class="">https://cluecon.com</a><br class="">
<br class="">
FreeSWITCH-users mailing list<br class="">
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank" class="">FreeSWITCH-users@lists.freeswitch.org</a><br class="">
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank" class="">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br class="">
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank" class="">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br class="">
<a href="https://freeswitch.com/" rel="noreferrer" target="_blank" class="">https://freeswitch.com</a></blockquote></div></div>-- <br class=""><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class="">Regards,</div><div class=""><br class=""></div>David Villasmil<div class="">email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank" class="">david.villasmil.work@gmail.com</a></div><div class="">phone: +34669448337</div></div></div>
_________________________________________________________________________<br class=""><br class="">The FreeSWITCH project is sponsored by SignalWire <a href="https://signalwire.com" class="">https://signalwire.com</a><br class="">Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.<br class="">Build your next product on our scalable cloud platform.<br class=""><br class="">Join our online community to chat in real time <a href="https://signalwire.community" class="">https://signalwire.community</a><br class=""><br class="">Professional FreeSWITCH Services<br class=""><a href="mailto:sales@freeswitch.com" class="">sales@freeswitch.com</a><br class="">https://freeswitch.com<br class=""><br class="">Official FreeSWITCH Sites<br class="">https://freeswitch.com/oss<br class="">https://freeswitch.org/confluence<br class="">https://cluecon.com<br class=""><br class="">FreeSWITCH-users mailing list<br class="">FreeSWITCH-users@lists.freeswitch.org<br class="">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br class="">UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br class="">https://freeswitch.com</div></blockquote></div><br class=""></div></body></html>