1 Reply Latest reply on Jun 22, 2011 9:49 AM by Kai-Oracle

    Not able to send invite from Sip servlets to X-lite client (Sip server)??

      When deployed using Weblogic Sip server..The code first handles the register request ,then send the invite to the same X-lite client whcih registered...It got registerd but fail to send the Invite request......here is the code and error which I got which I deployed.however this file run correctly on SAILFIN server,as it registered and sent Invite to ,got the X-lite ringing..Please help me to reolve the error....Find the details below.......PLssss help me to run it on Weblogic Sip server to send the invite..
      package aa;

      import java.io.IOException;
      import java.net.InetAddress;

      import javax.annotation.Resource;
      import javax.servlet.ServletException;
      import javax.servlet.ServletRequest;
      import javax.servlet.ServletResponse;
      import javax.servlet.sip.Address;
      import javax.servlet.sip.SipApplicationSession;
      import javax.servlet.sip.SipFactory;
      import javax.servlet.sip.SipServlet;
      import javax.servlet.sip.SipServletRequest;
      import javax.servlet.sip.SipServletResponse;
      import javax.servlet.sip.SipURI;

      * Servlet implementation class GenericServlet2

      public class GenericServlet2 extends SipServlet {
           //private static final long serialVersionUID = 1L;
           private static final boolean DEBUG = true;
           @Resource private SipFactory sf;
           public void doRegister(SipServletRequest req)
      throws IOException, ServletException {
      System.out.println("babaaaaa gg plsssschalalal deeooo vajeeballeeeshuruuuulleebaiiiipleaaasssssssNew tryyyyypLEASEEE YOU ARE VER-VERRRYYY FINALLL alllllwaysssssss welcome waheguruuu ggggJOOO- BOLE -SONIAHAALLLLL");

      SipApplicationSession appSession = sf.createApplicationSession();

      Address inviteSource = sf.createAddress(req.getHeader("Contact"));
      //Address inviteSource = sf.createAddress((SipURI)req.getFrom().getURI());

      SipServletRequest inviteRequest=sf.createRequest(appSession, "INVITE", "sip:appsserver@"+InetAddress.getLocalHost().getHostAddress()+InetAddress.getLocalHost()+":5060",req.getHeader("Contact"));

      System.out.println("invite source: "+inviteSource);
      debug("Received REGISTER: " + req.getRequestURI());
      debug("--------------\n"+req.toString() +"\n----------------------");
      System.out.println("entering the handle register");

      System.out.println("Judt to see the Response");
      SipServletResponse res = req.createResponse(200);


      debug(" sending out: ------------------\n" + res.toString() +"\n----------------");
           private static void debug(String msg) {
                if (DEBUG) System.out.println("#### Registrar ####> " + msg);

      * @see SipServlet#SipServlet()

      * @see SipServlet#SipServlet()


      <Jun 3, 2011 4:36:44 PM CDT> <Warning> <WLSS.CallState> <BEA-331000> <An I/O error occurred while trying to send a SIP Message using UDP to /
      java.net.BindException: Cannot assign requested address: no further information
           at sun.nio.ch.DatagramChannelImpl.send0(Native Method)
           at sun.nio.ch.DatagramChannelImpl.sendFromNativeBuffer(DatagramChannelImpl.java:301)
           at sun.nio.ch.DatagramChannelImpl.send(DatagramChannelImpl.java:265)
           at sun.nio.ch.DatagramChannelImpl.send(DatagramChannelImpl.java:250)
           at com.bea.wcp.sip.engine.connector.transport.UdpConnection.send(UdpConnection.java:438)
           Truncated. see log file for complete stacktrace
      <Jun 3, 2011 4:36:44 PM CDT> <Error> <WLSS.Session> <BEA-331413> <No dispatcher found. failed to forward request (503/INVITE).>

      The invite reuset which I generated is as
      INVITE sip:jagdeep@;rinstance=9710b8d22873d429 SIP/2.0
      To: <sip:jagdeep@;rinstance=9710b8d22873d429>
      Via: SIP/2.0/UDP
      CSeq: 1 INVITE
      Content-Length: 0
      Call-ID: wlss-1c6802b8-Mzc1MDNmOGEzMjRjMGMyZmRkZWM0ZTk0MjhlMGE5ZGQ.
      Max-Forwards: 70
      From: <sip:appsserver@>;tag=ef648e98
      Contact: sip:wlssuser@wlsshost.bea.com