Skill Based Routing - Fehler im Skript

Hallo,

wir setzen bei uns SBR ein, leider arbeitet das Skript nicht so wie unser Verständnis vom SBR ist.

Wenn man SBR in einer Warteschlange aktiviert wird ja das Skript “Skill based routing” für die Reihenfolge der Agenten verwendet.

Hier ist aber in der Funktion calc_metric der berechnete Rückgabewert auskommentiert, stattdessen wird 0 zurück gegeben.
Dies funktioniert nun auch, allerdings nur, wenn man zwei Agenten mit zwei verschiedenen Skills in einer WS hat.
Wir möchten nun mehrere Agenten mit dem gleichen Skill in einer WS haben. Diese sollen dann unterschiedlich hoch geskillt sein. Dafür haben wir die return-Zeile wieder mit rein genommen (return 10000 - score)

Funktioniert nun eigentlich auch, bis auf den Fall wenn zwei Agenten den gleichen Skill haben. Dann bekommt immer der gleiche Agent den Anruf, die anderen werden erst berücksichtigt wenn der erste Agent im Gespräch ist.

Da der Support auch nicht weiter helfen konnte ist meine Hoffnung, dass es jemanden gibt, der SBR bei sich erfolgreich im Einsatz hat.

Zur Anlage: Wir setzen zur Zeit noch die 7.13.05 ein, in den Release Notes habe ich aber nichts zu SBR finden können.

Viele Grüße
Arne

Hallo @alipfert,

es sollte eigentlich so sein: Haben zwei Agenten den gleichen Skill werden beide ausgewählt. Die Rufstrategie entscheidet dann welcher der beiden dran kommt. Steht Deine Rufstrategie auf “nacheinander” kommt immer er Selbe dran. Probiere es doch mal mit “Zufällig”. Oder verstehe ich Dich falsch.

LG
Mathias

Hallo @Mathias,

ich glaube du verstehst mich richtig. Ich habe es nun umgestellt und wir konnten es endlich testen.
4 Agenten sind angemeldet, alle haben den gleichen Skill Level.
Wir haben 4 Anrufe gemacht, alle landen beim gleichen Agenten, insofern scheint es nichts gebracht zu haben.

Hast du noch eine andere Idee bzw. kann ich das irgendwie debuggen?

Gruß
Arne

Hello @alipfert

Did you try to change “call strategy” in the queue configuration? Maybe you can try “random” call strategy to see if it improves situation for you.

Kind regards,
Stefan

@Stefan

Thanks for your reply but it is the same idea Mathias already had. Without success.
I tried it with different call strategy, but none is working.

Any ideas?

Cheers
Arne

Hallo

Wir haben genau das gleiche Problem. Gibt es hierzu schon einen Lösungsvorschlag? Die Rufstrategie funktioniert in dieser Kombination nicht. Alle Calls landen zuerst immer beim selben Agent, egal was eingestellt wurde (zufällig, nacheinander etc.).

Gruss
Sven

Hallo Sven,

bei uns hat sich leider nichts ergeben, auch Pascom selber konnte uns nicht helfen.
Wir sind inzwischen wieder davon ab, da es so nicht tragbar war und die Abteilungen sehr frustriert waren.

Solltet ihr eine Lösung finden würde ich mich freuen wenn du die mitteilst, vielleicht kann man es ja dann doch nochmal umsetzen.

Viele Grüße
Arne

Hallo Arne / Hallo Pascom

Danke für die schnelle Antwort. Eine Zuweisung nach “längste zurück” muss zwingend möglich sein. Es kann nicht sein,
dass in erster Linie immer der gleiche Mitarbeiter alle Calls zugestellt bekommt. Kein Callcenter Standard. Gibt es hierzu noch ein Feedback seitens Pascom ?@Mathias

Lg Sven

Hallo zusammen,

habe das nochmals getestet:
sbr_and_random

klappt. Natürlich kann random auch ein paar mal “random” der Selbe sein. Wenn man sicher gehen will kann man auch mem-nacheinander nutzen.

Generell ist es so: Erst werden alle Agenten mit den passenden Skills genommen. Auf diese Gruppe wird dann die Rufstrategie angewendet.

“Längste Zurück” sollte auch klappen. Ist aber in der Praxis mist, da die Zähler beim Anmelden/Abmelden aus dem Team resettet werden.

LG
Mathias

Hallo Mathias

Egal welche Rufstrategie wir wählen, der Call landet immer beim gleichen Agent. Die Agents haben den selben Skilllevel ;). Wir arbeiten bei unserer IVR mit verschiedenen Labels, welche dann alle in das selbe Team abgeworfen werden. Sprich ca. 20 Labels und ein Team. Kann es sein, dass das skillbased routing deshalb nicht funktioniert? Gibt es hierzu eine Lösung?

Lg Sven

Hallo @Sven,

wie in meinen Screencast zu sehen ist haben meine Agenten alle auch den selben Level für “German” nämlich “1”. Daran kann es also nicht liegen. Die Anzahl der Skills ist auch egal.

Bist du dir sicher, dass auch mehrere agenten vom SBR ausgewählt werden? Wenn Du als Strategie “alle anklingeln” verwendest klingelt das Telefon dann auch bei mehreren Agenten. Wenn nicht werden auch nicht mehr als einer ausgewählt.

Btw. welche pascom Version nutzt Du?

LG
Mathias

Hallo Mathias

Danke für die prompte Antwort.

Die Strategie “alle anklingeln” funktioniert einwandfrei, es läutet bei allen Agents mit dem gleichen Level. Sobald wir jedoch auf zufällig, mem nacheinander oder irgendeine andere Rufstrategie wechseln, klingelt es immer beim gleichen Agent. Wir verwenden die Version: 17.06.R.

LG Sven

Hi Sven,

Do you use the default skill based routing script or you’ve modified it? If it’s not the default one, please copy the content of the script.

You can log the sum of the skill values in SBR script. Please add the following line on the place where you return the score

ast_verbose(“Agent " … member.membername …” has score " … score)

Try one more time and provide us the CLI output. Also queue_log for this call would be interesting.

Kind regards,
Stefan

Hi Stefan

The routing skript was changed by you guys. So it is not the default one. In which line do I have to insert the text.
Where can I get the CLI?

Sven,
I think you have to insert this line after line 59. This is what we also did. The Calculation is ok as you can see in the asterisk cli (use putty to connect via ssh to your pascom server and type ‘asterisk -r’ as root)

But it has no effect on the decision which user will be taken.

Hope it helps you a bit

Cheers Arne

Hi,

Yes, Arne is right, you can insert the code snippet after the line 59. Two agents should have exactly the same score otherwise the one with the higher score will be chosen always.

Example 1:
AgentA has skills English=50 and Support=50
AgentB has skills English=60 and Support=60
If the caller requires English and Support the AgentB will handle all calls when it’s available because his score is better then AgentA’s

Example 2:
AgentA has skills English=50 and Support=50
AgentB has skills English=40 and Support=60
If the caller requires English and Support in this case the chosen asterisk queue strategy will be used

Let’s wait for CLI and queue log output and we will see what’s going on.

Kind regards,
Stefan

Stefan,

I made a test with our PBX with one skb-queue with three members.
Member 771 has skill 80
Member 776 has skill 100
Member 777 has skill 100

I made ten calls, each one was routed to 776 because of highest skill and lowest number (as I guess)
Extension 777 never gets a call even allthough it has the same skill.
I made three calls more but set 776 to skill 80 and now all three calls go to 777. But if I set extension 771 to skill level 100 all calls would be routed to this member. Here is the cli output (sorry for the length):

[Apr 20 14:59:37] VERBOSE[11702][C-00011b17] app_queue.c: — **** Enter queue
[Apr 20 14:59:37] VERBOSE[11702][C-00011b17] app_queue.c: — Found skill 23
[Apr 20 14:59:37] VERBOSE[11702][C-00011b17] res_musiconhold.c: – Started music on hold, class ‘default’, on SIP/mdc_trunk_conf-8-00025993
[Apr 20 14:59:37] VERBOSE[11702][C-00011b17] app_queue.c: — Agent Local/777@mdc_multidial-777 has score 100
[Apr 20 14:59:37] VERBOSE[11702][C-00011b17] app_queue.c: — Agent Local/776@mdc_multidial-776 has score 100
[Apr 20 14:59:37] VERBOSE[11702][C-00011b17] app_queue.c: — Agent Local/771@mdc_multidial-771 has score 80
[Apr 20 14:59:37] VERBOSE[11702][C-00011b17] app_queue.c: – Called Local/776@mdc_multidial-776

