Wijzig eenvoudig de status van je extensie door een kiescode in te voeren.

Met deze scripts kunnen gebruikers hun status – Beschikbaar, Afwezig, Niet op kantoor, Aangepast 1 of Aangepast 2 – wijzigen door een eigen code te kiezen. Dit biedt een snelle manier om je beschikbaarheid te updaten zonder navigeren in de 3CX-interface.

Het systeem bevat ook vooraf ingestelde dialcodes om de profielstatus te wijzigen, die als alternatief voor eigen codes gebruikt kunnen worden. Deze scripts tonen de flexibiliteit van Call Processing Scripts en kunnen worden aangepast voor extra functionaliteiten.

Hoe stel je het script in voor het wijzigen van status

  1. Ga naar Admin Console > Integrations > Call Scripts.
  2. Voeg toe vanuit de store en selecteer Set Extension Available Status.
  3. Wijs een naam toe, bijvoorbeeld: ‘Beschikbaar’.
  4. Voer dit script uit wanneer een gebruiker een dialcode intoetst.
  5. Kies een dialcode, bijvoorbeeld: 57.
  6. Selecteer System Wide.

Hoe stel je scripts in voor andere statussen

  1. Volg dezelfde stappen als hierboven.
  2. Gebruik bij stap 3 een unieke naam voor elk script, bijvoorbeeld: ‘Afwezig instellen’.
  3. Kies bij stap 5 een unieke dialcode, bijvoorbeeld: 58 voor Niet op kantoor, 59 voor Aangepast 1, enzovoort.

Waarom dit script gebruiken?

  • Snelle statusupdates: Pas je beschikbaarheid aan zonder de Web Client of mobiele app te openen.
  • Aan te passen aan voorkeur: Stem codes en statussen af op je specifieke behoeften.
  • Flexibel en schaalbaar: Breid functionaliteit uit met extra scripts indien nodig.

Voorbeeld van Script

DISCLAIMER! Dit script is alleen ter referentie. Download de laatste versie vanuit de store.

Script: Beschikbaar


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;
}
}
}

Script: Away


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;
}
}
}

Script: Out of office


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;
}
}
}

Script: Custom 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;
}
}
}

Script: Custom 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;
}
}
}