×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    217

    SIP Error in SipClientConnection

    Hi,

    when i send a sip message, i receive an IOexception: .. Error code=-17709.

    The midlet works correctly in the emulator but in the nokia N80 doesn't work.
    The examples of the jsr180 RI doesn't work neither.

    Cheers,
    Benji.

  2. #2
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: SIP Error in SipClientConnection

    Have you checked if your operator supports SIP traffic?

    Hartti

  3. #3
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    217

    Re: SIP Error in SipClientConnection

    hi,

    Now it's working well but i've had to change some properties of the examples.
    Anyway, is there any document that describes the error codes of sip exceptions?

    Cheers,
    Benji.

  4. #4
    Registered User
    Join Date
    May 2003
    Posts
    18

    Re: SIP Error in SipClientConnection

    which parameters did you have to change. Plz post the difference, if nothing but the names of the fields you changed.

  5. #5
    Registered User
    Join Date
    Jan 2008
    Posts
    4

    Re: SIP Error in SipClientConnection

    Can you please share what all changes you made in properties?
    I am also dacing same problem.

  6. #6
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    217

    Re: SIP Error in SipClientConnection

    Hi,

    I don't remember what was the problem and obviously the solution, but I have found this code. I am not sure that this code works but you could try to use it. If you need anything else, as the register method or any other code, just tell me.

    private void message(String msg) throws Exception
    {
    String url = "sip:dir@" + realm + ":" + proxyPort;
    SipClientConnection sipClientConn = (SipClientConnection)Connector.open(url);

    sipClientConn.initRequest("MESSAGE", null);
    sipClientConn.setHeader("From", sipAddress);
    //sipClientConn.setHeader("Contact", contactAddress);
    sipClientConn.setListener(this);
    sipClientConn.setCredentials(user, password, realm);
    sipClientConn.setHeader("Content-Type","text/plain");
    sipClientConn.setHeader("Content-Length","" + msg.length());

    OutputStream outStream = sipClientConn.openContentOutputStream();

    outStream.write(msg.getBytes());
    outStream.close();
    }


    Cheers.

  7. #7
    Registered User
    Join Date
    Jan 2008
    Posts
    4

    Re: SIP Error in SipClientConnection

    I have the code similar to you... When I am trying to close the output stream
    outStream.close();
    I get symbian error code: 17709 which says

    KErrSIPInvalidRegistrationState

    See if you can help

  8. #8
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    217

    Re: SIP Error in SipClientConnection

    More code. Try this.


    private void startListener(String ip) throws IOException{
    if(sipNotifier != null){
    sipNotifier.close();
    }
    // No está soportado (bug) el abrir un puerto en modo dedicado (sip:5060)
    // Lo reservamos en modo compartido e identificamos nuestra aplicación con el tipo de application
    // En teoría se registra sólo con este modo pero peta por el formato de una cabecera
    // Vamos a intentar autoregistrarnos aunque intuyo que las notificaciones no van a llegar
    sipNotifier = (SipConnectionNotifier)Connector.open("sip:*;type=\""+ accept_contact +"\"");
    sipNotifier.setListener(this);

    contactAddress = "sip:" + ip/*sipNotifier.getLocalAddress() */+ ":" + sipNotifier.getLocalPort();
    }

    private void register() throws IOException{
    SipClientConnection sipClientConn = (SipClientConnection)Connector.open
    ("sip:" + sipAddress + ":" + proxyPort);
    sipClientConn.initRequest("REGISTER", sipNotifier);
    sipClientConn.setHeader("From", "sip:" + nick + ".dir@" + realm);
    //Sólo lo puede poner el sistema
    //sipClientConn.setHeader("Max-Forwards", "30");
    sipClientConn.setHeader("User-Agent", "GameClient/v0.1");
    sipClientConn.setHeader("To", "sip:" + nick + ".zandor@" + realm);
    sipClientConn.setHeader("Accept-Contact", "*;type=\"" + accept_contact + "\"");

    //sipClientConn.setHeader("Contact", contactAddress + ";q=1.00;methods=\"INVITE,NOTIFY,MESSAGE,BYE,ACK,CANCEL\";expires=600");
    sipClientConn.setHeader("Contact", "<"+contactAddress+">" + ";methods=\"INVITE,NOTIFY,MESSAGE,BYE,ACK,CANCEL\"");

    sipClientConn.setCredentials(user, password, realm);
    sipClientConn.setListener(this);

    sipClientConn.send();
    }


    I have seen in my comments that the dedicated mode is not supported (sip:5060) due to a bug, so you have to map your application with a type of application ("sip:*;type=\""+ accept_contact +"\"") in order to receive the messages.

    I hope this code works fine.

    Cheers.
    Benji.

  9. #9
    Regular Contributor
    Join Date
    Aug 2007
    Posts
    74

    Re: SIP Error in SipClientConnection

    Hi,

    You must register first, before it is possible to send the MESSAGE. Otherwise you get the error -17709 KErrSIPInvalidRegistrationState.

    -jp

Similar Threads

  1. Test SIP applications on device
    By razas in forum Symbian Networking & Messaging (Closed)
    Replies: 5
    Last Post: 2008-08-17, 14:16
  2. JAIN SIP and Symbian C++ SIP
    By RyanSantos in forum Symbian Networking & Messaging (Closed)
    Replies: 11
    Last Post: 2008-07-25, 15:44
  3. Sip 3rd Edition beta sdk
    By eob123 in forum Symbian
    Replies: 1
    Last Post: 2005-12-02, 16:52
  4. Problem with SIP Plug-in for Series 60 SDK 2.0
    By jalakuri in forum Symbian Tools & SDKs
    Replies: 27
    Last Post: 2005-08-22, 09:55
  5. Adding new SIP profiles to SIP Settings?
    By jrantam in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2005-03-02, 10:56

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×