|   | 
              | 
            
               					 
               					 
               					
               
                  
                     
                        								
                        
                           
                              
                                 											
                                 
                                    
                                       | Classification: | 
                                       Java | 
                                        Category:  | 
                                       JavaPhone | 
                                     
                                    
                                       |  Created: | 
                                       07/16/2001 | 
                                        Modified: | 
                                       09/11/2002 | 
                                     
                                    
                                       |  Number: | 
                                       FAQ-0715 | 
                                     
                                    
                                       |  Platform: | 
                                       Symbian OS v6.0 | 
                                     
                                   
                               | 
                            
                           Question: I have associated a ConnectionListener with my local Terminal using the Terminal.addCallListener(...) method. I'd expect each
                           call to result in two connectionCreated events but I only get one in the case of incoming calls and none in the case of outgoing
                           calls. Is this a defect? What can I do about it? 
                        								 Answer:  This problem is a result of inconsistency/ambiguity in the JTAPI spec. When you associate a CallListener with your local Terminal,
                           you will only pick up connectionCreated events for Connection objects which are associated with the local Terminal. But this
                           can only occur through a TerminalConnection being brought into existence linking the Connection object and the local Terminal.
                           And the semantics of the JTAPI object model require that the Connection object must be created before any linked TerminalConnection.
                           So logically a ConnectionListener on a local Terminal can never detect local connectionCreated events.  It is an incidental detail of the Symbian JTAPI implementation that remote Connection ojects are created earlier for incoming than for outgoing calls. As a result, remote connectionCreated events are
                        picked by a ConnectionListener on the local Terminal in the former but not the latter case. The behaviour for outgoing calls
                        will be changed in v6.1 to bring it into conformance with that for incoming calls, i.e. generating a single connectionCreated
                        event. But this remains an implementation detail and should not be relied upon. The recommended work around for this problem
                        is to listen instead for terminalConnectionCreated events with a TerminalConnectionListener. Exactly two of these events are
                        guaranteed to be received by a listener on the local Terminal, for each incoming or outgoing call which is handled. 
                      | 
                   
                  
                     |   | 
                   
                
               				
             |