From 88cb7cd7bc0c0d464317b04d35283180f306d587 Mon Sep 17 00:00:00 2001 From: paulc Date: Thu, 24 Jun 2010 14:02:48 +0000 Subject: [PATCH] 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 --- modules/server/pbxassist.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/server/pbxassist.cpp b/modules/server/pbxassist.cpp index 4879152e..f86c0d0f 100644 --- a/modules/server/pbxassist.cpp +++ b/modules/server/pbxassist.cpp @@ -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));