Making a call

For making VoIP calls, a VoipAudioCall instance and a VoipAudioCallStateListener are used to establish a call. Listen for any call updates (call establishment, call termination, connection error). The startCall method receives as argument a boolean that allows the calling MIDlet to send its caller id to the remote party:

VoipAudioCall call = VoipManager.createVoipAudioMOCallInstance("The Voip Address of the remote party");
            call.setVoipAudioCallStateListener(new VoipAudioCallStateListener(){

                public void voipAudioCallUpdated(int state, int cause, int callid) {
                    /*
                     * This is triggered when a call is established, terminated
                     * or an error occurs.
                     */
                }
            });
            call.startCall(true);

For a list of states and causes see the VoIPStates and VoIPCauses class description respectively.