Made the ISUP T7, T27 and T34 configurable.
Added capability to manually send a COT message. git-svn-id: http://voip.null.ro/svn/yate@5043 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
405fb3f3d9
commit
8fe58db66c
|
@ -467,6 +467,22 @@
|
|||
; Defaults to yes if pointcodetype is ANSI or ANSI8, no for other types
|
||||
;duplicate-cgb=
|
||||
|
||||
; t7: int: Q.764 T7 - Addressing Message Timer, milliseconds
|
||||
; Valid range: 20000-30000
|
||||
;t7=
|
||||
|
||||
; t9: int: Q.764 T9 (Q.118) - Answer / Connect Timer, milliseconds
|
||||
; Valid range: 90000-180000, 0 to disable timer
|
||||
;t9=0
|
||||
|
||||
; t27: int: Q.764 T27 - Continuity Check Reset Timer, milliseconds
|
||||
; Valid range: 30000-300000
|
||||
;t27=240000
|
||||
|
||||
; t34: int: Q.764 T34 - Segmentation Receive Timer, milliseconds
|
||||
; Valid range: 2000-4000
|
||||
;t34=3000
|
||||
|
||||
; floodevents: int: How many events retrieved in a row trigger a flood warning
|
||||
; Default value is taken from the [general] section
|
||||
;floodevents=20
|
||||
|
|
|
@ -31,9 +31,19 @@ using namespace TelEngine;
|
|||
// Maximum number of mandatory parameters including two terminators
|
||||
#define MAX_MANDATORY_PARAMS 16
|
||||
|
||||
// T9 timer
|
||||
#define ISUP_T9_MINVAL 90000
|
||||
#define ISUP_T9_MAXVAL 180000
|
||||
// Timer limits and default values
|
||||
#define ISUP_T7_MINVAL 20000
|
||||
#define ISUP_T7_DEFVAL 20000
|
||||
#define ISUP_T7_MAXVAL 30000
|
||||
#define ISUP_T9_MINVAL 90000
|
||||
#define ISUP_T9_DEFVAL 0
|
||||
#define ISUP_T9_MAXVAL 180000
|
||||
#define ISUP_T27_MINVAL 30000
|
||||
#define ISUP_T27_DEFVAL 240000
|
||||
#define ISUP_T27_MAXVAL 300000
|
||||
#define ISUP_T34_MINVAL 2000
|
||||
#define ISUP_T34_DEFVAL 3000
|
||||
#define ISUP_T34_MAXVAL 4000
|
||||
|
||||
// Description of each ISUP parameter
|
||||
struct IsupParam {
|
||||
|
@ -2115,11 +2125,11 @@ SS7ISUPCall::SS7ISUPCall(SS7ISUP* controller, SignallingCircuit* cic,
|
|||
m_relMsg(0),
|
||||
m_sentSamDigits(0),
|
||||
m_relTimer(300000), // Q.764: T5 - 5..15 minutes
|
||||
m_iamTimer(20000), // Setup, Testing: Q.764: T7 - 20..30 seconds
|
||||
m_iamTimer(ISUP_T7_DEFVAL), // Setup, Testing: Q.764: T7 - 20..30 seconds
|
||||
// Releasing: Q.764: T1: 15..60 seconds
|
||||
m_sgmRecvTimer(3000), // Q.764: T34 - 2..4 seconds
|
||||
m_contTimer(240000), // Q.764: T27 - 4 minutes
|
||||
m_anmTimer(0) // Q.764 T9 Q.118: 1.5 - 3 minutes
|
||||
m_sgmRecvTimer(ISUP_T34_DEFVAL), // Q.764: T34 - 2..4 seconds
|
||||
m_contTimer(ISUP_T27_DEFVAL), // Q.764: T27 - 4 minutes
|
||||
m_anmTimer(0) // Q.764 T9 Q.118: 1.5 - 3 minutes, not always used
|
||||
{
|
||||
if (!(controller && m_circuit)) {
|
||||
Debug(isup(),DebugWarn,
|
||||
|
@ -2129,6 +2139,14 @@ SS7ISUPCall::SS7ISUPCall(SS7ISUP* controller, SignallingCircuit* cic,
|
|||
return;
|
||||
}
|
||||
isup()->setLabel(m_label,local,remote,sls);
|
||||
if (isup()->m_t7Interval)
|
||||
m_iamTimer.interval(isup()->m_t7Interval);
|
||||
if (isup()->m_t9Interval)
|
||||
m_anmTimer.interval(isup()->m_t9Interval);
|
||||
if (isup()->m_t27Interval)
|
||||
m_contTimer.interval(isup()->m_t27Interval);
|
||||
if (isup()->m_t34Interval)
|
||||
m_sgmRecvTimer.interval(isup()->m_t34Interval);
|
||||
if (isup()->debugAt(DebugAll)) {
|
||||
String tmp;
|
||||
tmp << m_label;
|
||||
|
@ -3040,10 +3058,8 @@ SignallingEvent* SS7ISUPCall::processSegmented(SS7MsgISUP* sgm, bool timeout)
|
|||
// intentionally fall through
|
||||
case SS7MsgISUP::EXM:
|
||||
// Start T9 timer
|
||||
if (isup()->m_t9Interval) {
|
||||
m_anmTimer.interval(isup()->m_t9Interval);
|
||||
if (m_anmTimer.interval() && !m_anmTimer.started())
|
||||
m_anmTimer.start();
|
||||
}
|
||||
break;
|
||||
case SS7MsgISUP::CPR:
|
||||
m_state = Ringing;
|
||||
|
@ -3140,7 +3156,8 @@ SS7ISUP::SS7ISUP(const NamedList& params, unsigned char sio)
|
|||
m_l3LinkUp(false),
|
||||
m_t1Interval(15000), // Q.764 T1 15..60 seconds
|
||||
m_t5Interval(300000), // Q.764 T5 5..15 minutes
|
||||
m_t9Interval(0), // Q.764 T9 Q.118 1.5 - 3 minutes
|
||||
m_t7Interval(ISUP_T7_DEFVAL), // Q.764 T7 20..30 seconds
|
||||
m_t9Interval(0), // Q.764 T9 Q.118 1.5 - 3 minutes, not always used
|
||||
m_t12Interval(20000), // Q.764 T12 (BLK) 15..60 seconds
|
||||
m_t13Interval(300000), // Q.764 T13 (BLK global) 5..15 minutes
|
||||
m_t14Interval(20000), // Q.764 T14 (UBL) 15..60 seconds
|
||||
|
@ -3151,6 +3168,8 @@ SS7ISUP::SS7ISUP(const NamedList& params, unsigned char sio)
|
|||
m_t19Interval(300000), // Q.764 T19 (CGB global) 5..15 minutes
|
||||
m_t20Interval(20000), // Q.764 T20 (CGU) 15..60 seconds
|
||||
m_t21Interval(300000), // Q.764 T21 (CGU global) 5..15 minutes
|
||||
m_t27Interval(ISUP_T27_DEFVAL), // Q.764 T27 4 minutes
|
||||
m_t34Interval(ISUP_T34_DEFVAL), // Q.764 T34 2..4 seconds
|
||||
m_uptTimer(0),
|
||||
m_userPartAvail(true),
|
||||
m_uptMessage(SS7MsgISUP::UPT),
|
||||
|
@ -3231,7 +3250,10 @@ SS7ISUP::SS7ISUP(const NamedList& params, unsigned char sio)
|
|||
m_lockTimer.start();
|
||||
|
||||
// Timers
|
||||
m_t9Interval = SignallingTimer::getInterval(params,"t9",ISUP_T9_MINVAL,0,ISUP_T9_MAXVAL,true);
|
||||
m_t7Interval = SignallingTimer::getInterval(params,"t7",ISUP_T7_MINVAL,ISUP_T7_DEFVAL,ISUP_T7_MAXVAL,false);
|
||||
m_t9Interval = SignallingTimer::getInterval(params,"t9",ISUP_T9_MINVAL,ISUP_T9_DEFVAL,ISUP_T9_MAXVAL,true);
|
||||
m_t27Interval = SignallingTimer::getInterval(params,"t27",ISUP_T27_MINVAL,ISUP_T27_DEFVAL,ISUP_T27_MAXVAL,false);
|
||||
m_t34Interval = SignallingTimer::getInterval(params,"t34",ISUP_T34_MINVAL,ISUP_T34_DEFVAL,ISUP_T34_MAXVAL,false);
|
||||
|
||||
m_continuity = params.getValue(YSTRING("continuity"));
|
||||
m_confirmCCR = params.getBoolValue(YSTRING("confirm_ccr"),true);
|
||||
|
@ -3337,7 +3359,10 @@ bool SS7ISUP::initialize(const NamedList* config)
|
|||
m_mediaRequired = (MediaRequired)config->getIntValue(YSTRING("needmedia"),
|
||||
s_mediaRequired,m_mediaRequired);
|
||||
// Timers
|
||||
m_t9Interval = SignallingTimer::getInterval(*config,"t9",ISUP_T9_MINVAL,0,ISUP_T9_MAXVAL,true);
|
||||
m_t7Interval = SignallingTimer::getInterval(*config,"t7",ISUP_T7_MINVAL,ISUP_T7_DEFVAL,ISUP_T7_MAXVAL,false);
|
||||
m_t9Interval = SignallingTimer::getInterval(*config,"t9",ISUP_T9_MINVAL,ISUP_T9_DEFVAL,ISUP_T9_MAXVAL,true);
|
||||
m_t27Interval = SignallingTimer::getInterval(*config,"t27",ISUP_T27_MINVAL,ISUP_T27_DEFVAL,ISUP_T27_MAXVAL,false);
|
||||
m_t34Interval = SignallingTimer::getInterval(*config,"t34",ISUP_T34_MINVAL,ISUP_T34_DEFVAL,ISUP_T34_MAXVAL,false);
|
||||
}
|
||||
m_cicWarnLevel = DebugMild;
|
||||
return SS7Layer4::initialize(config);
|
||||
|
@ -3831,7 +3856,15 @@ bool SS7ISUP::control(NamedList& params)
|
|||
{
|
||||
unsigned int code = params.getIntValue(YSTRING("circuit"),code1);
|
||||
// TODO: create a test call, not just send CCR
|
||||
SS7MsgISUP* msg = new SS7MsgISUP(SS7MsgISUP::CCR,code);
|
||||
SS7MsgISUP* msg = 0;
|
||||
const String& ok = params[YSTRING("success")];
|
||||
if (ok.isBoolean()) {
|
||||
msg = new SS7MsgISUP(SS7MsgISUP::COT,code);
|
||||
msg->params().addParam("ContinuityIndicators",
|
||||
ok.toBoolean() ? "success" : "failed");
|
||||
}
|
||||
else
|
||||
msg = new SS7MsgISUP(SS7MsgISUP::CCR,code);
|
||||
SS7Label label(m_type,*m_remotePoint,*m_defPoint,m_sls);
|
||||
mylock.drop();
|
||||
transmitMessage(msg,label,false);
|
||||
|
|
|
@ -8962,6 +8962,7 @@ private:
|
|||
bool m_l3LinkUp; // Flag indicating the availability of a Layer3 data link
|
||||
u_int64_t m_t1Interval; // Q.764 T1 timer interval
|
||||
u_int64_t m_t5Interval; // Q.764 T5 timer interval
|
||||
u_int64_t m_t7Interval; // Q.764 T7 timer interval
|
||||
u_int64_t m_t9Interval; // Q.764 T9 AMM/CON recv timer interval
|
||||
u_int64_t m_t12Interval; // Q.764 T12 BLK timer interval
|
||||
u_int64_t m_t13Interval; // Q.764 T13 BLK global timer interval
|
||||
|
@ -8973,6 +8974,8 @@ private:
|
|||
u_int64_t m_t19Interval; // Q.764 T19 CGB global timer interval
|
||||
u_int64_t m_t20Interval; // Q.764 T20 CGU timer interval
|
||||
u_int64_t m_t21Interval; // Q.764 T21 CGU global timer interval
|
||||
u_int64_t m_t27Interval; // Q.764 T27 Reset after Cont. Check failure
|
||||
u_int64_t m_t34Interval; // Q.764 T34 Segmentation receive timout
|
||||
SignallingMessageTimerList m_pending;// Pending messages (RSC ...)
|
||||
// Remote User Part test
|
||||
SignallingTimer m_uptTimer; // Timer for UPT
|
||||
|
|
Loading…
Reference in New Issue