Dismiss Notice
We would like to remind you that we’re updating our login process for all 3CX forums whereby you will be able to login with the same credentials you use for the Partner or Customer Portal. Click here to read more.


Discussion in '3CX Phone System - General' started by eQDoBBs, Aug 21, 2012.

Thread Status:
Not open for further replies.
  1. eQDoBBs

    Aug 14, 2012
    Likes Received:

    We are currently planning a migration to 3CX from Trixbox and a key feature is the ability to click a link in our vTiger based CRM system.

    I have successfully updated the StartCall.php code to integrate to the HTTP API within 3CX via cURL, but I am having an issue with the URL.

    The http://<IP>:5000/ivr/PbxAPI.aspx?func=make_call&from=<ext>&to=<telno>&pin=<pin> format of the URL is not the final string required by the API. When you populate the values and paste into the address bar of a browser your get redirected to a URl with an additional hash value - http://<IP>:5000/ivr/(S(we4n1mwqwzhrd10lax4zfbpn))/PbxAPI.aspx?func=make_call&from=<ext>&to=<telno>&pin=<pin> for example.

    This hash changes on some kind of cycle and causes the link to fail to make the call. Is this hash addition necessary and is their something that can be done either in the cURL code or a setting within the 3CX API to remove the need for this?

    thanks in advance for any help

  2. craigreilly

    craigreilly Well-Known Member

    Feb 1, 2012
    Likes Received:
    I have used this code in my CRM:
     Public Sub MakeACall(ByVal number As String)
            'Find the path in the Registry
            If number = "" Then Exit Sub
                Dim CallNotifierPath As String = ""
                Dim regkey As Microsoft.Win32.RegistryKey
                If Microsoft.Win32.Registry.LocalMachine.OpenSubKey("Hardware\Description\System\CentralProcessor\0").GetValue("Identifier").ToString.Contains("x86") Then
                    regkey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\3CX\MyPhone", False)
                    CallNotifierPath = regkey.GetValue("CallNotifier")
                    regkey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Wow6432Node\3CX\MyPhone", False)
                    CallNotifierPath = regkey.GetValue("CallNotifier")
                End If
                If CallNotifierPath = "" Then
                    MsgBox("MyPhone must be installed locally to use this feature. Contact your helpdesk for support.", MsgBoxStyle.OkOnly, "Error")
                    Exit Sub
                    Shell(CallNotifierPath & " -cmd makecall:" & number, AppWinStyle.Hide, True)
                End If
            Catch ex As Exception
                MsgBox("Make call failed. Contact your helpdesk for support.", MsgBoxStyle.OkOnly, "Error")
                LogException("MAKE CALL: " & vbCrLf & ex.ToString)
            End Try
    End Sub
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Thread Status:
Not open for further replies.