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

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 (returned when call fails in the system for various reasons)



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 the logic proceeds further as in the previous example.



Reroute

The system decides if it should try the next TP in the Routing Table based on the code received from the previous TP.

With Reroute YES - the next TP will be tried. With NO - call will end.

Reroute property is only valid for the SIP Namespace.

IMPORTANT! Reroute property is taken from the TP DC Group only. In other words - the DC Group assigned to the OP does not impact Reroute logic of the call.



Reason Header

This property manages the actions of the SIP Reason Header.

Defined in:

Example, how it looks:

Reason: Q.850 ;cause=17 ;text="User busy" ;extension= 01 02 03
Reason: Q.850 ;cause=1 ; text="Unallocated (unassigned) number"

Possible actions:

  • Drop - do not send Reason Header, drop it
  • Pass - send Reason Header down the line
  • Generate if none - pass and if Reason Header is missing - generate it
  • Overwrite - drop Reason Header from TP if such comes and generate a new one based on our SIP->Q.850 mapping

OP and TP can impact the final action for the Reason Header. That means that Reason Header actions from OP and TP are combined together to get the final action by which system will decide what to do with the Reason Header.

The table below shows how the final action is calculated:

Reason header action logic.png


The logic goes like this: TP sends (or does not send) Reason Header to the system, the system checks TP DC Group what to do with it, does it. Then checks OP DC Group and applies its rule.

If action is "Generate if none" or "Overwrite" - the Reason Header could be generated if SIP Code has a mapping to the Q.850 code. If such mapping does not exist - Reason Header will not be generated.

IMPORTANT! OP DC Group will be used to find the SIP->Q.850 mapping for the Reason Header generation.



Save CDR