View Single Post
Old 05-10-2007, 03:23 PM   #3
jecortes77
New Member
 
Join Date: Feb 2006
Location: Colombia
Model: 8800
Carrier: Cingular
Posts: 12
Default

Quote:
Originally Posted by knifegun View Post
Not sure what you are asking. You can get a handle to an active call via the Phone.getActiveCall() API. You can also send DTMF tones with the active call handle. Does this answer your question?
Hi.

Thanks for the reply. I have already used this method but that does not answer my question.

What I need to do is the next:

Cancell and active call
Launch a new call and then send a dtmf tone (like the phone extension)

I have already done it with the java class EventInjector, but this class is only available in Blackberry Pearl and Blackberry 8800, and only works fine
in 8800 model, that`s why I´m trying other methods.

I have read that I could done this tasks using AT Commands. I know the command ATH can cancel a phone call.

The problem that I have now is that I can not get the available com ports in the simulator using the next code:

String ports = System.getProperty("microedition.commports");
Status.show("Available ports: "+ports,
Bitmap.getPredefinedBitmap(Bitmap.EXCLAMATION), 3000,
Status.GLOBAL_STATUS, true, false, 2);

This shows nothing.

I´m trying to send the AT command like this:

CommConnection commConn;
commConn = (CommConnection) Connector.open("comm:COM4;" +"baudrate=115200", Connector.READ_WRITE,true);
iStream = commConn.openInputStream();
oStream = commConn.openOutputStream();
String sMessage = "ATH";
oStream.write(sMessage.getBytes());


This throws a nullpointer exception.

When I look at the Device Manager I can see a port called RIM Virtual Serial Port(COM4).

Can you help me please with this problem?
Offline