08-26-2010 02:25 PM
I have an application that, among other things, kills a call the user does and calls another number.
Works fine most of the time. A little to often I get "Call Failed" on the second call. And for no apparent reason. I had an issue with placing the new call instantly after killing the first call that resulted in that the secon call got killed too. A bit weird. The first call is killed in "CallInitiated". I tried to use the Listener hooks on "CallEnded" to determine when I could place the second call. Does not work since the call is killed before it is connected. Tried to check with Phone.getactiveCall if it was null. Did not work either.
So I had to opt for fixed wait before placing the second call. It seems to work with a wait of 100 ms.
It does not matter if I use 100 ms or 750 ms, I still get to many failures and there seem to be no
regularity to it. It seems that I have to check if the call gets placed OK but the making of the call
seems to give no return code
PhoneArguments pa = new PhoneArguments(PhoneArguments.ARG_CALL, Number);
Most of the time (Maybe every time) I get the three tones Di, Di, Da. Failure rate is around 25% but I can get 10 good calls in a row, and 3-4 bad calls in a row. I can log my debugging and I have lots of debug statements but its nothing there.
Environment OS 5.0, Blackberry Bold
Any ideas anyone?
08-30-2010 10:11 AM
In those cases where I get "Call Failed" the ever present message "Call Forwarding - Conditional" has not been flashed on the screen.
I can think of possible scenarios:
1. I am not in contact with my mobile operator
2. Some kind of conflict between receiving the message and placing my call
08-31-2010 02:54 PM - edited 08-31-2010 03:37 PM
Diagnosing the intermittent error it shows "General Error" every time it happens. and it happens in about 20% of the tries.
Putting a 3 seconds sleep between killing the call and starting a new one seems to result in a significant improvement. I do not hink that is accepable. Is there some way to find out if the
phone is ready to take an outbound call?