cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
540
Views
0
Helpful
1
Replies

Testing a phone number

lokessri
Level 1
Level 1

Hi,

We are using cisco jtapi api, while calling a invalid number i am getting the following exception,

com.cisco.jtapi.PlatformExceptionImpl: Could not meet post conditions of connect()

at com.cisco.jtapi.CallImpl.connect(CallImpl.java:1115)

at com.cisco.jtapi.CallImpl.connect(CallImpl.java:1007)

I am failing to figure out on which event this above exception is thrown,

Could any one help us with the chain of events, which can be obsered so that we can conclude that the phone number given is valid or invalid.

Thanks in Advance,

Lokesh Raju S

1 Reply 1

mpotluri
Level 5
Level 5

The error code in the exception could give more info on the cause of failure. The following code could be used. The list of error codes should be in JTAPI developer guide.

try

{

    // your code
}

catch ( Exception e )

{

    if (e instanceof CiscoJtapiException)

    {
        CiscoJtapiException ce = (CiscoJtapiException) e;

        int errorCode = ce.getErrorCode(); // returns the ErrorCode
    }

}

When a call fails typically a connection goes into failed state and call observer would receive a ConnFailedEv. You can get more info about the failure using ((CiscoCallEv)ev).getCiscoCause().

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: