dickeras - 2011-09-14

Hello,

i'm using a Alcatel phone under Windows XP in combination with some Alcatel Softphone application. The OutCall Example is working but i've got problems with the InCall Example, because no event is detected (trying jdk 1.6 and 1.7 with jtapi 1.2).

The only things i changed are:
- setting getProvider(null)
- setting terminal to number 7
- commented out import myincallobserver
- a system.out.println at the beginning of the observer (which is never printed)

InCall.java:

import javax.telephony.*;
import javax.telephony.events.*;
//import MyInCallObserver;
/*
 * Create a provider and monitor a particular terminal for an incoming call.
 */
public class InCall {

  public static final void main(String args[]) {

    /*
     * Create a provider by first obtaining the default implementation of
     * JTAPI and then the default provider of that implementation.
     */
    Provider myprovider = null;
    try {
      JtapiPeer peer = JtapiPeerFactory.getJtapiPeer( "net.xtapi.XJtapiPeer");
        
      myprovider = peer.getProvider(null);
      //myprovider = peer.getProvider("Serial");
    } catch (Exception excp) {
      System.out.println("Can't get Provider: " + excp.toString());
      System.exit(0);
    }

    /*
     * Get the terminal we wish to monitor and add a call observer to that
     * Terminal. This will place a call observer on all call which come to
     * that terminal. We are assuming that Terminals are named after some
     * primary telephone number on them.
     */
    try {
      Terminal terminal = myprovider.getAddress("7").getTerminals()[0];
      terminal.addCallObserver(new MyInCallObserver());
    } catch (Exception excp) {
      System.out.println("Can't get Terminal: " + excp.toString());
      System.exit(0);
  }
  }
}

XTAPI.log is empty, mstapi.log follows

;   ----------- Logging Started Wed Sep 14 12:44:18.243 ----------- 
;Time       SEV Message                         Method
12:44:18.243       8    DLL_PROCESS_ATTACH                                  DllMain @ XProvider.cpp:733
12:44:18.275       4    lineInit returned 0 with 8 lines                    InitTapi @ XProvider.cpp:170
12:44:18.400       4    Failed to Negotiate TAPI 1.4 on line 0.             openLine @ XProvider.cpp:272
12:44:18.400       4    Failed to Negotiate TAPI 1.4 on line 1.             openLine @ XProvider.cpp:272
12:44:18.400       8    Negotiated TAPI 1.4 on line 2.                      openLine @ XProvider.cpp:267
12:44:18.400       8    lineOpen on line 2 returned with 0                  openLine @ XProvider.cpp:288
12:44:18.400       8    lineGetDevCaps returned -> 0                        openLine @ XProvider.cpp:303
12:44:18.400       4    lineSetStatusMessages failed                        openLine @ XProvider.cpp:332
12:44:18.400       8    Negotiated TAPI 1.4 on line 3.                      openLine @ XProvider.cpp:267
12:44:18.400       8    lineOpen on line 3 returned with 0                  openLine @ XProvider.cpp:288
12:44:18.400       8    lineGetDevCaps returned -> 0                        openLine @ XProvider.cpp:303
12:44:18.400       4    lineSetStatusMessages failed                        openLine @ XProvider.cpp:332
12:44:18.400       8    Negotiated TAPI 1.4 on line 4.                      openLine @ XProvider.cpp:267
12:44:18.400       4    lineOpen on line 4 returned with -2147483575        openLine @ XProvider.cpp:284
12:44:18.400       8    Negotiated TAPI 1.4 on line 5.                      openLine @ XProvider.cpp:267
12:44:18.400       8    lineOpen on line 5 returned with 0                  openLine @ XProvider.cpp:288
12:44:18.400       8    lineGetDevCaps returned -> 0                        openLine @ XProvider.cpp:303
12:44:18.415       8    Negotiated TAPI 1.4 on line 6.                      openLine @ XProvider.cpp:267
12:44:18.415       4    lineOpen on line 6 returned with -2147483601        openLine @ XProvider.cpp:284
12:44:18.415       8    Negotiated TAPI 1.4 on line 7.                      openLine @ XProvider.cpp:267
12:44:18.447       8    lineOpen on line 7 returned with 0                  openLine @ XProvider.cpp:288
12:44:18.447       8    lineGetDevCaps returned -> 0                        openLine @ XProvider.cpp:303
12:44:45.462       8    DLL_PROCESS_DETACH                                  DllMain @ XProvider.cpp:739

I have seen the following urls so it seems like i'm not the only one:
http://sourceforge.net/projects/xtapi/forums/forum/163596/topic/1495057
http://sourceforge.net/projects/xtapi/forums/forum/163596/topic/1049068
http://sourceforge.net/projects/xtapi/forums/forum/163596/topic/945869

I'm completely frustrated and do not know where i should look further…

Thanks in advance and best regards