The Sippy Softswitch supports the RFC3326 specification for adding the needed Reason: field to SIP messages based on the SIP code received from vendor systems. At the same place it's possible to change SIP code that is sent to Caller.


This feature was added in version 4.1-STABLE, rev.2.84 of the Sippy Softswitch, and by default is not enabled. 


The Reason field mapping allows switch operators to define custom mappings in a flexible manner. If an operator has a specific set of needs for a subset of clients, the operator can define an Account Class that is associated to a custom mapping. This allows operators to make special case adjustments for clients that require atypical SIP response codes and Reason: headers.


There are three popular mapping tables that are used in the industry;


RFC4497 - Recommended by Sippy

ITU-T Q.1912.5

https://wiki.freeswitch.org/wiki/Hangup_Causes


With our implementation of RFC326 the switch operator can choose any of the above mappings, or invent their own, though we discourage creativity in this area.


Configuring custom mappings

In >=Sippy 2020 there are two new Web pages in System Management - Result Code Translations (older versions could be configured manually with assistance of Sippy Support team):

  • Internal (rules for codes generated by Sippy)

  • External (rules for codes received from Callee/Vendor)

For example, case it's needed to send Caller SIP code 444 for any received 403 SIP code from Vendor with the following Reason header:

Reason: Q.850; cause=-16; text="Code translated from 403" 

it could be done by adding the following External rule:


Brief explanations for available options:


Basic parameters:

  • In Code - Three digits SIP code received from Callee. Mandatory. For more details refer to RFC3261 and RFC7231
  • Reason - Reason phrase for the translated code. Mandatory.
  • Out Code - Three digits SIP code to be sent to Caller. Mandatory. For more details refer to RFC3261 and RFC7231
  • Account Class - Group of Accounts that should have this rule applied to. More details here. Mandatory, default value is 'Default'


RFC3326 Parameters:

  • Protocol - Protocol to be added in generated Reason: Header. If set to Disabled, Reason: header won't be generated. Default value is Disabled.
  • Reason - Reason to be added in generated Reason: header. If Protocol is set to any value but Disabled, should not be empty.
  • Cause - Cause code to be added in generated Reason: header. If Protocol is set to any value but Disabled, should not be empty.