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
https://wiki.freeswitch.org/wiki/Hangup_Causes
With our implementation of RFC3326 the switch operator can choose any of the above mappings, or invent their own, though we discourage creativity in this area.
Configuring custom mappings for Result Code Translation
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)
For example, case it's needed to send Caller SIP code 501 code with reason "Translated 500 No Routes Found" when the call is dropped with 500 No Routes Found by Sippy with the following Reason header:
Reason: Q.850; cause=-18; text="Some random text for translated code"
it could be done by adding the following External rule:
The proper In Code could be found in Result field of corresponding CDR.
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
- 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'
- Reason - Reason phrase for the translated code. Mandatory.
- IVR Prompt - Case custom prompt has to be played to Caller instead of default one, it could be uploaded with assistance of Sippy Support team so that it'd appear in the dropdown menu
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.