3 Replies Latest reply: Oct 4, 2008 12:49 AM by 843853 RSS

    Problem in developing a SIP registrar.

      i want to develop a registrar by using JAIN SIP API.
      when i use the Windows Messenger(WM for short) as a SIP client to test my registerar, i get a problem.

      when WM logs out, it sends a REGISTER request(M1 for short) to my registrar as following:
      REGISTER sip:aaa.de SIP/2.0
      Via: SIP/2.0/UDP
      Max-Forwards: 70
      From: <sip:111@aaa.de>;tag=0df7acbc79164dc9910c4f6432a0ef02;epid=50a1ddb3e8
      To: <sip:111@aaa.de>
      Call-ID: 42d12646ab34406cab5b9c920bd03dd2
      CSeq: 2 REGISTER
      User-Agent: RTC/1.3.5470 (Messenger 5.1.0701)
      Expires: 0
      Event: registration
      Content-Length: 0

      then my registrar sents a response(M2 for short) to answer WM like this:
      SIP/2.0 200 OK
      Via: SIP/2.0/UDP
      From: <sip:111@aaa.de>;tag=0df7acbc79164dc9910c4f6432a0ef02;epid=50a1ddb3e8
      To: <sip:111@aaa.de>
      Call-ID: 42d12646ab34406cab5b9c920bd03dd2
      CSeq: 2 REGISTER
      Content-Length: 0

      it looks good so far. but WM does not log out successfully after M2 received and resends the M1. so my registrar again sends M2 to answer M1.

      i checked the log of my registrar and used Etherreal to capture the messages sended and received by WM. they both show that WM keeps on sending M1 for 11 times before it logs out finally.

      i tried to use some other kinds of SIP client(e.g. a SIP phone). they works well with my registrar.
      so i suppose WM maybe does not like some part of my response(M2) or need some special headers added into M2.

      does anybody get similar problem before? please kindly give me some advice.

      thanks in advance.

        • 1. Problem in developing a SIP Proxy Server

          I got error 500 Internal Server Error when i send a text message from jain-sip client, Client send the Text message to server but server return the above error.
          There is no Text Message Handler Code in Server Proxy Class,

          Also when i try to start Voice Connversation, Client sent a INVITE request to server but server return 500 Server Intnal Error. also there is no INVITE handler code in Server Proxy Class.

          I am using jain-sip-presence-proxy SIP server and jain-sip-applet-phone.

          please help me .......................................Its Urgent

          why server could not handle the text or voice messages.
          How i make the text and voice conversation.

          with regards
          • 2. Re: Problem in developing a SIP registrar.
            The reason is below (I posted on the NIST forum):

            The JAIN-SIP 1.1 proxy, presence server has a bug when processing the register requests. It does not copy the ExpiresHeader and ContactHeader from the original request to the response.

            In the line: 367
            Response response = messageFactory.createResponse(Response.OK, request);

            In the API (Response createResponse(int statusCode, Request request) throws ParseException)), it says "This new Response does not contain a body. Only the required headers are copied from the Request."

            So I guess the ExpiresHeader and ContactHeader are ignored in this method. However, the ExpiresHeader is necessary for the UA to deal with register OK correctly. In the applet phone \src\gov\nist\applet\phone\ua\MessageProcessor.java
            line: 681-696. Without the ExpiresHeader, the state of the registration process cannot be set.

            I added a few lines in the Registrar.java at the proxy side as follows:
            after the line 367

            if(request.getHeader(ExpiresHeader.NAME) != null)

            Now, the ua seems OK.


            • 3. Re: Problem in developing code a pc to fax.
              this is vinod .I would like get valueable information from u.

              I need webbased javacode for sending messages from pc to fax machine.