Modified notification in ISUP to only consider its own Layer 3 and remote route status, not individual linksets attached to the router.
git-svn-id: http://voip.null.ro/svn/yate@4190 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
4d5d3a0cd3
commit
9e232fab1c
|
@ -3816,32 +3816,33 @@ bool SS7ISUP::control(NamedList& params)
|
|||
// Process a notification generated by the attached network layer
|
||||
void SS7ISUP::notify(SS7Layer3* link, int sls)
|
||||
{
|
||||
if (!link)
|
||||
if (!(link && network()))
|
||||
return;
|
||||
Lock mylock(this);
|
||||
// Ignore links not routing our remote point code
|
||||
if (!m_remotePoint)
|
||||
return;
|
||||
if ((unsigned int)-1 == link->getRoutePriority(m_type,m_remotePoint->pack(m_type)))
|
||||
return;
|
||||
SS7Route::State state = m_remotePoint ?
|
||||
network()->getRouteState(m_type,*m_remotePoint) : SS7Route::Unknown;
|
||||
bool linkTmp = m_l3LinkUp;
|
||||
bool partAvail = m_userPartAvail;
|
||||
// Copy linkset operational state
|
||||
m_l3LinkUp = link->operational();
|
||||
m_l3LinkUp = network()->operational();
|
||||
// Reset remote user part's availability state if supported
|
||||
// Force UPT re-send
|
||||
if (m_uptTimer.interval() && !m_l3LinkUp) {
|
||||
if (m_uptTimer.interval() && (!m_l3LinkUp || (SS7Route::Prohibited == state))) {
|
||||
m_uptTimer.stop();
|
||||
m_userPartAvail = false;
|
||||
}
|
||||
Debug(this,DebugInfo,
|
||||
"L3 (%p,'%s') is %soperational sls=%d. Remote User Part is %savailable",
|
||||
link,link->toString().safe(),
|
||||
(m_l3LinkUp ? "" : "not "),sls,
|
||||
"L3 '%s' sls=%d is %soperational.%s Route is %s. Remote User Part is %savailable",
|
||||
link->toString().safe(),sls,
|
||||
(link->operational() ? "" : "not "),
|
||||
(network() == link ? "" : (m_l3LinkUp ? " L3 is up." : " L3 is down.")),
|
||||
SS7Route::stateName(state),
|
||||
(m_userPartAvail ? "" : "un"));
|
||||
if (linkTmp != m_l3LinkUp) {
|
||||
if (linkTmp != m_l3LinkUp || partAvail != m_userPartAvail) {
|
||||
NamedList params("");
|
||||
params.addParam("type","trunk");
|
||||
params.addParam("operational",String::boolText(m_l3LinkUp));
|
||||
params.addParam("available",String::boolText(m_userPartAvail));
|
||||
params.addParam("from",link->toString());
|
||||
engine()->notify(this,params);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue