Use the "direction" parameter with fallback to "status" to decide if guest mode is to be used.

Patch by Allan Sandfeld Jensen.


git-svn-id: http://voip.null.ro/svn/yate@3399 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2010-06-24 14:02:48 +00:00
parent 0d4a37642b
commit 88cb7cd7bc
1 changed files with 4 additions and 2 deletions

View File

@ -175,8 +175,10 @@ ChanAssist* PBXList::create(Message& msg, const String& id)
DDebug(this,DebugCall,"Creating assistant for '%s'",id.c_str());
bool guest = false;
if (!s_incoming) {
const NamedString* status = msg.getParam("status");
if (status && (*status == "incoming"))
const NamedString* dir = msg.getParam("direction");
if (TelEngine::null(dir))
dir = msg.getParam("status");
if (dir && (*dir == "incoming"))
guest = true;
}
return new PBXAssist(this,id,msg.getBoolValue("dtmfpass",s_pass),msg.getBoolValue("pbxguest",guest));