Optionally drop the conference room when assisted channel is hungup (defaults to yes).

git-svn-id: http://voip.null.ro/svn/yate@4041 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
marian 2011-01-19 16:13:39 +00:00
parent f19ce19840
commit bfaed13943
2 changed files with 12 additions and 1 deletions

View File

@ -42,6 +42,12 @@
; This parameter can be overridden from routing by a 'pbxlang' parameter
;lang=
; dropconfhangup: bool: Drop (terminate) the conference room on hangup if the call is in one
; This parameter can be overridden from routing by a 'pbxdropconfhangup' parameter
; This parameter is applied on reload
; Defaults to yes
;dropconfhangup=yes
; Every other section defines an operation to trigger
;[operation]

View File

@ -136,6 +136,9 @@ static String s_error;
// Language parameter for tones played by the pbx
static String s_lang;
// Drop conference on hangup
static bool s_dropConfHangup = true;
// on-hangup transfer list
static ObjList s_transList;
static Mutex s_transMutex(false,"PBXAssist::transfer");
@ -233,6 +236,7 @@ void PBXList::initialize()
s_onhold = s_cfg.getValue("general","onhold","moh/default");
s_error = s_cfg.getValue("general","error","tone/outoforder");
s_lang = s_cfg.getValue("general","lang");
s_dropConfHangup = s_cfg.getBoolValue("general","dropconfhangup",true);
unlock();
if (s_cfg.getBoolValue("general","enabled",false))
ChanAssistList::initialize();
@ -1050,7 +1054,8 @@ void PBXAssist::msgHangup(Message& msg)
l = l->skipNext();
}
s_transMutex.unlock();
if (m_room && (state() == "conference")) {
if (m_room && (state() == "conference") &&
m_keep.getBoolValue("pbxdropconfhangup",s_dropConfHangup)) {
// hangup the conference if we didn't switch out of it
Message* m = new Message("call.drop");
m->addParam("id",m_room);