RestComm / jss7

RestComm Java SS7 Stack and Services
http://www.restcomm.com/
GNU Affero General Public License v3.0
178 stars 218 forks source link

M3UA handling of Two ASPs in an Application Server #219

Closed abhayani closed 7 years ago

abhayani commented 7 years ago

M3UA as of today doesn't correctly handles "Two ASPs in an Application Server" as mentioned in section 5.1.3 of https://tools.ietf.org/html/rfc4666#section-5.1.3

If jSS7 is acting as AS side and has 2 ASP's in an AS (ASP can be in different VM too), and if first ASP is ACTIVE making AS ACTIVE, when next ASP sends ASPUP, it will receive ASPUP_ACK and at same time SWG will also send NTFY indicating that AS is ACTIVE. jSS7 should handle this and make AS ACTIVE. Instead it thinks NTFY (ACTIVE) is wrong message and sends ASP_ACTIVE to peer expecting the ASP_ACTIVE_ACK and again waits for NTFY (AS ACTIVE) which will never come and hence AS state doesn't change.

jaimecasero commented 7 years ago

@abhayani can we try to spot the main parts that require change here: Do we need to update the FSM here https://github.com/RestComm/jss7/blob/master/m3ua/impl/src/main/java/org/mobicents/protocols/ss7/m3ua/impl/AspImpl.java#L131 ??

jaimecasero commented 7 years ago

@abhayani what about failover? should we comply with sections as well?? 5.2.1. 1+1 Sparing, Withdrawal of ASP, Backup Override ...105 5.2.2. 1+1 Sparing, Backup Override ......................105

jaimecasero commented 7 years ago

this seems to be related to current behavior "Override and there is already one ACTIVE, we leave this one // as INACTIVE" https://github.com/RestComm/jss7/blob/master/m3ua/impl/src/main/java/org/mobicents/protocols/ss7/m3ua/impl/AspStateMaintenanceHandler.java#L320

jaimecasero commented 7 years ago

In terms of configuration, do we need some new parameter to set the ApplicationServers in this new topology? or is just the FSM changes what we need?

abhayani commented 7 years ago

Jaime,

Sorry for delayed reasponse. I think its just matter of adding right FSM in AsImpl. Please find attached testcase and AsImpl fix that I believe is sufficient. telscale-jss7-m3ua.patch.zip

vetss commented 7 years ago

Fixed by: https://github.com/RestComm/jss7/commit/73e9fc315c7357b9dc62b4583b76bfbdf732b9e6