<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Thanks Adridan this worked great! My only issue was I needed the agent but it’s not available for custom, so I used contact which has the IP address of the push server when needed. Thanks also to David but I don’t know anything about ESL and the wiki was of little help. I know already had a LUA script.<div class=""><br class=""></div><div class="">I don’t know what the last “if” block does, I don’t think it applies to me, not much on the wiki, it seems to work fine with it commented out.<br class=""><div class=""><br class=""></div><div class=""><div class="">local username  = event:getHeader("username");</div><div class="">local from_user = event:getHeader("from-user");</div><div class="">--local agent     = event:getHeader("variable_sip_user_agent");</div><div class="">local contact = event:getHeader("contact");</div><div class="">freeswitch.consoleLog("INFO","LUA logout_callcenter.lua username: " .. (username or "") .." from-user: " .. (from_user or "") .."\n");</div><div class="">freeswitch.consoleLog("INFO"," contact: " .. (contact or "") .."\n");</div><div class="">--freeswitch.consoleLog("INFO","agent: " .. (agent or "") .."\n");</div><div class=""><br class=""></div><div class="">--if (username ~= nil) then</div><div class="">--    api = freeswitch.API();</div><div class="">--    result = api:execute("callcenter_config", "agent set status "..username.." 'Logged Out'");</div><div class="">--    freeswitch.consoleLog("INFO", "Execute on unregister: ".. result .. "\n")</div><div class="">--end</div><div><br class=""><blockquote type="cite" class=""><div class="">On Mar 12, 2019, at 4:30 PM, David Villasmil <<a href="mailto:david.villasmil.work@gmail.com" class="">david.villasmil.work@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hello,<div class=""><br class=""></div><div class="">You can use ESL to log that, just connect to localhost:8021 and log everything you see coming in:</div><div class=""><br class=""></div><div class="">checkout <a href="https://freeswitch.org/confluence/display/FREESWITCH/Python+ESL" class="">https://freeswitch.org/confluence/display/FREESWITCH/Python+ESL</a></div><div class="">and just log.</div><div class=""><br class=""></div><div class="">hope this helps.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br clear="all" class=""><div 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></div><br class=""></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 12, 2019 at 10:21 PM mario_fs <<a href="mailto:mario_fs@mgtech.com" class="">mario_fs@mgtech.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;" class="">Thanks! I know enough LUA to already have a LUA script in FreeSwitch so will give this a try. This should drastically help with debugging Bria PUSH staying registered issues! I found sofia::unregister on the wiki and check the lua.conf.xml file. Thanks a LOT!<div class="">Mario G<br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Mar 12, 2019, at 11:46 AM, Adridan Tudor <<a href="mailto:tudor.gabriell@gmail.com" target="_blank" class="">tudor.gabriell@gmail.com</a>> wrote:</div><br class="gmail-m_-2843184031320206500Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class="">You can use an event hook from mod_lua to execute a lua script on unregister event. <br class=""></div><div dir="ltr" class="">Add "<hook event="custom" subclass="sofia::unregister" script="logout_callcenter.lua" />" in lua.conf.xml</div><div dir="ltr" class=""><br class=""></div><div class="">In the script you can do whatever you want, for example logout from callcenter.<br class=""></div>>>freeswitch.consoleLog("INFO","Executing logout_callcenter.lua\n");<br class="">>>local username = event:getHeader("username");<br class="">>>local from_user = event:getHeader("from-user");<br class="">>>freeswitch.consoleLog("INFO","username: " .. (username or "") .."\n");<br class="">>>freeswitch.consoleLog("INFO","from-user: " .. (from_user or "") .."\n");<br class="">>><br class="">>>if (username ~= nil) then<br class="">>>    api = freeswitch.API();<br class="">>>    result = api:execute("callcenter_config", "agent set status "..username.." 'Logged Out'");<br class="">>>    freeswitch.consoleLog("INFO", "Execute on unregister: ".. result .. "\n")<br class="">>>end</div></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 12, 2019 at 8:26 PM mario_fs <<a href="mailto:mario_fs@mgtech.com" target="_blank" class="">mario_fs@mgtech.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="">Still no luck on this and I really need to know date/time when a particular extension is unregistering. Anyone else have an idea that does not involve programming? Thanks,<div class="">Mario G<br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Feb 20, 2019, at 9:16 AM, mario_fs <<a href="mailto:mario_fs@mgtech.com" target="_blank" class="">mario_fs@mgtech.com</a>> wrote:</div><br class="gmail-m_-2843184031320206500gmail-m_2857438639847486835Apple-interchange-newline"><div class=""><div class="">I have been searching the wiki and web and still nothing simple to log de-registrations. I find it hard to believe there is not a simple way to do this, anyone have a good idea?<div class="">Mario G<br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Feb 15, 2019, at 9:46 AM, mario_fs <<a href="mailto:mario_fs@mgtech.com" target="_blank" class="">mario_fs@mgtech.com</a>> wrote:</div><br class="gmail-m_-2843184031320206500gmail-m_2857438639847486835Apple-interchange-newline"><div class=""><div class="">Hmmmm…. Logging de-registrations would be a useful enhancement to FreeSwitch for debugging issues like this. I know a SIP trace does it but that’s a LOT of data when we're talking days. Thanks.<div class="">Mario G<br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Feb 15, 2019, at 12:05 AM, Avi Marcus <<a href="mailto:avi@avimarcus.net" target="_blank" class="">avi@avimarcus.net</a>> wrote:</div><br class="gmail-m_-2843184031320206500gmail-m_2857438639847486835Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class="">Here's some old nodejs code relying on `esl` lib to monitor for de-registrations and send me an email. I haven't used it in ages.<div class=""><br class=""></div><div class=""><a href="https://gist.github.com/avimar/9645dd3134476d458e68cca077f4ed16" target="_blank" class="">https://gist.github.com/avimar/9645dd3134476d458e68cca077f4ed16</a></div><div class=""><br class=""></div><div class=""><br clear="all" class=""><div class=""><div dir="ltr" class="gmail-m_-2843184031320206500gmail-m_2857438639847486835m_-6791474544660118792gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class="">-Avi Marcus<br class="">BestFone</div></div></div></div></div><br class=""></div></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 15, 2019 at 12:13 AM mario_fs <<a href="mailto:mario_fs@mgtech.com" target="_blank" class="">mario_fs@mgtech.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="">Does anyone know if there is something I can do to log device registrations, and more importantly when devices lose registration, <i class="">without having a ton of other log data</i>. I know I can turn on a higher level of diagnostics, but it may be several days before I find what I need and don’t want to flood the log.<div class=""><br class=""></div><div class="">I am working with Counterpath on Bria Push service and need to find when their push server stops registering. Since they don’t send a notification for that and it’s not in the normal FS log, I may not know for days when this happens. It would be nice to be able to scan the log for lost registrations. Thanks!</div><div class="">Mario G</div></div>_________________________________________________________________________<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>
_________________________________________________________________________<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="">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="">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="">
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>
_________________________________________________________________________<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="">
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>
_________________________________________________________________________<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></div></div></body></html>