cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
Walkthrough Wednesdays

Implementaion of conference featute

29
Views
0
Helpful
0
Comments
This document was generated from CDN thread

Created by: Umesh Chaurasia on 04-08-2011 03:45:55 AM
Hi,
 
What check we need to put in callChangedEvent before calling the CiscoCall.cnference method for consult conference ?
 
Thanks & Regards,
Umesh

Subject: RE: Implementaion of conference featute
Replied by: Joseph Moskie on 08-08-2011 02:32:14 PM
Umesh,

Could you be more clear with your question?

Are you getting any exceptions or failures? What is the exact scenario you are trying to run?

In general, if there is a problem, JTAPI will generate an exception that can be caught with error codes to understand exactly what went wrong. Common problems involve an invalid call state, unobserved parties, etc.

Without more information I'm not sure how much help I can be.

Subject: RE: Implementaion of conference featute
Replied by: Umesh Chaurasia on 09-08-2011 01:13:21 AM
Hi Joseph,

We are developing CallCOntrol web service using JTAPI API and exposing following functons for our web service API consumer client -

- Initiate2PartyCall ( Party 1, Party 2)  - returns sessionId
- AddIntoConference (sessionId, Party 3)
- DisconnectParty (sessionId, Party 2)

We were getting "Invalid Call State" while calling Conference method. Now we have chnaged our code and now it's working fine. Can you lease validate the same, here is our sample code -


---------------------------------------------------------------------------------
public final void callChangedEvent ( CallEv [] events )
    {
int count=0;
        if ( events != null )
        {
                for ( int i = 0; i < events.length; i++ )
                {
                  //  ESTABLISHED
                

                   if(  events.getCall().getConnections()!=null)
                   {
                        System.out.println("Event  before count "+events.getCall().getConnections());
                    int n=events.getCall().getConnections()[1].toString().length();
                     String str=  events.getCall().getConnections()[1].toString();
                     try
                     {
                    // System.out.println("dest "+provider.getAddress(dest).getConnections()[0] );// .getCall().getConnections()[1].getAddress());
                   //  System.out.println("src"+provider.getAddress(src).getConnections()[0] );// .getCall().getConnections()[1].getAddress());
                       }catch(Exception e)
                     {System.out.println(e);}
                     if(str.substring(n-11, n).compareTo("ESTABLISHED")==0 )
                   {
                    try
                    {
                       if(srcCall.getState()==srcCall.ACTIVE)
                       {
                        Thread.sleep(2000);
       
                         srcCall2 =(CiscoCall)provider.createCall();
                         
                           srcCall2.setConferenceEnable(true);
              
                          srcCall2.consult(srcCall.getConnections()[0].getTerminalConnections()[0], dest2);

                          if(srcCall2.getState()==srcCall2.ACTIVE)
                          {


                                 while(true)
                                 {
                             if(provider.getAddress(dest2).getConnections()[0].getState()==51)
                                 break;
                                 }
                                srcCall2.conference(srcCall);

                           }
                        }
                        }catch(Exception e)
                          {System.out.println("From   "+e.getMessage());
                        }
                        }
                    if(events.getCall().getConnections()[1]!=null||events.getCall().getConnections()!=null)
  System.out.println ( "callChangedEvent : " + events.getCall().getConnections()[1]+"  " +events+" \n" );
                    }


                      

                  }
                   
        }
}

--------------------------------------------------------------------------------------------------


Regards,
Umesh

Subject: RE: Implementaion of conference featute
Replied by: Abhishek Malhotra on 13-08-2011 12:31:14 PM
Hi,
 
What check we need to put in callChangedEvent before calling the CiscoCall.cnference method for consult conference ?
 
Thanks & Regards,
Umesh

CallChangedEvent indicates the the call ID has changed for an observed party in the call. For example:
Call1: A calls B; B answers
Call2: B consults C; C answers
Application invokes Call1.Conference(Call2)
 
After conference gets completed, B gets disconnected from Call2 wwhile C joins Call1 and we end up with conference with all parties (A, B and C) in conference. Essentially what happens here is Call ID for C changes from Call2 to Call1. So call observer for Call2 would get CallChangedEvent to indicate that participants of Call2 are now being moved to call1.
 
Content for Community-Ad