[SIPForum-discussion] javax.sip.SipException: IO Error sending request

Raziya Mandani raziyamandani at gmail.com
Thu Dec 4 04:24:37 UTC 2008


Hi All,

I am trying to send an invite to "callee". Given below is the snippet, what
I get is an
javax.sip.SipException: IO Error sending request:

*The code:*

try {
            calleeAddress = addressFactory.createAddress(participant);
            log.info("The callee is:" +calleeAddress);
            callerAddress = addressFactory.createAddress(confname);
            log.info("The caller is:" +callerAddress);
            callerAddress.setDisplayName(confname);

            Request request = this.buildInvite(calleeAddress, callerAddress,
null, 1, null);
            ClientTransaction ct =
sipProvider.getNewClientTransaction(request);

            Header h = ct.getRequest().getHeader(CallIdHeader.NAME);
            String calleeCallId = ((CallIdHeader) h).getCallId();

            Session calleeSession = new Session(calleeCallId);
            calleeSession.setSipAddress(calleeAddress);
            calleeSession.setToBeCancelledClientTransaction(ct);

            Dialog dialog = ct.getDialog();
            if (dialog != null && log.isDebugEnabled()) {
                log.debug("Obtained dialog from ClientTransaction :
automatic dialog support on");
            }
            if (dialog == null) {
                // Automatic dialog support turned off
                try {
                    dialog = sipProvider.getNewDialog(ct);
                    if (log.isDebugEnabled()) {
                        log.debug("Obtained dialog for INVITE request to
callee with getNewDialog");
                    }
                } catch (Exception e) {
                    log.error("Error getting dialog", e);
                }
            }


            if (log.isDebugEnabled()) {
                log.debug("Obtained dialog in onThirdPCCTriggerEvent :
callId = " + dialog.getCallId().getCallId());
            }
            // Get activity context from factory
            ActivityContextInterface sipACI =
sipACIF.getActivityContextInterface(
                    dialog);

            ActivityContextInterface clientSipACI = sipACIF
                    .getActivityContextInterface(ct);

            calleeSession.setDialog(dialog);
            Session callerSession = new Session();

            callerSession.setSipAddress(callerAddress);
            callerSession.setToBeCancelledClientTransaction(null);

            sipACI.attach(this.sbbContext.getSbbLocalObject());

            //Send the INVITE request
            ct.sendRequest(); *//This line is the cause of the error thrown*

            aci.detach(this.sbbContext.getSbbLocalObject());

        } catch (java.text.ParseException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (InvalidArgumentException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (TransactionUnavailableException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (FactoryException e) {

            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (NullPointerException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (UnrecognizedActivityException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (SipException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
*
Here is the log:*

20:22:00,340 ERROR [STDERR] javax.sip.SipException: IO Error sending request
20:22:00,341 ERROR [STDERR]     at
gov.nist.javax.sip.stack.SIPClientTransaction.sendRequest(SIPClientTransaction.java:990)
20:22:00,341 ERROR [STDERR]     at
org.mobicents.slee.resource.sip.wrappers.ClientTransactionWrapper.sendRequest(ClientTransactionWrapper.java:44)
20:22:00,341 ERROR [STDERR]     at
org.mobite.mucc.slee.callcontrol.dialout.DialoutSbb.onInvokeDialout(DialoutSbb.java:154)
20:22:00,341 ERROR [STDERR]     at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
20:22:00,341 ERROR [STDERR]     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
20:22:00,341 ERROR [STDERR]     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
20:22:00,341 ERROR [STDERR]     at
java.lang.reflect.Method.invoke(Method.java:585)
20:22:00,341 ERROR [STDERR]     at
org.mobicents.slee.runtime.sbbentity.SbbEntity.invokeEventHandler(SbbEntity.java:871)
20:22:00,341 ERROR [STDERR]     at
org.mobicents.slee.runtime.EventRouterImpl.routeQueuedEvent(EventRouterImpl.java:892)
20:22:00,341 ERROR [STDERR]     at
org.mobicents.slee.runtime.EventRouterImpl.access$100(EventRouterImpl.java:64)
20:22:00,341 ERROR [STDERR]     at
org.mobicents.slee.runtime.EventRouterImpl$EventExecutor.run(EventRouterImpl.java:121)
20:22:00,342 ERROR [STDERR]     at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
20:22:00,342 ERROR [STDERR]     at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
20:22:00,342 ERROR [STDERR]     at java.lang.Thread.run(Thread.java:595)
20:22:00,342 ERROR [STDERR] Caused by: java.io.IOException: Invalid argument
20:22:00,342 ERROR [STDERR]     at
java.net.PlainDatagramSocketImpl.send(Native Method)
20:22:00,342 ERROR [STDERR]     at
java.net.DatagramSocket.send(DatagramSocket.java:612)
20:22:00,342 ERROR [STDERR]     at
gov.nist.javax.sip.stack.UDPMessageChannel.sendMessage(UDPMessageChannel.java:676)
20:22:00,342 ERROR [STDERR]     at
gov.nist.javax.sip.stack.MessageChannel.sendMessage(MessageChannel.java:233)
20:22:00,342 ERROR [STDERR]     at
gov.nist.javax.sip.stack.SIPTransaction.sendMessage(SIPTransaction.java:738)
20:22:00,343 ERROR [STDERR]     at
gov.nist.javax.sip.stack.SIPClientTransaction.sendMessage(SIPClientTransaction.java:486)
20:22:00,343 ERROR [STDERR]     at
gov.nist.javax.sip.stack.SIPClientTransaction.sendRequest(SIPClientTransaction.java:986)
20:22:00,343 ERROR [STDERR]     ... 13 more

If someone could please help me with this asap.

Thanks and regards,
Raziya
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sipforum.org/pipermail/discussion/attachments/20081204/48a54524/attachment-0002.html>


More information about the discussion mailing list