• V20: 3CX Re-engineered. Get V20 for increased security, better call management, a new admin console and Windows softphone. Learn More.

MyPhone Command Line API - Incoming Notification

Status
Not open for further replies.

uninet

Joined
Jun 29, 2013
Messages
4
Reaction score
0
I am trying to run a simple java program whenever my the phone rings using 3CX v11 and MyPhone latest builds. Under "Path to .exe" I have <path to java bin>\java.exe and under "Parameters" I have -jar <path to jar file>\SendCID.jar "%callid%"

Now when the phone rings, a black DOS window with two lines of text flashes on the screen for a fraction of a second. It is not there long enough for me to read what it says, but it says something about not finding the main class.

The same command <path to java bin>\java.exe -jar <path to jar file>\SendCID.jar "1234567890" runs without error when entered at a WindowsXP DOS prompt. Why should it be different here? and how do I make it work? How can I capture the error text to a file where I can read it?

Richard
 
cmd /c prepended and > log.txt appended?

Haven't tried... but passing it through a command prompt might avail the output redirect to the file. Else, wrap it into a batch and call it.. adding a pause statement last.
 
Thanks, wrapping the java.exe command line in a .BAT file and adding a Pause command let me see what was wrong.

As I discovered, the API starts up in the ...\All Users...\3CXMyPhone Client Addin directory.

I had to insert a CD\ command to get to the java bin directory before it would let me run java.exe

CallerID notification working fine now.
 
Status
Not open for further replies.
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.