diff --git a/conf.d/pbxassist.conf.sample b/conf.d/pbxassist.conf.sample index 51927200..bd2a580d 100644 --- a/conf.d/pbxassist.conf.sample +++ b/conf.d/pbxassist.conf.sample @@ -48,6 +48,13 @@ ; Defaults to yes ;dropconfhangup=yes +; lonelytimeout: integer: The interval (in milliseconds) a lonely user is allowed to +; remain in conference +; This parameter can be overridden from routing by a 'pbxlonelytimeout' parameter +; This parameter is applied on reload +; Defaults to 0 (stay until hangup) +;lonelytimeout=0 + ; Every other section defines an operation to trigger ;[operation] diff --git a/modules/server/pbxassist.cpp b/modules/server/pbxassist.cpp index d42a3057..3e8f2387 100644 --- a/modules/server/pbxassist.cpp +++ b/modules/server/pbxassist.cpp @@ -153,6 +153,9 @@ static String s_lang; // Drop conference on hangup static bool s_dropConfHangup = true; +// Conference lonely timeout +static int s_lonely = 0; + // on-hangup transfer list static ObjList s_transList; static Mutex s_transMutex(false,"PBXAssist::transfer"); @@ -252,6 +255,7 @@ void PBXList::initialize() s_error = s_cfg.getValue("general","error","tone/outoforder"); s_lang = s_cfg.getValue("general","lang"); s_dropConfHangup = s_cfg.getBoolValue("general","dropconfhangup",true); + s_lonely = s_cfg.getIntValue("general","lonelytimeout"); unlock(); if (s_cfg.getBoolValue("general","enabled",false)) ChanAssistList::initialize(); @@ -810,7 +814,7 @@ bool PBXAssist::operConference(Message& msg) Message m("call.conference"); m.addParam("id",id()); m.userData(c); - m.addParam("lonely","yes"); + m.addParam("lonely",m_keep.getValue("pbxlonelytimeout",String(s_lonely))); if (room) m.addParam("room",room); m.addParam("pbxstate",state());