M4 Disconnect Codes

From Kolmisoft Wiki
Jump to navigationJump to search

M4 Disconnect Codes (DC) is a rework of M2 Hangupcause Codes to support a new structure with the idea to move away from ISDB Q.850 codes to the SIP codes.

The rework is done in steps and for some time old HGC codes still are used in the system.



DC Groups (Disconnect Codes Groups)

System supports different groups of codes:

  • Default - default values for the codes used in case it is necessary to reset back from custom changes from the Global group. Values in the Default group can't be changed in any way
  • Global - a global group used for the values which are not set in the Custom Groups. Values in the Global group can be freely changed. Save CDR property can only be changed in the Global group.
  • Custom Groups - groups that can be created for custom Code changes.

Each group can be applied to the OP and TP.



Namespace

Disconnect Codes are separated into Namespaces:

  • Q.850 - ISDN Q.850 Codes currently used as main codes in the system
  • SIP - SIP Codes 3XX-6XX
  • CORE - Unique Core related codes in the format 8XX



Codes

Each code has several properties:

  • Code - actual code
  • Reason - description of the code
  • Changed Code/Reason - SIP code/reason to be used in case if the change is necessary (covers Q.850->SIP mapping also)
  • Q.850 - Q.850 Code change. Only applicable to the SIP Codes for SIP->Q.850 mapping. Used for Reason Header generation.
  • Reroute - property to tell the system if a call should be rerouted for some code. Applied only in the SIP namespace.
  • Reason Header - possible actions with the Reason Header
  • Save CDR - should we save CDR for this code. Can only be changed in the Global group.




Code change logic

DC Group can be assigned to the OP and the TP separately. That means OP can have different code change logic compared to the TP.

When the SIP response comes from the TP it's in the format 3xx-6xx. Based on this response and TP DC Group, the response code can be transformed into another code.

After this transformation, the system checks OP DC Group and if the change is necessary to the code - applies it based on OP DC Group.

Logic looks like this:

SIP response (3xx-6xx) from TP -> Code transformation based on TP DC Group -> Code transformation based on OP DC Group -> response with transformed code is sent to OP

Example:

TP sends 503 -> TP DC Group has the rule to transform 503 to 500, so now code is 500 -> OP DC Group has the rule to transform 500 to 501 -> 501 is sent to OP

503 -> 500 -> 501

This is an extreme example to illustrate the logic, usually, such changes are not necessary.



Global group Code usage

If OP or TP DC Groups do not have custom changes for the code, Global DC Group is consulted and if the change is found - it's applied from the Global group.

Example:

Using the previous example, let's say TP has no custom change for code 503. So in the first step when 503 is received, the system checks TP DC Group, does not found custom change for 503 code, then the system checks Global DC Group for the code 503. If change is found - it's applied and logic proceeds further as in the previous example.