javatelephonyciscojtapicisco-jtapi

Cisco JTAPI to CUCM


I have been tasked with writing an application that lets users place calls to Cisco Unified Callmanager 8.6. The contact list will not be provided by the UCM. It will be provided elsewhere.

I find both the documentation and examples provided by Cisco to be lacking and undesirable. I also find the lack of working examples from third parties to be lacking.

My hope is that someone else has done something similar to this before me.

The application gets the numbers to call from a database, it then lets the user click on the contact he or she wants to call. The number of the destination should then be sent to the phone. Basically, in stead of having to dial a number, the application sends the destination to the phone or UCM and the user takes over at this point.

Looking at Cisco's makecall.java, and using it, it seems to be simple to actually place a call using this API.

I have started out by using the example found at http://blog.nominet.org.uk/tech/2008/01/25/experiments-with-jtapi-part-1-making-a-call/ but I believe this piece of code to be insufficient to place a call. I may however be wrong.

Could anyone point me in the right direction here, as I believe my specifications are simple and should be easy to implement. If more information is needed, I will be happy to provide it.


Solution

  • I used this code in my project, works correctly:

                final Condition inService = new Condition();
                provider.addObserver(new ProviderObserver() {
                    public void providerChangedEvent(ProvEv[] eventList) {
                        if (eventList == null) {
                            return;
                        }
                        for (int i = 0; i < eventList.length; ++i) {
                            if (eventList[i] instanceof ProvInServiceEv) {
                                inService.set();
                            }
                        }
                    }
                });
                inService.waitTrue();
                Address srcAddr = provider.getAddress(src);
                co = new CallObserver() {
                    public void callChangedEvent(CallEv[] eventList) {    
                    }
                };
                srcAddr.addCallObserver(co);
                call = provider.createCall();
                call.connect(srcAddr.getTerminals()[0], srcAddr, dst);