0

リクエストを送信してレスポンスを受信する Jain Sip アプリケーションを構築しています。応答が受信されない場合は、コードで処理する必要がありますが、processTimeout 関数を起動する前のデフォルトの遅延が長すぎます (~32 秒)。どうすれば最小化できますか?

以下は私のコードのスニペットです:

//Sending the request statfully:
sendRegisterStateful{
ClientTransaction transaction = this.sipProvider.getNewClientTransaction(request);
// Send the request statefully, through the client transaction.
transaction.sendRequest();

//Process timeout function:
public void processTimeou{
//Need to fire the timeout here after 7sec instead of ~32s
}

ありがとう、サリム

4

2 に答える 2

0

SIPTransaction クラス (Jain Sip Lib) のタイマー係数を編集して問題を解決しました。元の値は 64 でしたが、新しい値は 14 になりました。タイムアウト係数のデフォルト: 64。ミリ秒単位のデフォルトのタイムアウト値 = 500*64 = 32000ms したがって、デフォルトのタイムアウト 32000ms -> 7000ms を最小化するために、64 の値を最小化しました。

class SIPTransaction{ 
......
protected static final int TIMER_B = 14;

protected static final int TIMER_J = 14;

protected static final int TIMER_F = 14;

protected static final int TIMER_H = 14;
.......
}
于 2014-04-24T08:45:57.340 に答える