Not able to send SIP notify to end points using IPV6 address

198 views Asked by At

I am trying to send notify to an endpoint having IPV6 address. But getting an exception.

Exception javax.sip.SipException: Cannot assign requested address: Datagram send failed

After doing some search i found that destination might be invalid but thats not the case.I can ping it.

here is the part of the code.

   try{
        Request notifyRequest = notifyReqBuilder.createOutOfDialogNotify( deviceNumber, destination, destPort, isRestart);  
        if (notifyRequest == null)
        {
            logger.error(" Unable to create check-sync Notify Request");
        }
        // Create the client transaction.
        ClientTransaction trans= sipLayer.sipProvider.getNewClientTransaction(notifyRequest);
        trans.sendRequest(); // Send it out-of-dialog
        trans.setApplicationData(this); 
    }
    catch(Exception e){     
        this.logger.error("[SIP]: {}; {}", "Unable to send Notify Request", ExceptionUtil.toString(e));
    }

And this is the Notify request headers:

    NOTIFY sip:Unknown@[2620:0:60:c0e:1d20:38b7:3dc5:bf22]:5060 SIP/2.0
    Call-ID: [email protected]
    CSeq: 1 NOTIFY
    From: <sip:[email protected]>;tag=43d26359
    To: <sip:Unknown@[2620:0:60:c0e:1d20:38b7:3dc5:bf22]:5060>
    Via: SIP/2.0/UDP [2620:0:60:c00:59d9:d2ec:ee4a:f884]:5160;branch=z9hG4bK224d02bd0529e1b215bddfc002165660363434
    Max-Forwards: 20
    Contact: "xxxx" <sip:xxx@[2620:0:60:c00:59d9:d2ec:ee4a:f884]:5160>
    Subscription-State: terminated
    Event: check-sync
    Content-Length: 0

If i use IPV4 address instead of IPV6 then it works perfectly fine.

I am sorry i have hidden the names since i dont want to disclose it but same names are working with IPV4.

It will be great if i can get some idea why this is happening.

Edit : I am using jain SIP version 1.2

1

There are 1 answers

2
Vladimir Ralev On

Post the full stack trace and your stack/JVM properties. It must have to do with the binding address. This is most likely an OS or JVM problem. Try repeating the ipv6 connection from an independent test tool like netcat to verify. There are many settings in the OS that will block ipv6 connection attempts.