Jump to content

Tom Wellige

Root Moderator
  • Posts

    4,309
  • Joined

  • Last visited

  • Days Won

    117

 Content Type 

Profiles

SwyxPEDIA Wiki

Zendesk Integration

Persistent Variables

Longest Waiting

VBScript build in functions

GSE build in functions (VBScript)

Server Script API (VBScript)

GSE build in functions (Lua)

Server Script API (Lua)

Function Collection (VBScript)

Function Collection (Lua)

IPS Integration

Jira Service Integration

Forums

Blogs

Downloads

Posts posted by Tom Wellige

  1. In der aktuellen Version vom neuen SwyxIt! Client ist es noch nicht möglich, das persönliche Telefonbuch zu bearbeiten. 

     

    Das wird mit einer folgenden Version implementiert werden. Wann genau das sein wird, weiss ich allerdings nicht.

     

    Bis dahin geht das tatsächlich nur im SwyxIt! Classic Client.

  2. Nein, eine solche Übersicht ist mir nicht bekannt.

     

    Grundsätzlich gilt bei Updates immer: zuerst der Server, dann die Clients.

    Daraus folgt, dass die grundsätzliche Telefonie Funktionalität mit älteren Clients funktionieren sollte. Dennoch sollten die Clients so schnell wie möglich ebenfalls aktualisiert werden.

     

    Was den Umstieg vom Nethone Client auf das SwyxIt! angeht, sollte es keinerlei Probleme geben, da alle relevanten Konfirationsdaten und -dateien zentral in der Datenbank auf dem Server gehalten werden.

     

     

  3. Thanks for the .rse file. I have restructured it a little bit... (see further below)

     

    When figuring that the call is whitelisted you should connect the call yourself to the called destination instead of leaving it to a following script by existing trough "Rule Skipped". You said that there are no following rules after this anymore anyway.

     

    Regrding the missed call: in case of a not whitelisted caller you connect the call to another user with the "Proceed with destination script" option. This creates a new call under the hood for the other user, and for the original user this call is missed. But as Markus already hinted, you can prevent this entry into the call journal to be written by

    before leaving your script (through the "Connect To" block with the "Proceed with destination script" option).

     

    Here is a slightly modyfied script that should do what you wan/need:

     

    image.png

     

     

    Whitelist_Extended.rse

     

     

     

  4. Hi,

     

    this can't have anything to do with the vbscript function and if it finds the caller in the textfile or not. It have have something to do with the way how you handle the call afterwards.

     

    I would really like to see the entire call routing rule. So please export it as .rse file (File -> Export...) and attach the file here. 

  5. Wenn ein Agent in mehereren Warteschlangen ist, dann konkurrieren alle Warteschlangen quasi um ihn. Hier kann es leicht passieren, dass mehrere Warteschlagen gleichzeitig versuchen, einen Ruf an diesen Agenten zuzustellen. 

     

    Ich kann Dir leider nicht sagen, in wie weit VisualGroups eine Logik anthält, eine solche Situation zu erkenneun und sauber die regeln. 

     

    Am Besten fragst Du mal beim Enreach Service/Presales nach: https://www.enreach.de/de/kontakt

     

  6. 1 hour ago, Anonymer said:

    Any advice on how to fix this?

     

    How does your rule look like? Do you use a Connect To block within your rule to connect to call to the original destination after you identified it as white listed?

     

    Can you export the rule as .rse file and attach it to your reply here? I am happy to take a look on it.

     

  7. Schön zu lesen, dass die Persistent Variables wieder für Dich laufen.

     

    Wie der Trace Auszug den Du gepostet hattest zu dem erkennten Problem (SQL Authentifizierung) passt, erschliesst sich mir allerdings gerade nicht. Da muss noch etwas anderes fundamental falsch gelaufen zu sein. Aber egal, es scheint ja jetzt alles wieder richtig zu laufen.

     

  8. Hi,

     

    ich würde hier einfach eine Liste hinterlegen, die pro Kalenderwoche die Nummer enthält, auf die zugestellt werden soll. Eine solche Liste könnte z.B. in einer Textdatei oder Datenbank hinterlegt werden. Persönlich würde ich hier immer zu einer Datenbank greifen.

     

    Hier im Forum befinden sich in der Function Collection (VBScript) zwei Funktionen, die als Grundlage für die Lösung hier dienen können:

     

    Ich weiss nicht, wie firm Du mit VBSkript, Textdateien, Datenbanken etc. bist, und ob Dir das als Hinweis bereits reicht. Wenn nicht, sag Bescheid.

     

    Der erste Link oben (zur Function Collection) erklärt übrigens wie man eigenen VBScript Code ins Call Routing einfügt und anschliessend an geeigneter Stelle aufruft. In Deinem Fall würde ich eine Funktion bauen, die die Nummer auf die zugestellt werden soll zurück gibt, so dass Du sie direkt im Durchstellen Block verwenden kannst.

     

  9. Hi.

     

    Yes, this is possible. You need to connect a little script/application to the SwyxIt! client via the Client SDK, which monitors all incoming and outgoing calls, resolves the numbers and opens your Access application.

     

    The current Client SDK with all needed documentation and lots of samples can be found in the Enreach Help Center:

     

    A sample script (VBScript) that opens any given URL on an incoming call and passes the caller number as parameter can be found here:

     

    You can use this script as base and extend it with your needed functionality

     

     

  10. There will be two new Open ECR Extensions coming to the forum soon (with the release of SwyxWare 14.10).

     

    Maybe you can figure from the code of one of the two upcoming extensions what they will be about ;) 

     

    
    ...
    
    ---------------------------------------------------------------------
    --
    -- GetAccessToken
    --
    -- Gets fresh access token from azure portal.
    --
    -- Parameter:
    --
    -- Returns:
    --
    ---------------------------------------------------------------------
    function AzureTTSClass:GetAccessToken()
        PBXScript.OutputTrace ("-------> AzureTTS:GetAccessToken()")
    
        local sURL, oWebRequest, nResponseCode, sResponseBody
    
        sURL = AZURETTS_URL_TOKEN
        sURL = StringReplace(sURL, "#REGION#", self.m_sRegion)
        PBXScript.OutputTrace ("sURL = "  .. sURL)
    
        local webreq = require "PBXWebRequest"
        if (webreq ~= nil) then
    
            local hSession, nResponseCode, sResponseBody    
    
            hSession = webreq.new()
    
            hSession:HttpAuth  (PBXHttpAuthNone)
            hSession:HttpVerb  (PBXHttpVerbPost)
            hSession:URL       (sURL)
            hSession:AddHeader ("Ocp-Apim-Subscription-Key: " .. self.m_sSubscriptionKey)
    
            nResponseCode = hSession:Execute()
            sResponseBody = hSession:ResponseBody()
            PBXScript.OutputTrace ("nResponseCode = " .. nResponseCode)
    
    
            if (nResponseCode == 200) then
                self.m_sAccessToken    = sResponseBody
            else
                self.m_sResult         = AZURETTS_RETURN_FAILED
                self.m_nLastError      = AZURETTS_ERROR_WEBREQUEST
                self.m_sLastErrorDescr = "Azure web request failed! (" .. sResponseBody .. ")"
                PBXScript.OutputTrace (self.m_sLastErrorDescr)
            end
    
            self.m_nLatestResponseCode = nResponseCode
        end
    
        PBXScript.OutputTrace ("<------- AzureTTS:GetAccessToken()")
    end
    
    
    ---------------------------------------------------------------------
    --
    -- RunTTS
    --
    -- Runs request against cognitive services to return generated wav audio file.
    --
    -- Parameter:
    --
    -- Returns:
    --
    ---------------------------------------------------------------------
    function AzureTTSClass:RunTTS()
        PBXScript.OutputTrace ("-------> AzureTTSClass:RunTTS()")
    
        local sURL, sHost, sRequestBody
    
        sURL = AZURETTS_URL_TTS
        sURL = StringReplace(sURL, "#REGION#",   self.m_sRegion)
        PBXScript.OutputTrace ("sURL = "    .. sURL)
    
        sHost = AZURETTS_HEADER_HOST
        sHost = StringReplace(sHost, "#REGION#", self.m_sRegion)
        PBXScript.OutputTrace ("sHost = "   .. sHost)
    
        if (self.m_sOwnSSML ~= "") then
            sRequestBody = self.m_sOwnSSML
        else
            sRequestBody = AZURETTS_REQUEST_BODY
            sRequestBody = StringReplace(sRequestBody, "#LNG#",    self.m_sLanguage)
            sRequestBody = StringReplace(sRequestBody, "#GENDER#", self.m_sGender)
            sRequestBody = StringReplace(sRequestBody, "#VOICE#",  self.m_sVoice)
            sRequestBody = StringReplace(sRequestBody, "#TEXT#",   self.m_sText)
        end
        PBXScript.OutputTrace ("sRequestBody = " .. sRequestBody)
    
    
        local webreq = require "PBXWebRequest"
        if (webreq ~= nil) then
    
            local hSession, nResponseCode, sResponseBody
    
            hSession = webreq.new()
    
            hSession:HttpAuth   (PBXHttpAuthBearer)
            hSession:AuthPass   (self.m_sAccessToken)
            hSession:HttpVerb   (PBXHttpVerbPost)
            hSession:RequestBody(sRequestBody)
            hSession:URL        (sURL)
            hSession:OutputFile (self.m_sWavFile)
            hSession:AddHeader  ("X-Microsoft-OutputFormat: " .. AZURETTS_HEADER_OUTPUT_FORMAT)
            hSession:AddHeader  ("Content-Type: " .. AZURETTS_HEADER_CONTENT_TYPE)
            hSession:AddHeader  ("Host: " .. sHost)
            hSession:AddHeader  ("User-Agent: " .. AZURETTS_HEADER_USER_AGENT)
    
            nResponseCode = hSession:Execute()
            sResponseBody = hSession:ResponseBody()
            PBXScript.OutputTrace ("nResponseCode = " .. nResponseCode)
    
            if (nResponseCode == 200) then
                self.m_sWavFile           = hSession:OutputFile()
                g_sAzureTTS_LatestWavFile = self.m_sWavFile
                PBXScript.OutputTrace ("g_sAzureTTS_LatestWavFile = " .. g_sAzureTTS_LatestWavFile)
            else
                self.m_sResult         = AZURETTS_RETURN_FAILED
                self.m_nLastError      = AZURETTS_ERROR_WEBREQUEST
                self.m_sLastErrorDescr = "Azure web request failed! (" .. sResponseBody .. ")"
                PBXScript.OutputTrace (self.m_sLastErrorDescr)
            end
    
            self.m_nLatestResponseCode = nResponseCode
    
        end
    
        PBXScript.OutputTrace ("<------- AzureTTSClass:RunTTS()")
    end
    
    
    ---------------------------------------------------------------------
    --
    -- PlayWavFile
    --
    -- Plays the previously received wav file.
    --
    -- Parameter:
    --
    -- Returns:
    --
    ---------------------------------------------------------------------
    function AzureTTSClass:PlayWavFile()
        PBXScript.OutputTrace ("-------> AzureTTS:PlayWavFile()")
    
            PlaySound(self.m_sWavFile)
    
        PBXScript.OutputTrace ("<------- AzureTTS:PlayWavFile()")
    end
    
    ...

     

     

    If you are not too much into programing I have another hint for you...

     

    image.png.0c59989532127ed541827d08bd678a76.png

     

     

     

  11. Vom Call Routing aus kommst Du nur direkt an 

    ran, wobei CallingPartyName ggf. durch das globale Telefonbuch gefüllt wurde.

     

    Es gibt tatsächlich eine API, mit der Du an das globale Telefonbuch heran kommst, die Config Data Store API (CDS). Mit der solltest Du auch an das Beschreibungsfeld kommen. Da müüstest Dir Dir dann aber einen Wrapper selbst bauen, der in Richtung des Call Routings eine COM Schnittstelle zur Verfügung stellt, auf die Du dann mit VBScript zugreifen kannst.

     

    Einen Ansatz dazu findest Du neben der Doku im CDS API Paket hier:

     

    Auf der CDS API basiert auch das SwyxWare Powershell Modul auf.

     

    Einen Ansatz hierfür findest Du in diesem Post:

    Wenn Du ein PowerShell Script hast, kannst Du das vom Call Routing aus einfach über eine der beiden folgenden VBScript Funktionen starten:

    Bitte beachte hier jeweils den Link auf "Introduction" direkt über dem VBScript Code.

     

     

     

    Du kannst natürlich auch wie bei meinem ersten Vorschlag den Namen im Telefonbuch ändern, und statt den Produktname an Ende zu setzen, ihn an den Anfang. Hierbei musst Du nur beachten, dass wenn Du z.B. nur nach einem "X" an erste Stelle des Namens suchst, Du auch alle Kunden erwischst, deren Name selbst mit "X" anfängt. Etwas eindeutiger wäre z.B. "X " (X Leereichen).

     

    Im Variable auswerten Block müsstest Du dann

    • Left(PBXCall.CallingPartyName, 2) = "X "

    eintragen.

     

  12. Hallo Christian,

     

    wenn sich der Anrufer im globalen Telefonbuch der SwyxWare befindet, dann ist es ganz einfach, seinen Namen im Call Routing auszuwerten und den Ruf passend weiter zu leiten.

     

    Angenommen Du hast im Telefonbuch nicht nur den Namen eines Kunden hinterlegt, sondern zusätzlich auch noch, welches Prodult er benutzt, z.B.:

    • Max Mustermann (ProduktA)
      +491234567890

    Jetzt kann Du im Call Routing pürfen, ob im Namen des Anrufers "ProduktA" enthalten ist und dann entsprechend weiterleiten. Den Namen kann man mittels PBXCall.CallingPartyName abfragen.

     

    Die Abfrage machst Du am einfachstem mit dem Variable auswerten Block im Grafischen Skript Editor (GSE). In dessen Eigenschaften gibst Du auf der Parameter Seite den VBScript Befehl

    • InStr(PBXCall.CallingPartyName, "ProduktA") <> 0

    ein. 

     

    image.png

     

    Wenn sich "ProduktA" im Anrufernamen befindet, dann kommst Du über den Wahr Ausgangdes Block raus, ansonsten über den Falsch Ausgang.

     

     

    Insgesamt könnte ein solche GSE Skript dann so aussehen:

     

    image.png

     

     

    ProduktAbfrage.rse

     

     

    Voraussetzung für diesen Ansatz ist, dass Du die Anrufer/Kunden im globalen Telefonbuch hast, und sie dort passend ihres Produktes markiert hast.

    Wenn jetzt ein Ruf auf die Durchwahl herein kommt, versucht der Server als erstes den Namen über das globale Telefonbuch aufzulösen. Anschliessend startet der Server das Call Routing und dort kannst Du wie beschrieben den Namen dann abfragen.

     

     

  13. Have you switched your Call Routing User to Lua Call Routing?

     

    By default ALL SwyxWare users are based on VBScript and only VBScript code can be added.

     

    Since SwyxWare 13.10 there is also a Lua scripting engine included, but users must still be switched over to Lua manually. If you haven't done anything like that, your call routing user is using VBScript and you need to use the VBScript version of the public holiday function (as stated also in the article you linked above):

     

     

     

  14. This is not a powershell or character code problem, but a SwyxIt! "feature". 

     

    Empty speeddial labels (empty, or with blank characeter) will trigger SwyxIt! to display "Speedial XX". I always navigate around that by setting a "." as label. Not the nicest solution, but it works.

     

  15. Hallo Martin,

     

    in diesem Topic findest Du ein Script, welches durch eine Liste aller Namenstasten geht und diese anpasst:

     

    Statt mit der "for" Schleife nacheinander auf alle Namenstasten zuzugreifen, kannst Du auch direkt auf "$speeddialKeyList[23]" zufgreifen. Der Index der Liste startet bei 0. Daher hat die Namenstaste 24 den Index 23.

     

     

  16. Ja, das ist notwendig.

     

    Ungleich Standard VBScript müssen im Call Routing der SwyxWare alle Variablen mittels Dim deklariert werden bevor man sie benutzen kann, da hier die Option Explicit Anweisung durch die SwyxWare gesetzt wird.

     

    Bei Problemen bei eigenem Code empfiehlt sich immer ein Blick in der Server Trace, da alle VBScript Fehler dort hinein geschrieben werden. Der Link aus meiner ersten Antwort erklärt, wie Du diese findest und Dich recht einfach darin zurecht finden kannst.

     

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and have taken note of our Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.