Troubleshooting guide

186
BlackBerry Java Development Environment Development Guide
Add DTMF tones to the send queue
BlackBerry DTMF tones
BlackBerry® devices play DTMF tones as soon as no other tones are pending.
DTMF tones consist of a low and a high frequency, which are played at the same time.
Retrieve phone call information. > Use the methods of the PhoneCall class.
int threshold = 120; // Alert user if outgoing calls last longer than
threshold.
int elapsedTime = call.getElapsedTime();
// Use getStatusString() to retrieve status as an string.
int status = call.getStatus();
if ((status == PhoneCall.STATUS_CONNECTED || status ==
PhoneCall.STATUS_CONNECTING) && call.isOutGoing() && elapsedTime >
threshold) {
// Use getCallId() to retrieve the caller ID as as an integer.
String phoneNumber = call.getDisplayPhoneNumber();
Status.show("Your call to " + phoneNumber + " has lasted more than "
+ (String)threshold + ".");
}
Task Steps
Add a single DTMF tone to the send
queue.
>Invoke sendDTMFTone().
Add multiple DTMF tones to the send
queue.
>Invoke sendDTMFTones().
Retrieve the send queue for the current
call.
>Invoke getDTMFTones().
Key Low Tone (Hz) High Tone (Hz)
1 697 1209
2 697 1336
3 697 1477
4 770 1209
5 770 1336
6 770 1477
7 852 1209
8 852 1336
9 852 1477
0 941 1209
* 941 1336
# 941 1477
Task Steps