Added settings for some H.323 timeouts, some may be too tight by OpenH323 default.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5303 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
54e516054f
commit
e827183b56
|
@ -171,6 +171,18 @@ gw = false
|
|||
; Defaults to 65535
|
||||
;bind_maxport=65535
|
||||
|
||||
; timeout_control: integer: Control channel start timeout in msec
|
||||
; Valid range 5000 to 600000 (5s to 10m), library default 2m
|
||||
;timeout_control=120000
|
||||
|
||||
; timeout_answer: integer: Answer timeout (maximum time until CONNECT) in msec
|
||||
; Valid range 10000 to 600000 (10s to 10m), library default 1m
|
||||
;timeout_answer=60000
|
||||
|
||||
; timeout_capabilities: integer: Capability exchange timeout in msec
|
||||
; Valid range 1000 to 120000 (1s to 2m), library default 30s
|
||||
;timeout_capabilities=30000
|
||||
|
||||
; alias: string: The alias used by h323 module to connect to gatekeeper
|
||||
alias = yate
|
||||
|
||||
|
|
|
@ -461,6 +461,8 @@ public:
|
|||
protected:
|
||||
virtual void OnRegistrationReject();
|
||||
bool initInternal(bool reg, const NamedList* params);
|
||||
void initTimeout(PTimeInterval& interval, const String& name,
|
||||
const NamedList& params, long minVal, long maxVal = 600000);
|
||||
void setCodecs();
|
||||
bool internalGkClient(YateGkRegThread* thread, int mode, const PString& name);
|
||||
void internalGkNotify(bool registered, const char* reason = 0, const char* error = 0);
|
||||
|
@ -1105,6 +1107,19 @@ void YateH323EndPoint::OnRegistrationReject()
|
|||
internalGkNotify(false,"Registration failed","noauth");
|
||||
}
|
||||
|
||||
void YateH323EndPoint::initTimeout(PTimeInterval& interval, const String& name,
|
||||
const NamedList& params, long minVal, long maxVal)
|
||||
{
|
||||
long int msec = params.getIntValue(name);
|
||||
if (msec <= 0)
|
||||
return;
|
||||
if (msec < minVal)
|
||||
msec = minVal;
|
||||
else if (msec > maxVal)
|
||||
msec = maxVal;
|
||||
interval = msec;
|
||||
}
|
||||
|
||||
bool YateH323EndPoint::initInternal(bool reg, const NamedList* params)
|
||||
{
|
||||
Lock lck(m_mutex);
|
||||
|
@ -1117,6 +1132,11 @@ bool YateH323EndPoint::initInternal(bool reg, const NamedList* params)
|
|||
SetSilenceDetectionMode(static_cast<H323AudioCodec::SilenceDetectionMode>
|
||||
(params ? params->getIntValue("silencedetect",dict_silence,H323AudioCodec::NoSilenceDetection)
|
||||
: H323AudioCodec::NoSilenceDetection));
|
||||
if (params) {
|
||||
initTimeout(controlChannelStartTimeout,YSTRING("timeout_control"),*params,10000);
|
||||
initTimeout(signallingChannelCallTimeout,YSTRING("timeout_answer"),*params,5000);
|
||||
initTimeout(capabilityExchangeTimeout,YSTRING("timeout_capabilities"),*params,1000,120000);
|
||||
}
|
||||
// Init authenticators
|
||||
m_authMethods.clear();
|
||||
m_authUseAll = false;
|
||||
|
|
Loading…
Reference in New Issue