Ändern Sie Ihren Nebenstellenstatus ganz einfach durch Wählen eines Wählcodes.

Mit diesem Satz von Skripten können Nutzer ihren eigenen Nebenstellenstatus (Verfügbar, Abwesend, Außer Haus, Benutzerdefiniert 1 oder Benutzerdefiniert 2) ändern, indem sie einen benutzerdefinierten Code wählen. Mit diesem Skript können Nutzer ihre Verfügbarkeit schnell aktualisieren, ohne durch die 3CX-Schnittstelle navigieren zu müssen.

Das System enthält auch vorgefertigte Wählcodes zum Ändern von Profilstatus, die anstelle benutzerdefinierter Codes verwendet werden können. Dieses Skript demonstriert die Flexibilität von Anrufverarbeitungsskripten und kann für zusätzliche Funktionen geändert werden.

So richten Sie das Skript für Nebenstellenstatusänderungen ein

  • Gehen Sie zu Admin-Konsole > Integrationen > Anrufskripte.
  • Fügen Sie sie aus dem Store hinzu und wählen Sie „Status „Verfügbar“ für Nebenstelle festlegen“.
  • Vergeben Sie einen Namen zur einfachen Identifizierung – zum Beispiel „Verfügbar“.
  • Führen Sie dieses Skript aus, wenn ein Benutzer einen Vorwahlcode wählt.
  • Fügen Sie einen Vorwahlcode Ihrer Wahl hinzu – zum Beispiel 57.
  • Wählen Sie „Systemweit“.

So richten Sie Skripte für andere Status ein

  1. Befolgen Sie die gleichen Schritte wie oben.
  2. Verwenden Sie in Schritt 3 einen eindeutigen Namen für jedes Skript, z. B. „setaway“.
  3. Vergeben Sie in Schritt 5 für jedes Skript einen eindeutigen Vorwahlcode, z. B. 58 für Abwesenheitsnotizen, 59 für Benutzerdefiniert 1.

Warum dieses Skript verwenden?

  1. Schnelle Statusaktualisierungen: Ändern Sie Ihre Verfügbarkeit, ohne auf den Webclient oder die mobile App zuzugreifen.
  2. Anpassbare Optionen: Passen Sie die Codes und Status Ihren Anforderungen an.
  3. Flexibel und skalierbar: Erweitern Sie die Funktionalität nach Bedarf mit zusätzlichen Skripten.

Beispielskript

HAFTUNGSAUSSCHLUSS! Dieses Skript dient nur zu Referenzzwecken. Die neueste Version können Sie im Store herunterladen.

Skript: Verfügbar

using System;
using System.Threading.Tasks;
using TCX.Configuration;
using CallFlow;
using System.Linq;
using System.Collections.Generic;
namespace dummy
{
public class SetAvailableStatus : ScriptBase
{
public override async Task StartAsync()
{
var profileName = "Available";
var prompt = "ST_AVAILABLE_SET";


//-----call is direct from the extension and profile extension has required profile
if (MyCall.Caller.DN is Extension ext
&& MyCall.ReferredByDN is not DN
&& ext.FwdProfiles.FirstOrDefault(x=>x.Name.Equals(profileName)) is FwdProfile fwdProfile)
{
//set current status
ext.CurrentProfile = fwdProfile;

//reset profile override
ext.ResetCurrentProfileOverride();
ext.Save();

//----play system prompt about current status
try
{
MyCall.Info($"Extension {ext.Number} is set to {profileName}");
await MyCall.AssureMedia()
.ContinueWith(_ => MyCall.PlayPrompt(ext.GetPropertyValue("PROMPTSETID"), [prompt], PlayPromptOptions.Blocked))
.Unwrap();
}
catch
{
//ignore prompt playback failures. action is performed
}
//we made modifications
return true;
}
//we did not make any modifications
return false;
}
}
}

Skript: Abwesend

