<div dir="auto">Where would this file be located and what module loads it?</div><div><br><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">heedfeld@gmail.com</a>> wrote:<br></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">Hi,<div><br></div><div>you can create a hook for this:</div><div><br></div><div><font face="Courier New" style="font-family:"Courier New";color:rgb(0,0,0)"><configuration name="v8.conf" description="Google V8 JavaScript Plug-Ins"><br><span style="white-space:pre-wrap;font-family:"Courier New"">    </span><settings><br><span style="white-space:pre-wrap;font-family:"Courier New"">          </span><hook event="CUSTOM" subclass="sofia::register" script="event_hook.js"/><br><span style="white-space:pre-wrap;font-family:"Courier New"">           </span><hook event="CUSTOM" subclass="sofia::unregister" script="event_hook.js"/><br><span style="white-space:pre-wrap;font-family:"Courier New""> </span></settings><br><span style="white-space:pre-wrap;font-family:"Courier New""> </span><modules><br><span style="white-space:pre-wrap;font-family:"Courier New"">   </span></modules><br></configuration><br></font><br>event_hook.js:</div><div><br></div><div><font face="Courier New" style="font-family:"Courier New";color:rgb(0,0,0)">var fromUser = event.getHeader("from-user");<br>var fromHost = event.getHeader("from-host");<br>var fromUri = event.getHeader("from-user") + "@" + event.getHeader("from-host");<br>var addFifo = "add callqueue" + "@" + fromHost + " user/" + fromUri + " 1 20 0";<br>var delFifo = "del callqueue" + "@" + fromHost + " user/" + fromUri;<br>var rc;<br>var regType;<br><br>if (event.getHeader("Event-Subclass") == "sofia::register") {<br>        regType = "Register";<br>} else if (event.getHeader("Event-Subclass") == "sofia::unregister") {<br>        regType = "Unregister";<br>}<br><br>if (fromUser >= 1001 && fromUser <= 1008) {<br>    console_log('info', 'USER ' + fromUri + " " + regType);<br>    if (regType == "Register") {<br>        rc = apiExecute("fifo_member", addFifo);<br>    } else if (regType == "Unregister") {<br>        rc = apiExecute("fifo_member", delFifo);<br>    }<br>    console_log(regType + " " + fromUri + " (User Agent: " + event.getHeader("user-agent") + ")");<br>    rc = apiExecute("fifo", "count callqueue@" + fromHost);<br>    console_log("FIFO status: " + rc);<br>}<br></font><br><div>This is based on a JS hook, but it will work with Lua, too.</div><div><br></div><div>My script does a login / logout for FIFO member if a user between 1001 and 1008 does a SIP login or logout. </div><div>You have to adapt the commands for mod_callcenter.</div><div><br></div><div>hth</div></div></div><div style="word-wrap:break-word;line-break:after-white-space"><div><div>Henning</div><div><br></div><div><br></div><div><br></div><div><br><blockquote type="cite"><div>Am 03.02.2021 um 12:29 schrieb Nathan Stratton <<a href="mailto:nathan@robotics.net" target="_blank">nathan@robotics.net</a>>:</div><br><div><div dir="ltr">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"><div><div dir="ltr" data-smartmail="gmail_signature"><div dir="ltr"><div><br>><><br>nathan stratton</div></div></div></div></div>
_________________________________________________________________________<br><br>The FreeSWITCH project is sponsored by SignalWire <a href="https://signalwire.com" target="_blank">https://signalwire.com</a><br>Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.<br>Build your next product on our scalable cloud platform.<br><br>Join our online community to chat in real time <a href="https://signalwire.community" target="_blank">https://signalwire.community</a><br><br>Professional FreeSWITCH Services<br><a href="mailto:sales@freeswitch.com" target="_blank">sales@freeswitch.com</a><br><a href="https://freeswitch.com" target="_blank">https://freeswitch.com</a><br><br>Official FreeSWITCH Sites<br><a href="https://freeswitch.com/oss" target="_blank">https://freeswitch.com/oss</a><br><a href="https://freeswitch.org/confluence" target="_blank">https://freeswitch.org/confluence</a><br><a href="https://cluecon.com" target="_blank">https://cluecon.com</a><br><br>FreeSWITCH-users mailing list<br><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br><a href="https://freeswitch.com" target="_blank">https://freeswitch.com</a></div></blockquote></div><br></div></div>_________________________________________________________________________<br>
<br>
The FreeSWITCH project is sponsored by SignalWire <a href="https://signalwire.com" rel="noreferrer" target="_blank">https://signalwire.com</a><br>
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.<br>
Build your next product on our scalable cloud platform.<br>
<br>
Join our online community to chat in real time <a href="https://signalwire.community" rel="noreferrer" target="_blank">https://signalwire.community</a><br>
<br>
Professional FreeSWITCH Services<br>
<a href="mailto:sales@freeswitch.com" target="_blank">sales@freeswitch.com</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="https://freeswitch.com/oss" rel="noreferrer" target="_blank">https://freeswitch.com/oss</a><br>
<a href="https://freeswitch.org/confluence" rel="noreferrer" target="_blank">https://freeswitch.org/confluence</a><br>
<a href="https://cluecon.com" rel="noreferrer" target="_blank">https://cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a></blockquote></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Regards,</div><div><br></div>David Villasmil<div>email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a></div><div>phone: +34669448337</div></div></div>