IPV6 アドレスを持つエンドポイントに通知を送信しようとしています。しかし、例外が発生します。
Exception javax.sip.SipException: Cannot assign requested address: Datagram send failed
いくつかの検索を行った後、宛先が無効である可能性があることがわかりましたが、そうではありません.pingできます.
これがコードの一部です。
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));
}
そして、これは Notify リクエスト ヘッダーです。
NOTIFY sip:Unknown@[2620:0:60:c0e:1d20:38b7:3dc5:bf22]:5060 SIP/2.0
Call-ID: 95b841f266c69074f380e93bd9c14c25@172.21.82.85
CSeq: 1 NOTIFY
From: <sip:abc@xx.xxxx.com>;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
IPV6 の代わりに IPV4 アドレスを使用すると、完全に正常に動作します。
公開したくないので名前を非表示にして申し訳ありませんが、同じ名前が IPV4 で動作しています。
なぜこれが起こっているのかを理解できれば素晴らしいことです。
編集:jain SIPバージョン1.2を使用しています