Menu

How to register at a Registrar Server

tim
2005-08-17
2013-04-01
  • tim

    tim - 2005-08-17

    When I try to register, some informations in the header fields are missing:
    - the portnumber and the ;branch=.. in the VIA.
    - the ;tag=... in the FROM

    I don't know if its my fault or a bug in the library.
    My code is as follows:

    SipClient client = SipClient.getSipClient();
    SipUri myUri = new SipUri("sip:tim@192.166.1.13");
    SipUser user = new SipUser(client, myUri);
    SipRegister sipReg = user.addServer("140.117.52.5");
    SipCall sipCall = sipReg.getRegisterCall();
    SipTransaction sipTrans = sipCall.newRegister(new SipUri("sip:140.117.52.5"), false);

    When I change the library and hardcode the missing strings I get a response from the registrar

     
    • Steve Jones

      Steve Jones - 2005-08-17

      Hi,

      I don't see anything obviously wrong with your code. I did have a couple fixes in the cvs repository that aren't in the distribution -- possibly a fix may be in there. However, I haven't touched the code in quite a while, so it is also quite possible that the classes involved do need to be modified (though it is quite encouraging that you're able to get a response by hardcoding those tags in).

      regards,
      Steve

       
      • tim

        tim - 2005-08-17

        Thank you for that fast reply.
        The only problem with that hardcoding is in the VIA field the portnumber . Everytime JSIP use a different portnumber and so its just luck if my string matches the choosen portnumber. I don't found the class where I can set my own portnumber (would take just a fixed one).

         

Log in to post a comment.

MongoDB Logo MongoDB