1. Brekeke Product Name and version:brekeke jtapi new version downloaded (1.6)
2. Java version:j2sdk1.4.2 and jre1.5
3. OS type and the version:WN Professional
4. UA (phone), gateway or other hardware/software involved:
5. Select your network pattern from http://www.brekeke-sip.com/bbs/network/ ... terns.html :
6. Your problem:When i used the sample1 program its giving me the provider as OUT_OF_SERVICE.
JtapiPeer peer = JtapiPeerFactory.getJtapiPeer("com.brekeke.jtapi.BrPeer"); // MUST HAVE
/* Set your work directory of JTAPI in the second argument */
myprovider = peer.getProvider("BrProvider; pdir=C:/Brekeke/JTAPI1.0/work");
When i checked myprovider.getState() its giving me 17 which is nothing but OUT_OF_SERVICE.
Because of this its giving InvalidStateException.Please reply soon.
Please send me the solution...
venkatesh
Provider OUT_OF_SERVICE
Moderator: Brekeke Support Team
Provider.start()
Hi,
Thanks for the reply,i have started the provider using provider.start()
When i use provider.start() it is giving me this error.
Exception in thread "main" java.lang.NoSuchMethodError: javax.telephony.Provider.start()V
at com.geneva.CalloutPlay.main(CalloutPlay.java:52)
is this error is because of not registering in Brekeke SIP Server or anything else,please help.I think its because of not registering in brekeke SIP server.
but i dont know how to register my provider number(COM3) into Brekeke SIP Server .I have installed brekeke SIP server and logged into that server and it is taking the default numbers.
So please help, how to register my provider number into the Brekeke SIP Server.I am using my own modem for outgoing calls and i have puted COM3 in providers.properties file also.
Please help me whether i am going in right way or not ,i am new to this jtapi technology.
Please reply soon.Waiting for your reply,
Thanking you,
venkatesh
Thanks for the reply,i have started the provider using provider.start()
When i use provider.start() it is giving me this error.
Exception in thread "main" java.lang.NoSuchMethodError: javax.telephony.Provider.start()V
at com.geneva.CalloutPlay.main(CalloutPlay.java:52)
is this error is because of not registering in Brekeke SIP Server or anything else,please help.I think its because of not registering in brekeke SIP server.
but i dont know how to register my provider number(COM3) into Brekeke SIP Server .I have installed brekeke SIP server and logged into that server and it is taking the default numbers.
So please help, how to register my provider number into the Brekeke SIP Server.I am using my own modem for outgoing calls and i have puted COM3 in providers.properties file also.
Please help me whether i am going in right way or not ,i am new to this jtapi technology.
Please reply soon.Waiting for your reply,
Thanking you,
venkatesh
Did you include jtapi-spec.jar in your build path?
Brekeke has modified JTAPI 1.4 from Sun a little.
See http://www.brekeke.com/products/jtapi/ref/index.html
JTAPI 1.4 from Sun doesn't have Provider.start().
If you downloaded the spec from Sun and included it in your build path, delete it and use it (jtapi-spec.jar) from Brekeke instead.
Andrea
Brekeke has modified JTAPI 1.4 from Sun a little.
See http://www.brekeke.com/products/jtapi/ref/index.html
JTAPI 1.4 from Sun doesn't have Provider.start().
If you downloaded the spec from Sun and included it in your build path, delete it and use it (jtapi-spec.jar) from Brekeke instead.
Andrea
Provider.start()
hi,
Thanks for the reply.I have downloaded that jar from brekeke site only..and i already putted that jar in the build path and in my C:\Program Files\Java\jre1.5.0_03\lib\ext path also and still it is giving error..
Exception in thread "main" java.lang.NoSuchMethodError: javax.telephony.Provider.start()V
at com.geneva.CalloutPlay.main(CalloutPlay.java:41)
So please help me ...i am using the sample code1 from brekeke.
Waiting for your reply..
Thank you
venkatesh
Thanks for the reply.I have downloaded that jar from brekeke site only..and i already putted that jar in the build path and in my C:\Program Files\Java\jre1.5.0_03\lib\ext path also and still it is giving error..
Exception in thread "main" java.lang.NoSuchMethodError: javax.telephony.Provider.start()V
at com.geneva.CalloutPlay.main(CalloutPlay.java:41)
So please help me ...i am using the sample code1 from brekeke.
Waiting for your reply..
Thank you
venkatesh
Hi,
Please ignore my previuos mail...Sorry its working.... but i am not able to connect to the number ,
i am using a mobile which is connected to my COM3 port of the PC,
So that it should act as a modem...
i wanted to connect to another mobile through this modem.
So what i am trying to do is calling a mobile through PC using Jtapi and using a modem (a mobile which is connected to my PC)
Please help me .is this possible or not.i am not able dial that number.
origterm="COM3";
origaddr="COM3";
DialNo="9844546842"
When i use the code
Connection c[] = mycall.connect(origterm, origaddr, DialNo);
My dial no is 9844546842...
but it is connecting to COM3 ahich my pc's port number.
ie addr_name is giving COM3....it should give me 9844546842.
Please help ....
here is my code....
package com.geneva;
import javax.telephony.*;
import javax.telephony.media.*;
import javax.telephony.callcontrol.*;
import com.brekeke.jtapi.*;
public class CalloutPlay {
static private String DialNo = "9844546842";
public static void main(String args[]) {
Provider myprovider = null;
try {
JtapiPeer peer = JtapiPeerFactory.getJtapiPeer("com.brekeke.jtapi.BrPeer"); // MUST HAVE
/* Set your work directory of JTAPI in the second argument */
myprovider = peer.getProvider("BrProvider; pdir=C:/Brekeke/JTAPI1.0/work");
/* Add this if you need to know Register is successful or not */
myprovider.addProviderListener(new CalloutPlay.MyProviderListener());
/*
* Start provider and register this Provider's number (1234) to Brekeke
* SIP Server. See the provider's number in work/provider.properties file.
*/
myprovider.start();
} catch (Exception excp) {
System.out.println("Can't get Provider: " + excp.toString());
System.exit(0);
}
// Get caller (1234)'s Address & Terminal
Address origaddr = null;
Terminal origterm = null;
try {
// Choose one address from the addresses this provider has
origaddr = myprovider.getAddress("COM3");
System.out.println("terminals"+origaddr.getName());
/*Address addr1[]=myprovider.getAddresses();
System.out.println("addr1.length--->"+addr1.length);
for(int i=0;i<addr1.length;i++)
{
origaddr=addr1;
System.out.println("origaddr "+origaddr.getName());
}*/
} catch (Exception excp) {
System.out.println("Exception when getting address: " + excp.toString());
System.exit(0);
}
try {
// Get Terminals which has this Address
Terminal[] terminals = origaddr.getTerminals();
System.out.println("terminals--->"+terminals[0].getName());
if (terminals == null) {
System.out.println("No Terminals on Address.");
System.exit(0);
}
//Choose one
origterm = terminals[0];
} catch (Exception excp) {
System.out.println("Exception when getting terminal: " + excp.toString());
}
// Create the telephone call object and add an listener.
Call mycall = null;
try {
mycall = myprovider.createCall();
mycall.addCallListener(new MyCallListener());
} catch (Exception excp) {
System.out.println("Exception when creating a call: " + excp.toString());
}
// Place the telephone call to number DialNo
try {
System.out.println("mycall.getState()"+mycall.getState());
Connection c[] = mycall.connect(origterm, origaddr, DialNo);
} catch (Exception excp) {
System.out.println("Exception when connecting: " + excp.toString());
excp.printStackTrace();
}
}
/* Listener for checking Register request result */
static class MyProviderListener implements
com.brekeke.jtapi.BrProviderListener {
public void eventRegistFail(BrProviderEvent event) {
System.out.println("Register failed:" + event.getSourceUrl()+" ("+event.getStatus()+")");
}
public void eventRegistSuccess(BrProviderEvent event) {
System.out.println("Register successful:" + event.getSourceUrl()+" ("+event.getStatus()+")");
}
public void providerInService(ProviderEvent event) {
System.out.println("Provider is now in service");
}
public void providerEventTransmissionEnded(ProviderEvent event) {
} /* Not supported */
public void providerOutOfService(ProviderEvent event) {
} /* Not supported */
public void providerShutdown(ProviderEvent event) {
System.out.println("Provider shutdown");
}
}
/** * Listener for Call ** */
static class MyCallListener implements
javax.telephony.TerminalConnectionListener {
public void callActive(CallEvent event) {
}
public void callEventTransmissionEnded(CallEvent event) {
}
public void callInvalid(CallEvent event) {
}
public void connectionAlerting(ConnectionEvent event) {
}
// Start playing muric when the connection is connected
public void connectionConnected(ConnectionEvent event) {
Connection con = event.getConnection();
Address addr = con.getAddress();
System.out.println("Connection Connected:" );
String addr_name = addr.getName();
System.out.println("Connection Connected:" + addr_name);
if (addr_name.compareTo(DialNo) == 0) {
CallControlCall call = (CallControlCall) con.getCall();
try {
playCall(call);
} catch (Exception e) {
System.out.println("Exception when playcall: " + e);
}
}
}
public void connectionCreated(ConnectionEvent event) {
}
public void connectionDisconnected(ConnectionEvent event) {
Connection con = event.getConnection();
Address addr = con.getAddress();
String addr_name = addr.getName();
System.out.println("Connection is disconnected:" + addr_name);
con.getCall().getProvider().shutdown();
System.exit(0);
}
public void connectionFailed(ConnectionEvent event) {
Connection con = event.getConnection();
Address addr = con.getAddress();
String addr_name = addr.getName();
int cause = event.getCause();
System.out.println("Connection Failed:" + addr_name + " Cause:"+cause); /// New!!!
System.exit(0);
}
public void connectionInProgress(ConnectionEvent event) {
}
public void connectionUnknown(ConnectionEvent event) {
}
public void multiCallMetaMergeEnded(MetaEvent event) {
} /* Not supported */
public void multiCallMetaMergeStarted(MetaEvent event) {
} /* Not supported */
public void multiCallMetaTransferEnded(MetaEvent event) {
} /* Not supported */
public void multiCallMetaTransferStarted(MetaEvent event) {
} /* Not supported */
public void singleCallMetaProgressEnded(MetaEvent event) {
} /* Not supported */
public void singleCallMetaProgressStarted(MetaEvent event) {
} /* Not supported */
public void singleCallMetaSnapshotEnded(MetaEvent event) {
} /* Not supported */
public void singleCallMetaSnapshotStarted(MetaEvent event) {
} /* Not supported */
public void terminalConnectionActive(TerminalConnectionEvent event) {
}
public void terminalConnectionCreated(TerminalConnectionEvent event) {
}
public void terminalConnectionDropped(TerminalConnectionEvent event) {
}
public void terminalConnectionPassive(TerminalConnectionEvent event) {
}
public void terminalConnectionRinging(TerminalConnectionEvent event) {
}
public void terminalConnectionUnknown(TerminalConnectionEvent event) {
}
}
This code is giving me Connection failed.Please help
[/code]
Please ignore my previuos mail...Sorry its working.... but i am not able to connect to the number ,
i am using a mobile which is connected to my COM3 port of the PC,
So that it should act as a modem...
i wanted to connect to another mobile through this modem.
So what i am trying to do is calling a mobile through PC using Jtapi and using a modem (a mobile which is connected to my PC)
Please help me .is this possible or not.i am not able dial that number.
origterm="COM3";
origaddr="COM3";
DialNo="9844546842"
When i use the code
Connection c[] = mycall.connect(origterm, origaddr, DialNo);
My dial no is 9844546842...
but it is connecting to COM3 ahich my pc's port number.
ie addr_name is giving COM3....it should give me 9844546842.
Please help ....
here is my code....
package com.geneva;
import javax.telephony.*;
import javax.telephony.media.*;
import javax.telephony.callcontrol.*;
import com.brekeke.jtapi.*;
public class CalloutPlay {
static private String DialNo = "9844546842";
public static void main(String args[]) {
Provider myprovider = null;
try {
JtapiPeer peer = JtapiPeerFactory.getJtapiPeer("com.brekeke.jtapi.BrPeer"); // MUST HAVE
/* Set your work directory of JTAPI in the second argument */
myprovider = peer.getProvider("BrProvider; pdir=C:/Brekeke/JTAPI1.0/work");
/* Add this if you need to know Register is successful or not */
myprovider.addProviderListener(new CalloutPlay.MyProviderListener());
/*
* Start provider and register this Provider's number (1234) to Brekeke
* SIP Server. See the provider's number in work/provider.properties file.
*/
myprovider.start();
} catch (Exception excp) {
System.out.println("Can't get Provider: " + excp.toString());
System.exit(0);
}
// Get caller (1234)'s Address & Terminal
Address origaddr = null;
Terminal origterm = null;
try {
// Choose one address from the addresses this provider has
origaddr = myprovider.getAddress("COM3");
System.out.println("terminals"+origaddr.getName());
/*Address addr1[]=myprovider.getAddresses();
System.out.println("addr1.length--->"+addr1.length);
for(int i=0;i<addr1.length;i++)
{
origaddr=addr1;
System.out.println("origaddr "+origaddr.getName());
}*/
} catch (Exception excp) {
System.out.println("Exception when getting address: " + excp.toString());
System.exit(0);
}
try {
// Get Terminals which has this Address
Terminal[] terminals = origaddr.getTerminals();
System.out.println("terminals--->"+terminals[0].getName());
if (terminals == null) {
System.out.println("No Terminals on Address.");
System.exit(0);
}
//Choose one
origterm = terminals[0];
} catch (Exception excp) {
System.out.println("Exception when getting terminal: " + excp.toString());
}
// Create the telephone call object and add an listener.
Call mycall = null;
try {
mycall = myprovider.createCall();
mycall.addCallListener(new MyCallListener());
} catch (Exception excp) {
System.out.println("Exception when creating a call: " + excp.toString());
}
// Place the telephone call to number DialNo
try {
System.out.println("mycall.getState()"+mycall.getState());
Connection c[] = mycall.connect(origterm, origaddr, DialNo);
} catch (Exception excp) {
System.out.println("Exception when connecting: " + excp.toString());
excp.printStackTrace();
}
}
/* Listener for checking Register request result */
static class MyProviderListener implements
com.brekeke.jtapi.BrProviderListener {
public void eventRegistFail(BrProviderEvent event) {
System.out.println("Register failed:" + event.getSourceUrl()+" ("+event.getStatus()+")");
}
public void eventRegistSuccess(BrProviderEvent event) {
System.out.println("Register successful:" + event.getSourceUrl()+" ("+event.getStatus()+")");
}
public void providerInService(ProviderEvent event) {
System.out.println("Provider is now in service");
}
public void providerEventTransmissionEnded(ProviderEvent event) {
} /* Not supported */
public void providerOutOfService(ProviderEvent event) {
} /* Not supported */
public void providerShutdown(ProviderEvent event) {
System.out.println("Provider shutdown");
}
}
/** * Listener for Call ** */
static class MyCallListener implements
javax.telephony.TerminalConnectionListener {
public void callActive(CallEvent event) {
}
public void callEventTransmissionEnded(CallEvent event) {
}
public void callInvalid(CallEvent event) {
}
public void connectionAlerting(ConnectionEvent event) {
}
// Start playing muric when the connection is connected
public void connectionConnected(ConnectionEvent event) {
Connection con = event.getConnection();
Address addr = con.getAddress();
System.out.println("Connection Connected:" );
String addr_name = addr.getName();
System.out.println("Connection Connected:" + addr_name);
if (addr_name.compareTo(DialNo) == 0) {
CallControlCall call = (CallControlCall) con.getCall();
try {
playCall(call);
} catch (Exception e) {
System.out.println("Exception when playcall: " + e);
}
}
}
public void connectionCreated(ConnectionEvent event) {
}
public void connectionDisconnected(ConnectionEvent event) {
Connection con = event.getConnection();
Address addr = con.getAddress();
String addr_name = addr.getName();
System.out.println("Connection is disconnected:" + addr_name);
con.getCall().getProvider().shutdown();
System.exit(0);
}
public void connectionFailed(ConnectionEvent event) {
Connection con = event.getConnection();
Address addr = con.getAddress();
String addr_name = addr.getName();
int cause = event.getCause();
System.out.println("Connection Failed:" + addr_name + " Cause:"+cause); /// New!!!
System.exit(0);
}
public void connectionInProgress(ConnectionEvent event) {
}
public void connectionUnknown(ConnectionEvent event) {
}
public void multiCallMetaMergeEnded(MetaEvent event) {
} /* Not supported */
public void multiCallMetaMergeStarted(MetaEvent event) {
} /* Not supported */
public void multiCallMetaTransferEnded(MetaEvent event) {
} /* Not supported */
public void multiCallMetaTransferStarted(MetaEvent event) {
} /* Not supported */
public void singleCallMetaProgressEnded(MetaEvent event) {
} /* Not supported */
public void singleCallMetaProgressStarted(MetaEvent event) {
} /* Not supported */
public void singleCallMetaSnapshotEnded(MetaEvent event) {
} /* Not supported */
public void singleCallMetaSnapshotStarted(MetaEvent event) {
} /* Not supported */
public void terminalConnectionActive(TerminalConnectionEvent event) {
}
public void terminalConnectionCreated(TerminalConnectionEvent event) {
}
public void terminalConnectionDropped(TerminalConnectionEvent event) {
}
public void terminalConnectionPassive(TerminalConnectionEvent event) {
}
public void terminalConnectionRinging(TerminalConnectionEvent event) {
}
public void terminalConnectionUnknown(TerminalConnectionEvent event) {
}
}
This code is giving me Connection failed.Please help
[/code]
Hi,
Brekeke JTAPI SDK is for creating SIP applications.
The application created using JTAPI will register to SIP Server and communicate with other clients through a SIP Server.
SIP communications will be performed over IP.
So I don't think what you wish to do can not achieve using Brekeke JTAPI SDK, unfortunately...
Andrea
Brekeke JTAPI SDK is for creating SIP applications.
The application created using JTAPI will register to SIP Server and communicate with other clients through a SIP Server.
SIP communications will be performed over IP.
So I don't think what you wish to do can not achieve using Brekeke JTAPI SDK, unfortunately...
Andrea
-
- Posts: 1
- Joined: Mon Nov 08, 2010 5:40 pm
- Location: Barbados
Provider OUT_OF_SER
I have thought and have removed the message