PROBLEMS IN J2ME IN RECEIVING SIP MESSAGES IN NOKIA E60

Hello guys!
I'm currently developing an instant messaging for sip messages in the NOKIA E60 platform.
Registration process to the proxy functions properly, sending of messages to target URI functions properly, however, when a softphone send a sip mesage to the proxy-routing to my application. My application doesn't receive anything. I used the ethereal to see incoming frames in the proxy and i found out that Nokia E60 send a "bad media type mesasge" as a reply to the message. Any feedback in this matter ? My code is written below:
import javax.microedition.io.*;
import javax.microedition.sip.*;
import java.io.*;
import javax.microedition.lcdui.*;
public class UserForm extends List implements CommandListener
     //private variables
     private Command m_exit=null, m_select=null, m_back=null;
     public Databank m_data=null;
public IM_SIP m_sip=null;
public WriteForm m_writeForm=null;
public ReadForm m_readForm=null;
public PhoneBook m_book=null;
public RegisterThread m_register=null;
public void Stop_MainThread()
//m_game.stop_MainLoop();
public void cleanresource()
     try
          catch(Exception ex)
               System.out.println("UserForm"+ ex.toString());
     public Display getscreen()
return m_sip.m_disp;
     public void commandAction(Command cmd, Displayable disp)
          int index;
          index=this.getSelectedIndex();
          if(cmd==m_select)
//determine what the user wants
switch(index)
                    case 0://write message option
m_sip.m_disp.setCurrent(m_writeForm);
                    break;
                    case 1:
m_sip.m_disp.setCurrent(m_readForm);
break;
                    case 2:
                         m_sip.m_disp.setCurrent(m_book);
                    break;                    
                    case 3:
                    break;
          else if(cmd==m_exit)
               try{
m_sip.destroyApp(false);
m_sip.notifyDestroyed();
               m_sip=null;
               catch(Exception ex)
                    //System.out.println("UserForm Exit" + ex,toString());
                    System.out.println("UserForm_Exit:" + ex.toString());
          else if(cmd==m_back)
               this.setTitle("Instant Messaging SIP");
               //if(m_continue==false || multi==true){
          this.deleteAll();
                    this.removeCommand(m_back);
this.add_other_items();
                    this.addItems();
                    this.addSoftButtons();
               //else
               //     this.addContinue();
     private void addSoftButtons()
          this.addCommand(m_exit);
          this.addCommand(m_select);
     private void removeSoftButtons()
          this.removeCommand(m_exit);
     this.removeCommand(m_select);
     private void addItems()
          //this.append(new String("Write Message"), null);
//this.append(new String("Inbox"), null);
          this.append(new String("Phonebook"), null);
          this.append(new String("Options"), null);
public void add_other_items(){
     this.append(new String("Write Message"), null);
this.append(new String("Inbox"), null);
     public UserForm(IM_SIP p_sip)
     super("Instant Messaging SIP", List.IMPLICIT);
     //initialize all the important variables
System.out.println("INITIALIZING....");
     m_sip=p_sip;
     //this.addItems();
     m_exit=new Command("Exit", Command.EXIT, 1);
     //m_instform=new Instructionform("Game Instruction", this, new String("- Objectives: Get the flag of the enemy at all cost\n- For every you beat an officer, your score increses\n- Controls: Press the directional keys, 2, 4, 6, 8, press the ok button to confirm an action."));
m_select=new Command("Select", Command.SCREEN, 2);
     m_back=new Command("Back", Command.SCREEN, 1);
m_data=new Databank();
System.out.println("FINISHED DATABANK INITIALIZATIOn...");
System.out.println("FINISHED DATABANK2 INITIALIZATIOn...");
m_book=new PhoneBook(this);
System.out.println("FINISHED DATABANK3 INITIALIZATIOn...");
//m_game=new GameSurface(this, m_data);
//m_view=new ScoresView(m_data, this);
     this.addCommand(m_exit);
     this.addCommand(m_select);
     this.setCommandListener(this);
System.out.println("FINISHED DATABANK3 INITIALIZATIOn...4");
//m_register=new RegisterThread(this, m_readForm);
m_register=new RegisterThread(this);
m_register.start();
//m_readForm=new ReadForm(this);
//m_writeForm=new WriteForm(this, m_readForm);
/** Register Message Thread */
class RegisterThread extends Thread implements SipClientConnectionListener {
private int recTimeout = 0; // do not wait, just poll
public String message="";
//public String proxyAddress="[email protected]";
public String msgSubject="";
private UserForm form=null;
//private ReadForm m_read;
private SipClientConnection scc = null;
RegisterThread(UserForm p_form){
super();
form=p_form;
// m_read=p_read;
public void notifyResponse(SipClientConnection sc) {
try {
scc.receive(recTimeout);
form.add_other_items();
form.addItems();
form.append("Response register received: " + sc.getStatusCode() + " "
+ sc.getReasonPhrase(), null);
scc.close();
form.m_readForm=new ReadForm(form);
form.m_writeForm=new WriteForm(form, m_readForm);
//form.append(new String("Write Message"), null);
//form.append(new String("Inbox"), null);
} catch(Exception ex) {
form.append("MIDlet: exception " + ex.getMessage(), null);
ex.printStackTrace();
public void run() {           
try{
//try {
// if (waitFor!=null) {
// waitFor.join();
// } else {
// } catch (InterruptedException ie) {}
try{
scc = (SipClientConnection)Connector.open("sip:[email protected]:5060;transport=udp");//;transport=udp");
catch(Exception ex){
form.append("p1"+ex.toString(), null);
// form.append("P1", null);
try{
scc.setListener(this);
catch(Exception ex){
//form.append("p2"+ex.toString(), null);
// form.append("P2", null);
// scc.initRequest("REGISTER", m_read.m_read.scn);
try{
//scc.initRequest("REGISTER", m_read.m_read.scn);
scc.initRequest("REGISTER", null);
catch(Exception ex){
Alert alert = new Alert("Error");
alert.setType(AlertType.ERROR);
alert.setTimeout(3000); // display the alert for 3 secs
alert.setString(ex.toString());
//form.append("P3", null);
//form.append("SEND REGISTRATION1", null);
String adr = "<sip:[email protected]>";
try{
scc.setHeader("To", adr);
scc.setHeader("From", adr);
scc.setHeader("Contact", "sip:[email protected]:5060");
scc.setHeader("Content-Length", "0");
scc.setHeader("Max-Forwards", "6");
}catch(Exception ex){
Alert alert = new Alert("Error");
alert.setType(AlertType.ERROR);
alert.setTimeout(3000); // display the alert for 3 secs
alert.setString(ex.toString());
// uaStatus.setStatus(REGISTERING);
try{
scc.send();
}catch(Exception ex){
form.append("p4"+ex.toString(), null);
//form.append("SEND REGISTRATION2", null);
System.out.println("SYSTEM REGISTER SEND");
// uaStatus.waitUntilChanged();
// progressGaugeFinished = true;
}catch (Exception e) {
Alert alert = new Alert("Error");
alert.setType(AlertType.ERROR);
alert.setTimeout(3000); // display the alert for 3 secs
alert.setString(e.toString());
m_sip.m_disp.setCurrent(alert);
form.append(e.toString(), null);
// failMessage = e.getMessage();
// commandAction(failedCmd, currentDisplay);
// return;
}

Hey!
1. Nokia hides some folders containing system stuff, so that you don't accidentally delete something and mess things up. The computer sees more of them and can count them in, so...
2. It happens because your wallpapers are stored on the Mass storage/ Memory Card drive... And if you connect your phone to the computer, it won't be able to read any files on E/F drives as the computer acceses them.
3. They are! You just have to scroll down the list that pops up when you click on the widget
4. Try this one: to snooze an alarm, turn the phone on the other side, so that the scrren faces the table- it will shut up!
5. Nope, they're usable straight away
6. Don't really see what you mean... You want the messaging app shortcut to open up with folders (outbox, inbox, stuff like that?) I'm afraid it's not possible You'll have to access them via the options menu

Similar Messages

Maybe you are looking for

  • Error in Mail Sender Adapter

    Hi all, without any obvious reason i'm suddenly getting an error in the runtime workbench at the Communication Channel Monitoring: exception caught during processing mail message; java.io.IOException: unexpected greeting response; read * BYE Connecti

  • Are we hostages paying $50/month for the rest of our lives to open our projects?

    Adobe, I understand (in part) the switch to CC although I do think the $50 price point is on the high side for many people and maybe you could reintroduce suites that give us access to only products in our particular field for $20-$30. However, you h

  • Jpl problems with the lombard please help........#2 corrected

    It takes 1+1 starts (the last time) or 111 before and 11+1+1+11 another. But it will start up and it run well in 10.4.8 sometimes it crash (lately since the problem start never before) but other wise runs good. I have looking into your other similar

  • Folder Specified for Temporary Files is not Available

    Whenever I start PS CS, I get a "The Folder Specified for Temporary Files is not Available" error message. How do I fix this? Thanks! JB

  • Navigation Menu

    Ahh, the good old days when you could design your navigation bar in Photoshop with all your rollover and down images and then pop over to Image Ready and really get to work!  A much simpler, and inherently easier, method of accomplishing a task!!! I