08-30-2010 02:28 PM
Normally when placing a call I do it like this:
PhoneArguments pa =
new PhoneArguments(PhoneArguments.ARG_CALL, newNumber);
What I wonder is if it is possible to first invoke the phone and then send dtmf-tones instead?
Solved! Go to Solution.
09-01-2010 03:55 PM
Yes, you can invoke the phone application to make a phone call and then inject DTMF tones into the call. After invoking the phone application to dial a number use the Phone.getActiveCall() method to obtain an instance of PhoneCall, then use it to call the sendDTMFTone(s) methods.
09-02-2010 01:26 PM
Must be doing something wrong. ph is always null;
comm.HandleAlert(settings.Debug, "PlaceCall, sleep failed: " + e33, 0);
PhoneCall ph = Phone.getActiveCall();
comm.HandleAlert(settings.Debug, "PlaceCall2 ph == null",0);
09-02-2010 03:24 PM
Passing in null will only launch the phone application. It won't dial out/create an outbound call.
You'll need to specify a number when invoking the phone application to dial out. Once the call has been made you can inject DTMF tones into the call.
09-02-2010 03:33 PM
That I do already. My original question was not clear enough. The problem I have with placing a call the "ordinary" way is that it really does not give any feedback whatsoever.
PhoneArguments pa = new PhoneArguments(PhoneArguments.ARG_CALL, Number,false);
So I wondered if I could establish a connection and then inject DTMF tones.
The problem I am trying to circumvent is that I get "Call Failed" with description "General Error" now and then when making a call the ordinary way so I would like to do the call in steps that can be monitored, like 1. get a line, 2 get contact. 3. dial a number
09-02-2010 03:36 PM
The PhoneListener is the closest you'll get to that. Your application can be alerted if the call was answered, failed, busy, etc...
09-02-2010 04:22 PM
thats what I got already. "General Error". Get the "Call Failed", "General Error" now and then. DOes not seem possible to intercept that and try again, the message displays on screen. Thats why I was looking for an alternate way.