Jump to content
Gold Sponsor: Data-Way IT-Consulting, Austria

Swyx Callback Script (help)


Recommended Posts

Hi Swyx forum

I'm trying to make a script that will do.
When the supporter call a customer and the customer do not take the phone but call back later it will return the call back to the supporter.
But it's not working and i am kinda stuck what to do know.


Function Callback(lokal)

    Dim bReturn
    Dim Strcs
	Strcs = "Provider=SQLOLEDB;Data Source=*********;Initial Catalog=DB_*********;User ID=USER;Password=*********"

    ' open connection to database
    Dim db
    db = CreateObject("ADODB.Connection")

    ' open recordset

    Dim sSQL
    Dim rs
	sSQL = "select * from IpPbxCDR where CalledNumber = '" & _
         IpPbx.CallingNumber & "'"

    rs = CreateObject("ADODB.Recordset")
    rs.Open(sSQL, db, adOpenDynamic, adLockOptimistic,
	lokal = rs("OriginationNumber")
	bReturn = not rs.EOF
    ' destroy var
    rs = Nothing

    db = Nothing

    Callback = bReturn
End Function



Link to comment
Share on other sites

  • 7 months later...

In case the problem this persists, there is a syntax error in your code. At the marked position a "_" character (underline) is missing to tell VBScript that the command continues in the next line.


Alternatively you can also remove the line feed from there so that "adCmdText)" follows immediately after the "," in the same line.




Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 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.