Added a "reset" control command to fast reset ISUP circuits.
Default reset interval for both ISUP and ISDN is 300s with 60s minimum. git-svn-id: http://voip.null.ro/svn/yate@3404 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
0f09c45fb8
commit
d49b070451
|
@ -108,7 +108,7 @@
|
|||
; The call controller will notify the other side of the link of idle channels
|
||||
; Set to 0 to disable
|
||||
; Invalid values default to minimum (60s)
|
||||
;channelsync=1000
|
||||
;channelsync=300
|
||||
|
||||
; channellock: integer: Maximum time (in ms) spent trying to lock a remote channel
|
||||
; Invalid values default to minimum (2500ms)
|
||||
|
@ -313,7 +313,7 @@
|
|||
; The call controller will notify the other side of the link of idle channels
|
||||
; Set to 0 to disable
|
||||
; Defaults to minimum value (60s) if missing or invalid
|
||||
;channelsync=1000
|
||||
;channelsync=300
|
||||
|
||||
; sls: integer or keyword: Default Signaling Link Selection in outbound calls
|
||||
; Allowed values:
|
||||
|
|
|
@ -171,6 +171,7 @@ static const TokenDict s_dict_control[] = {
|
|||
{ "validate", SS7MsgISUP::CVT },
|
||||
{ "query", SS7MsgISUP::CQM },
|
||||
{ "conttest", SS7MsgISUP::CCR },
|
||||
{ "reset", SS7MsgISUP::RSC },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
@ -2447,6 +2448,7 @@ SS7ISUP::SS7ISUP(const NamedList& params, unsigned char sio)
|
|||
m_uptCicCode(0),
|
||||
m_rscTimer(0),
|
||||
m_rscCic(0),
|
||||
m_rscSpeedup(0),
|
||||
m_lockTimer(0),
|
||||
m_lockGroup(true),
|
||||
m_lockNeed(true),
|
||||
|
@ -2512,7 +2514,8 @@ SS7ISUP::SS7ISUP(const NamedList& params, unsigned char sio)
|
|||
if (-1 == lookup(m_callerCat,s_dict_callerCat,-1))
|
||||
m_callerCat = "ordinary";
|
||||
|
||||
m_rscTimer.interval(params,"channelsync",60,1000,true,true);
|
||||
m_rscTimer.interval(params,"channelsync",60,300,true,true);
|
||||
m_rscInterval = m_rscTimer.interval();
|
||||
m_lockTimer.interval(params,"channellock",2500,10000,false,false);
|
||||
|
||||
// Remote user part test
|
||||
|
@ -2898,6 +2901,10 @@ void SS7ISUP::timerTick(const Time& when)
|
|||
return;
|
||||
}
|
||||
}
|
||||
if (m_rscSpeedup && !--m_rscSpeedup) {
|
||||
Debug(this,DebugNote,"Reset interval back to %u ms",m_rscInterval);
|
||||
m_rscTimer.interval(m_rscInterval);
|
||||
}
|
||||
m_rscTimer.start(when.msec());
|
||||
// Pick the next circuit to reset. Ignore circuits locally locked
|
||||
if (m_defPoint && m_remotePoint &&
|
||||
|
@ -2969,6 +2976,16 @@ bool SS7ISUP::control(NamedList& params)
|
|||
transmitMessage(msg,label,false);
|
||||
}
|
||||
return true;
|
||||
case SS7MsgISUP::RSC:
|
||||
if (0 == (m_rscSpeedup = circuits() ? circuits()->count() : 0))
|
||||
return false;
|
||||
// Temporarily speed up reset interval to 10s or as provided
|
||||
m_rscTimer.interval(params,"interval",2,10,false,true);
|
||||
Debug(this,DebugNote,"Fast reset of %u circuits every %u ms",
|
||||
m_rscSpeedup,(unsigned int)m_rscTimer.interval());
|
||||
if (m_rscTimer.started())
|
||||
m_rscTimer.start(Time::msecNow());
|
||||
return true;
|
||||
}
|
||||
mylock.drop();
|
||||
return SignallingComponent::control(params);
|
||||
|
|
|
@ -2373,7 +2373,7 @@ ISDNQ931::ISDNQ931(const NamedList& params, const char* name)
|
|||
m_l2DownTimer.interval(params,"t309",60000,90000,false);
|
||||
m_recvSgmTimer.interval(params,"t314",3000,4000,false);
|
||||
m_syncCicTimer.interval(params,"t316",4000,5000,false);
|
||||
m_syncGroupTimer.interval(params,"channelsync",500,1000,true,true);
|
||||
m_syncGroupTimer.interval(params,"channelsync",60,300,true,true);
|
||||
m_callDiscTimer.interval(params,"t305",0,5000,false);
|
||||
m_callRelTimer.interval(params,"t308",0,5000,false);
|
||||
m_callConTimer.interval(params,"t313",0,5000,false);
|
||||
|
|
|
@ -6369,6 +6369,8 @@ private:
|
|||
// Circuit reset
|
||||
SignallingTimer m_rscTimer; // RSC message or idle timeout
|
||||
SignallingCircuit* m_rscCic; // Circuit currently beeing reset
|
||||
u_int32_t m_rscInterval; // Saved reset interval
|
||||
u_int32_t m_rscSpeedup; // Circuits left for speedup
|
||||
// Blocking/unblocking circuits
|
||||
SignallingTimer m_lockTimer; // Request timeout
|
||||
bool m_lockGroup; // Allow sending requests for a group
|
||||
|
|
Loading…
Reference in New Issue