I am trying to connected with my provider by the help of these lines of code:
import javax.telephony.*;
import javax.telephony.Phone.*;
import javax.comm.*;
import Phone.ProviderService;
public class terminals
{
private Address origaddr;
private Provider myprovider;
public void getTerm()
{
try
{
JtapiPeer peer = JtapiPeerFactory.getJtapiPeer(null);
myprovider = peer.getProvider(null);
System.out.println("Provider is " + myprovider);
} catch (Exception e)
{
System.out.println("Can't get Provider: " + e.toString());
System.exit(0);
}
}
}
On executing this code, system is not able to get Provider. When I am using gjtapi-1.8.jar in the library then it is showing "net.sourceforge.gjtapi.GenericProvider@53c015" as the provider. I have added log4j-1.2.12.jar, jtapi-1.3.1.jar, gjtapi-tapi3-1.9-rc1.jar, Gjtapi-1.8.jar, log4j.properties file in library to make it. Its running but i want to connect it with my mobile service provider. I am using MTNL (through Serial prot) mobile service provider in Delhi (India) and MTNL braodband connection (through LAN). Please suggest me how to proceed.
"javax.telephony.JtapiPeerUnavailableException: JtapiPeer: DefaultJtapiPeer could not be instantiated. at javax.telephony.JtapiPeerFactory.getJtapiPeer(JtapiPeerFactory.java:135) at Phone.Outcall.main(Outcall.java:24)" is the stack trace thrown when I am removing gjtapi-1.8.jar file from the library. And when i am adding this file in the library, it is showing provider as "net.sourceforge.gjtapi.GenericProvider@53c015", and the call is not connecting to any mobile no. There is some more classes on which I am working, taken from "jtapi-1_4-fr3-spec>javax>Telephony>package.html" file.
Those files are OutCall.java & MyOutCallObserver.java on which I am working.