[Apr 20 14:59:49] VERBOSE[11773][C-00011b18] app_queue.c: — **** Enter queue
[Apr 20 14:59:49] VERBOSE[11773][C-00011b18] app_queue.c: — Found skill 23
[Apr 20 14:59:49] VERBOSE[11773][C-00011b18] res_musiconhold.c: – Started music on hold, class ‘default’, on SIP/mdc_trunk_conf-8-00025995
[Apr 20 14:59:49] VERBOSE[11773][C-00011b18] app_queue.c: — Agent Local/777@mdc_multidial-777 has score 100
[Apr 20 14:59:49] VERBOSE[11773][C-00011b18] app_queue.c: — Agent Local/776@mdc_multidial-776 has score 100
[Apr 20 14:59:49] VERBOSE[11773][C-00011b18] app_queue.c: — Agent Local/771@mdc_multidial-771 has score 80
[Apr 20 14:59:49] VERBOSE[11773][C-00011b18] app_queue.c: – Called Local/776@mdc_multidial-776

[Apr 20 15:00:00] VERBOSE[11841][C-00011b19] app_queue.c: — **** Enter queue
[Apr 20 15:00:00] VERBOSE[11841][C-00011b19] app_queue.c: — Found skill 23
[Apr 20 15:00:00] VERBOSE[11841][C-00011b19] res_musiconhold.c: – Started music on hold, class ‘default’, on SIP/mdc_trunk_conf-8-00025997
[Apr 20 15:00:00] VERBOSE[11841][C-00011b19] app_queue.c: — Agent Local/777@mdc_multidial-777 has score 100
[Apr 20 15:00:00] VERBOSE[11841][C-00011b19] app_queue.c: — Agent Local/776@mdc_multidial-776 has score 100
[Apr 20 15:00:00] VERBOSE[11841][C-00011b19] app_queue.c: — Agent Local/771@mdc_multidial-771 has score 80
[Apr 20 15:00:00] VERBOSE[11841][C-00011b19] app_queue.c: – Called Local/776@mdc_multidial-776

[Apr 20 15:00:15] VERBOSE[12020][C-00011b1a] app_queue.c: — **** Enter queue
[Apr 20 15:00:15] VERBOSE[12020][C-00011b1a] app_queue.c: — Found skill 23
[Apr 20 14:58:25] VERBOSE[11156][C-00011b14] app_queue.c: — **** Enter queue
[Apr 20 14:58:25] VERBOSE[11156][C-00011b14] app_queue.c: — Found skill 23
[Apr 20 14:58:25] VERBOSE[11156][C-00011b14] res_musiconhold.c: – Started music on hold, class ‘default’, on SIP/mdc_trunk_conf-8-0002598a
[Apr 20 14:58:25] VERBOSE[11156][C-00011b14] app_queue.c: — Agent Local/777@mdc_multidial-777 has score 100
[Apr 20 14:58:25] VERBOSE[11156][C-00011b14] app_queue.c: — Agent Local/776@mdc_multidial-776 has score 100
[Apr 20 14:58:25] VERBOSE[11156][C-00011b14] app_queue.c: — Agent Local/771@mdc_multidial-771 has score 80
[Apr 20 14:58:25] VERBOSE[11156][C-00011b14] app_queue.c: – Called Local/776@mdc_multidial-776

[Apr 20 15:00:15] VERBOSE[12020][C-00011b1a] res_musiconhold.c: – Started music on hold, class ‘default’, on SIP/mdc_trunk_conf-8-00025999
[Apr 20 15:00:15] VERBOSE[12020][C-00011b1a] app_queue.c: — Agent Local/777@mdc_multidial-777 has score 100
[Apr 20 15:00:15] VERBOSE[12020][C-00011b1a] app_queue.c: — Agent Local/776@mdc_multidial-776 has score 100
[Apr 20 15:00:15] VERBOSE[12020][C-00011b1a] app_queue.c: — Agent Local/771@mdc_multidial-771 has score 80
[Apr 20 15:00:15] VERBOSE[12020][C-00011b1a] app_queue.c: – Called Local/776@mdc_multidial-776