using System;
using System.Threading.Tasks;
using TCX.Configuration;
using CallFlow;
using System.Linq;
using System.Collections.Generic;
namespace dummy
{
public class SetAwayStatus : ScriptBase
{
public override async Task StartAsync()
{
var profileName = "Away";
var prompt = "ST_AWAY_SET";


//-----call is direct from the extension and profile extension has required profile
if (MyCall.Caller.DN is Extension ext
&& MyCall.ReferredByDN is not DN
&& ext.FwdProfiles.FirstOrDefault(x=>x.Name.Equals(profileName)) is FwdProfile fwdProfile)
{
//set current status
ext.CurrentProfile = fwdProfile;

//reset profile override
ext.ResetCurrentProfileOverride();
ext.Save();

//----play system prompt about current status
try
{
MyCall.Info($"Extension {ext.Number} is set to {profileName}");
await MyCall.AssureMedia()
.ContinueWith(_ => MyCall.PlayPrompt(ext.GetPropertyValue("PROMPTSETID"), [prompt], PlayPromptOptions.Blocked))
.Unwrap();
}
catch
{
//ignore prompt playback failures. action is performed
}
//we made modifications
return true;
}
//we did not make any modifications
return false;
}
}
}

Skript: Ausser Haus

using System;
using System.Threading.Tasks;
using TCX.Configuration;
using CallFlow;
using System.Linq;
using System.Collections.Generic;
namespace dummy
{
public class SetDNDStatus : ScriptBase
{
public override async Task StartAsync()
{
var profileName = "Out of office";
var prompt = "ST_OUTOFFICE_SET";


//-----call is direct from the extension and profile extension has required profile
if (MyCall.Caller.DN is Extension ext
&& MyCall.ReferredByDN is not DN
&& ext.FwdProfiles.FirstOrDefault(x=>x.Name.Equals(profileName)) is FwdProfile fwdProfile)
{
//set current status
ext.CurrentProfile = fwdProfile;

//reset profile override
ext.ResetCurrentProfileOverride();
ext.Save();

//----play system prompt about current status
try
{
MyCall.Info($"Extension {ext.Number} is set to {profileName}");
await MyCall.AssureMedia()
.ContinueWith(_ => MyCall.PlayPrompt(ext.GetPropertyValue("PROMPTSETID"), [prompt], PlayPromptOptions.Blocked))
.Unwrap();
}
catch
{
//ignore prompt playback failures. action is performed
}
//we made modifications
return true;
}
//we did not make any modifications
return false;
}
}
}

Skript: Benutzerdefiniert 1

using System;
using System.Threading.Tasks;
using TCX.Configuration;
using CallFlow;
using System.Linq;
using System.Collections.Generic;
namespace dummy
{
public class SetCustom1Status : ScriptBase
{
public override async Task StartAsync()
{
var profileName = "Custom 1";
var prompt = "ST_CUSTOM1_SET";


//-----call is direct from the extension and profile extension has required profile
if (MyCall.Caller.DN is Extension ext
&& MyCall.ReferredByDN is not DN
&& ext.FwdProfiles.FirstOrDefault(x=>x.Name.Equals(profileName)) is FwdProfile fwdProfile)
{
//set current status
ext.CurrentProfile = fwdProfile;

//reset profile override
ext.ResetCurrentProfileOverride();
ext.Save();

//----play system prompt about current status
try
{
MyCall.Info($"Extension {ext.Number} is set to {profileName}");
await MyCall.AssureMedia()
.ContinueWith(_ => MyCall.PlayPrompt(ext.GetPropertyValue("PROMPTSETID"), [prompt], PlayPromptOptions.Blocked))
.Unwrap();
}
catch
{
//ignore prompt playback failures. action is performed
}
//we made modifications
return true;
}
//we did not make any modifications
return false;
}
}
}

Skript: Benutzerdefiniert 2

using System;
using System.Threading.Tasks;
using TCX.Configuration;
using CallFlow;
using System.Linq;
using System.Collections.Generic;
namespace dummy
{
public class SetCustom2Status : ScriptBase
{
public override async Task StartAsync()
{
var profileName = "Custom 2";
var prompt = "ST_CUSTOM2_SET";


//-----call is direct from the extension and profile extension has required profile
if (MyCall.Caller.DN is Extension ext
&& MyCall.ReferredByDN is not DN
&& ext.FwdProfiles.FirstOrDefault(x=>x.Name.Equals(profileName)) is FwdProfile fwdProfile)
{
//set current status
ext.CurrentProfile = fwdProfile;

//reset profile override
ext.ResetCurrentProfileOverride();
ext.Save();

//----play system prompt about current status
try
{
MyCall.Info($"Extension {ext.Number} is set to {profileName}");
await MyCall.AssureMedia()
.ContinueWith(_ => MyCall.PlayPrompt(ext.GetPropertyValue("PROMPTSETID"), [prompt], PlayPromptOptions.Blocked))
.Unwrap();
}
catch
{
//ignore prompt playback failures. action is performed
}
//we made modifications
return true;
}
//we did not make any modifications
return false;
}
}
}