Added method so User Part Unavailable notifications can be received from Management.
git-svn-id: http://voip.null.ro/svn/yate@3572 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
f14d8b6197
commit
b6e927ad2e
|
@ -4169,6 +4169,14 @@ bool SS7ISUP::processMSU(SS7MsgISUP::Type type, unsigned int cic,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MTP notification that remote user part is unavailable
|
||||||
|
void SS7ISUP::receivedUPU(SS7PointCode::Type type, const SS7PointCode node,
|
||||||
|
SS7MSU::Services part, unsigned char cause, const SS7Label& label, int sls)
|
||||||
|
{
|
||||||
|
if (part != sif() || !handlesRemotePC(node))
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Process an event received from a non-reserved circuit
|
// Process an event received from a non-reserved circuit
|
||||||
SignallingEvent* SS7ISUP::processCircuitEvent(SignallingCircuitEvent*& event,
|
SignallingEvent* SS7ISUP::processCircuitEvent(SignallingCircuitEvent*& event,
|
||||||
SignallingCall* call)
|
SignallingCall* call)
|
||||||
|
|
|
@ -520,6 +520,15 @@ HandledMSU SS7Management::receivedMSU(const SS7MSU& msu, const SS7Label& label,
|
||||||
msg->params().getValue("part","?"),
|
msg->params().getValue("part","?"),
|
||||||
msg->params().getValue("destination","?"),
|
msg->params().getValue("destination","?"),
|
||||||
msg->params().getValue("cause","?"));
|
msg->params().getValue("cause","?"));
|
||||||
|
if (router) {
|
||||||
|
unsigned char part = msg->params().getIntValue("part",-1);
|
||||||
|
unsigned char cause = msg->params().getIntValue("cause",-1);
|
||||||
|
SS7PointCode pc;
|
||||||
|
if (part > SS7MSU::MTNS && part <= 0x0f && cause <= 0x0f &&
|
||||||
|
pc.assign(msg->params().getValue("destination"),label.type()))
|
||||||
|
router->receivedUPU(label.type(),pc,(SS7MSU::Services)part,
|
||||||
|
cause,label,sls);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
String tmp;
|
String tmp;
|
||||||
|
|
|
@ -840,6 +840,27 @@ void SS7Router::recoverMSU(const SS7Label& link, int sequence)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SS7Router::receivedUPU(SS7PointCode::Type type, const SS7PointCode node,
|
||||||
|
SS7MSU::Services part, unsigned char cause, const SS7Label& label, int sls)
|
||||||
|
{
|
||||||
|
// Iterate and notify all User Parts
|
||||||
|
lock();
|
||||||
|
ListIterator iter(m_layer4);
|
||||||
|
while (L4Pointer* p = static_cast<L4Pointer*>(iter.get())) {
|
||||||
|
if (p && *p) {
|
||||||
|
RefPointer<SS7Layer4> l4 = static_cast<SS7Layer4*>(*p);
|
||||||
|
if (!l4)
|
||||||
|
continue;
|
||||||
|
unlock();
|
||||||
|
l4->receivedUPU(type,node,part,cause,label,sls);
|
||||||
|
l4 = 0;
|
||||||
|
lock();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
unlock();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void SS7Router::notify(SS7Layer3* network, int sls)
|
void SS7Router::notify(SS7Layer3* network, int sls)
|
||||||
{
|
{
|
||||||
DDebug(this,DebugInfo,"Notified %s on %p sls %d [%p]",
|
DDebug(this,DebugInfo,"Notified %s on %p sls %d [%p]",
|
||||||
|
|
|
@ -5371,6 +5371,19 @@ protected:
|
||||||
virtual bool recoveredMSU(const SS7MSU& msu, const SS7Label& label, SS7Layer3* network, int sls)
|
virtual bool recoveredMSU(const SS7MSU& msu, const SS7Label& label, SS7Layer3* network, int sls)
|
||||||
{ return false; }
|
{ return false; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notification for receiving User Part Unavailable
|
||||||
|
* @param type Type of Point Code
|
||||||
|
* @param node Node on which the User Part is unavailable
|
||||||
|
* @param part User Part (service) reported unavailable
|
||||||
|
* @param cause Unavailability cause - Q.704 15.17.5
|
||||||
|
* @param label Routing label of the UPU message
|
||||||
|
* @param sls Signaling link the UPU was received on
|
||||||
|
*/
|
||||||
|
virtual void receivedUPU(SS7PointCode::Type type, const SS7PointCode node,
|
||||||
|
SS7MSU::Services part, unsigned char cause, const SS7Label& label, int sls)
|
||||||
|
{ }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Process a notification generated by the attached network layer
|
* Process a notification generated by the attached network layer
|
||||||
* @param link Network or linkset that generated the notification
|
* @param link Network or linkset that generated the notification
|
||||||
|
@ -5442,6 +5455,15 @@ public:
|
||||||
virtual int inhibited(int sls) const
|
virtual int inhibited(int sls) const
|
||||||
{ return 0; }
|
{ return 0; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check some of the inhibition flags of a specific link
|
||||||
|
* @param sls Signalling Link to check
|
||||||
|
* @param flags Flags to check for, ORed together
|
||||||
|
* @return True if any of the specified inhibition flags is active
|
||||||
|
*/
|
||||||
|
inline bool inhibited(int sls, int flags) const
|
||||||
|
{ return (inhibited(sls) & flags) != 0; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set and clear inhibition flags on the links
|
* Set and clear inhibition flags on the links
|
||||||
* @param sls Signalling Link to modify
|
* @param sls Signalling Link to modify
|
||||||
|
@ -6008,6 +6030,18 @@ public:
|
||||||
*/
|
*/
|
||||||
void recoverMSU(const SS7Label& link, int sequence);
|
void recoverMSU(const SS7Label& link, int sequence);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notification for receiving User Part Unavailable
|
||||||
|
* @param type Type of Point Code
|
||||||
|
* @param node Node on which the User Part is unavailable
|
||||||
|
* @param part User Part (service) reported unavailable
|
||||||
|
* @param cause Unavailability cause - Q.704 15.17.5
|
||||||
|
* @param label Routing label of the UPU message
|
||||||
|
* @param sls Signaling link the UPU was received on
|
||||||
|
*/
|
||||||
|
virtual void receivedUPU(SS7PointCode::Type type, const SS7PointCode node,
|
||||||
|
SS7MSU::Services part, unsigned char cause, const SS7Label& label, int sls);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the transfer function is enabled
|
* Check if the transfer function is enabled
|
||||||
* @return True if acting as a STP
|
* @return True if acting as a STP
|
||||||
|
@ -7913,6 +7947,18 @@ protected:
|
||||||
const unsigned char* paramPtr, unsigned int paramLen,
|
const unsigned char* paramPtr, unsigned int paramLen,
|
||||||
const SS7Label& label, SS7Layer3* network, int sls);
|
const SS7Label& label, SS7Layer3* network, int sls);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notification for receiving User Part Unavailable
|
||||||
|
* @param type Type of Point Code
|
||||||
|
* @param node Node on which the User Part is unavailable
|
||||||
|
* @param part User Part (service) reported unavailable
|
||||||
|
* @param cause Unavailability cause - Q.704 15.17.5
|
||||||
|
* @param label Routing label of the UPU message
|
||||||
|
* @param sls Signaling link the UPU was received on
|
||||||
|
*/
|
||||||
|
virtual void receivedUPU(SS7PointCode::Type type, const SS7PointCode node,
|
||||||
|
SS7MSU::Services part, unsigned char cause, const SS7Label& label, int sls);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Process an event received from a non-reserved circuit
|
* Process an event received from a non-reserved circuit
|
||||||
* @param event The event, will be consumed and zeroed
|
* @param event The event, will be consumed and zeroed
|
||||||
|
|
Loading…
Reference in New Issue