[Apr 20 15:00:27] VERBOSE[12102][C-00011b1b] app_queue.c: — **** Enter queue
[Apr 20 15:00:27] VERBOSE[12102][C-00011b1b] app_queue.c: — Found skill 23
[Apr 20 15:00:27] VERBOSE[12102][C-00011b1b] res_musiconhold.c: – Started music on hold, class ‘default’, on SIP/mdc_trunk_conf-8-0002599b
[Apr 20 15:00:27] VERBOSE[12102][C-00011b1b] app_queue.c: — Agent Local/777@mdc_multidial-777 has score 100
[Apr 20 15:00:27] VERBOSE[12102][C-00011b1b] app_queue.c: — Agent Local/776@mdc_multidial-776 has score 100
[Apr 20 15:00:27] VERBOSE[12102][C-00011b1b] app_queue.c: — Agent Local/771@mdc_multidial-771 has score 80
[Apr 20 15:00:27] VERBOSE[12102][C-00011b1b] app_queue.c: – Called Local/776@mdc_multidial-776

[Apr 20 15:00:46] VERBOSE[12212][C-00011b1c] app_queue.c: — **** Enter queue
[Apr 20 15:00:46] VERBOSE[12212][C-00011b1c] app_queue.c: — Found skill 23
[Apr 20 15:00:46] VERBOSE[12212][C-00011b1c] res_musiconhold.c: – Started music on hold, class ‘default’, on SIP/mdc_trunk_conf-8-0002599d
[Apr 20 15:00:46] VERBOSE[12212][C-00011b1c] app_queue.c: — Agent Local/777@mdc_multidial-777 has score 100
[Apr 20 15:00:46] VERBOSE[12212][C-00011b1c] app_queue.c: — Agent Local/776@mdc_multidial-776 has score 100
[Apr 20 15:00:46] VERBOSE[12212][C-00011b1c] app_queue.c: — Agent Local/771@mdc_multidial-771 has score 80
[Apr 20 15:00:46] VERBOSE[12212][C-00011b1c] app_queue.c: – Called Local/776@mdc_multidial-776

[Apr 20 15:00:58] VERBOSE[12293][C-00011b1d] app_queue.c: — **** Enter queue
[Apr 20 15:00:58] VERBOSE[12293][C-00011b1d] app_queue.c: — Found skill 23
[Apr 20 15:00:58] VERBOSE[12293][C-00011b1d] res_musiconhold.c: – Started music on hold, class ‘default’, on SIP/mdc_trunk_conf-8-0002599f
[Apr 20 15:00:58] VERBOSE[12293][C-00011b1d] app_queue.c: — Agent Local/777@mdc_multidial-777 has score 100
[Apr 20 15:00:58] VERBOSE[12293][C-00011b1d] app_queue.c: — Agent Local/776@mdc_multidial-776 has score 100
[Apr 20 15:00:58] VERBOSE[12293][C-00011b1d] app_queue.c: — Agent Local/771@mdc_multidial-771 has score 80
[Apr 20 15:00:58] VERBOSE[12293][C-00011b1d] app_queue.c: – Called Local/776@mdc_multidial-776

[Apr 20 15:01:11] VERBOSE[12366][C-00011b1e] app_queue.c: — **** Enter queue
[Apr 20 15:01:11] VERBOSE[12366][C-00011b1e] app_queue.c: — Found skill 23
[Apr 20 15:01:11] VERBOSE[12366][C-00011b1e] res_musiconhold.c: – Started music on hold, class ‘default’, on SIP/mdc_trunk_conf-8-000259a1
[Apr 20 15:01:11] VERBOSE[12366][C-00011b1e] app_queue.c: — Agent Local/777@mdc_multidial-777 has score 100
[Apr 20 15:01:11] VERBOSE[12366][C-00011b1e] app_queue.c: — Agent Local/776@mdc_multidial-776 has score 100
[Apr 20 15:01:11] VERBOSE[12366][C-00011b1e] app_queue.c: — Agent Local/771@mdc_multidial-771 has score 80
[Apr 20 15:01:11] VERBOSE[12366][C-00011b1e] app_queue.c: – Called Local/776@mdc_multidial-776

[Apr 20 15:01:23] VERBOSE[12435][C-00011b1f] app_queue.c: — **** Enter queue
[Apr 20 15:01:23] VERBOSE[12435][C-00011b1f] app_queue.c: — Found skill 23
[Apr 20 15:01:23] VERBOSE[12435][C-00011b1f] res_musiconhold.c: – Started music on hold, class ‘default’, on SIP/mdc_trunk_conf-8-000259a3
[Apr 20 15:01:23] VERBOSE[12435][C-00011b1f] app_queue.c: — Agent Local/777@mdc_multidial-777 has score 100
[Apr 20 15:01:23] VERBOSE[12435][C-00011b1f] app_queue.c: — Agent Local/776@mdc_multidial-776 has score 100
[Apr 20 15:01:23] VERBOSE[12435][C-00011b1f] app_queue.c: — Agent Local/771@mdc_multidial-771 has score 80
[Apr 20 15:01:23] VERBOSE[12435][C-00011b1f] app_queue.c: – Called Local/776@mdc_multidial-776

[Apr 20 15:02:23] VERBOSE[12908][C-00011b20] app_queue.c: — **** Enter queue
[Apr 20 15:02:23] VERBOSE[12908][C-00011b20] app_queue.c: — Found skill 23
[Apr 20 15:02:23] VERBOSE[12908][C-00011b20] res_musiconhold.c: – Started music on hold, class ‘default’, on SIP/mdc_trunk_conf-8-000259a5
[Apr 20 15:02:23] VERBOSE[12908][C-00011b20] app_queue.c: — Agent Local/777@mdc_multidial-777 has score 100
[Apr 20 15:02:23] VERBOSE[12908][C-00011b20] app_queue.c: — Agent Local/776@mdc_multidial-776 has score 80
[Apr 20 15:02:23] VERBOSE[12908][C-00011b20] app_queue.c: — Agent Local/771@mdc_multidial-771 has score 80
[Apr 20 15:02:23] VERBOSE[12908][C-00011b20] app_queue.c: – Called Local/777@mdc_multidial-777

[Apr 20 15:02:37] VERBOSE[12994][C-00011b21] app_queue.c: — **** Enter queue
[Apr 20 15:02:37] VERBOSE[12994][C-00011b21] app_queue.c: — Found skill 23
[Apr 20 15:02:37] VERBOSE[12994][C-00011b21] res_musiconhold.c: – Started music on hold, class ‘default’, on SIP/mdc_trunk_conf-8-000259a8
[Apr 20 15:02:37] VERBOSE[12994][C-00011b21] app_queue.c: — Agent Local/777@mdc_multidial-777 has score 100
[Apr 20 15:02:37] VERBOSE[12994][C-00011b21] app_queue.c: — Agent Local/776@mdc_multidial-776 has score 80
[Apr 20 15:02:37] VERBOSE[12994][C-00011b21] app_queue.c: — Agent Local/771@mdc_multidial-771 has score 80
[Apr 20 15:02:37] VERBOSE[12994][C-00011b21] app_queue.c: – Called Local/777@mdc_multidial-777

[Apr 20 15:02:50] VERBOSE[13073][C-00011b22] app_queue.c: — **** Enter queue
[Apr 20 15:02:50] VERBOSE[13073][C-00011b22] app_queue.c: — Found skill 23
[Apr 20 15:02:50] VERBOSE[13073][C-00011b22] res_musiconhold.c: – Started music on hold, class ‘default’, on SIP/mdc_trunk_conf-8-000259ab
[Apr 20 15:02:50] VERBOSE[13073][C-00011b22] app_queue.c: — Agent Local/777@mdc_multidial-777 has score 100
[Apr 20 15:02:50] VERBOSE[13073][C-00011b22] app_queue.c: — Agent Local/776@mdc_multidial-776 has score 80
[Apr 20 15:02:50] VERBOSE[13073][C-00011b22] app_queue.c: — Agent Local/771@mdc_multidial-771 has score 80
[Apr 20 15:02:50] VERBOSE[13073][C-00011b22] app_queue.c: – Called Local/777@mdc_multidial-777

Hi,

ok, now I see the problem. Let’s try to use a different approach for your scenario.

  1. Create a new lua script (set_topic). Adjust the range of skills defined on your appliance
--[[

Add this as lua action before any internal and external call
to the main-inbound-queue.

--]]
local tt={}

for id=1,70 do
    local level = channel['MDC_SKILL-' .. id]:get()
    if level ~= nil and level ~= '' then
        table.insert(tt,id)
    end
end

local topic = table.concat(tt,'_')
channel.MDC_TOPIC = topic
  1. Invoke this script just before the call is dropped to the queue. It should be used as last step in the actions (Internal | External)/Before

  1. Modify skill based routing script
function cleanup()
	-- ast_verbose("**** Cleanup ")
end

function enter_queue(entry,vars)
    local required_skills = get_required_skills(vars)
    for required_skill,required_skill_level in pairs(required_skills) do
        ast_queue_log(entry.queuename, entry.uniqueid, "NONE", "INFO", "REQSKILL" .. "|" .. required_skill .. "|" .. required_skill_level)
    end
end

function get_topic(vars)
    return vars['MDC_TOPIC']
end

-- returns a table of required skill_var_name/skill_level pairs
function get_required_skills(vars)
    local skills={}
    local topic = get_topic(vars)
    if topic == nil then
        return skills
    end
    for skill in string.gmatch(topic, "([^,]+)") do
        local skill_level = vars[skill]
        if skill_level ~= nil and skill_level ~= '' then
            skills[skill] = tonumber(skill_level)
        end
    end
    return skills
end

-- returns the level of the agent's skill. -1 if agent has no skill. astdb values wins
function get_agent_skill_level(vars, member, skill_var_name)

    -- lookup the skills table for this agent
    local skillset = agent_skills[member.membername]

    if skillset == nil then
        -- we require a skill but the agent does not have ANY skills,
        -- so skip this agent
        -- ast_verbose("Agent " .. member.membername .." has no skills")
        return -1
    end
    -- lookup required skill
    local level = tonumber(skillset[skill_var_name])
    if level == nil then
        -- Agent does not have the required skill
        -- so skip this agent
        -- ast_verbose("Agent " .. member.membername .." misses skill " .. key)
        return -1
    end
    -- ast_verbose("Agent " .. member.membername .." has defaull skill " .. skill_var_name .. " " .. level)
    return level
end

function is_our_turn(entry)

    local available = 0

    local topic = get_topic(entry.variables)

    -- pre-check available agent
    local all_agents = get_members()
    local all_entries = get_entries()


    for _,member in pairs(all_agents) do
        -- check if this member is available and skills would match the entries requirements
        local result = calc_metric_internal(member,entry,entry.variables)
        if result ~= -1 then
            available = available + 1
            -- check if this member can handle some of the previous calls
            for pos,other in pairs(all_entries) do
                -- if it's not panding
                if other.pending == 0 then
                    if other.channel == entry.channel then
                        -- we reached current entry - it's our turn
                        return 1
                    else
                        -- do we have the same topic if yes we know that we should wait longer
                        local other_topic = get_topic(other.variables)
                        if other_topic == topic then
                            return 0
                        end

                        local other_result = calc_metric(member,other,other.variables)
                        if other_result ~= -1 then
                            -- other call has higher priority - we should still wait
                            return 0
                        end
                    end
                end

            end
        end
    end
    return 0
end

function calc_metric_internal(member,entry,vars)

    -- not available or pending?
    if member.available == 0 or member.pending == 1 then
        return -1
    end

    local score=0

    -- find required skills levels
    local required_skills = get_required_skills(vars)
    for required_skill,required_skill_level in pairs(required_skills) do
        local agent_skill_level = get_agent_skill_level(vars, member, required_skill)
        if agent_skill_level < required_skill_level then
            -- Agents skill level is to low
            -- so skip this agent
            -- ast_verbose("Agent " .. member.membername .." skill " .. required_skill .. " level to low: " .. agent_skill_level .."<" ..required_skill_level)
            return -1
        end
        score = score + agent_skill_level
    end
    return score
end

function calc_metric(member,entry,vars)

    -- whats my score?
    local my_metric = calc_metric_internal(member,entry,vars)

    -- we're not available, don't fit otherwise (-1) OR asterisk should choose (0)?
    if my_metric <= 0 then
        -- so we're done already...
        return my_metric
    end

    -- lets have a tournament with my fellow agents...
    local all_agents = get_members()
    for _,other_member in pairs(all_agents) do
        local other_metric = calc_metric_internal(other_member,entry,entry.variables)
        if other_metric > my_metric then
            -- somebody else is smarter then me... so i can skip
            return -1
        end
    end

    -- nobody else had a HIGHER score. So i stay in the game...
    -- now let asterisk choose from all the highest ranked agents

    -- ast_verbose("Agent " .. member.membername .. " scores " .. my_metric)
    return 0;

end

Please try out and give me a feedback if it helps

Kind regards,
Stefan

@Stefan,

wow…it is working now. I made a bunch off calls and each of the three agents with the same skill level had at least one call.
Thank you very much, it helped us a lot.

What will happen when we update our pascom? Will the script be overwritten? Or will this become the default sbr script?

Again, thanks for your help!:muscle:

Hi,

You are welcome. You can create as much as you want queue scripts and assigned them to the different queues. If you modified the default one it will stay untouched during update and you can restore it to default one by clicking on “restore” button.

Kind regards,
Stefan

1 Like