Howto:Tweak SIP Response Code to Q.931 Cause Code Mapping

From innovaphone wiki
Jump to navigation Jump to search

Applies To

This information applies to

  • innovaphone SIP implementations

Build V9 Hotfix 2 (90600.02) and later.


More Information

Problem Details

Telephony protocols traditionally in use such as e.g. ISDN, SS7 and H.323 convey detailed information about failure reasons in so-called cause code information elements. SIP however relies on so-called Response Codes. When interworking calls between those protocols, cause codes must be mapped to response codes and vice versa. Unfortunately, the details of this mapping are not clearly defined. Many mappings are straight forward, but some are not. It might thus be necessary to override innovaphone's default mapping table in certain interworking scenarios. Each SIP implementation (SIP, TSIP and SIPS) has its own mapping table. Each of them can (and must) be overridden separately.

There is no clear understanding of how this mapping should look like in detail. RFC 3398 contains recommendations for most of the cause codes, but it is not followed in all implementations. It may though help as a reference.

In addition to mapping cause codes to response codes, they are also conveyed transparently using a SIP Reason header according to RFC 3326:


SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 172.16.16.124:5060;branch=z9hG4bK-C898A7A8;rport
From: "Calling User" <sip:ip241@ip800.innovaphone.compat>;tag=63841483
To: <sip:0123456@127.0.0.1;user=phone>;tag=63841484
...
Reason: Q.850;cause=1


Should this message be interworked to e.g. H.323 again, the cause code found in the Reason header would be used.

System Requirements

Available from V9 Hotfix 2, build 90600.02. Keep in mind that the setting is effective globally on the box. It is thus not possible to have a SIP connection of a specific type (SIP, TSIP or SIPS) to have a different mapping than another connection of the same type on the same box.

Configuration

The settings can be examined and altered using a hidden UI on the boxes. This is available under the following URLs, depending on the type of SIP connection:

Protocol URL for Mapping UI
SIP http://x.x.x.x/SIP/mod_cmd.xml?xsl=sip.xsl
TSIP http://x.x.x.x/TSIP/mod_cmd.xml?xsl=sip.xsl
SIPS http://x.x.x.x/SIPS/mod_cmd.xml?xsl=sip.xsl

All values for cause codes and response codes found in the table are decimal.

The left table defines the mapping from Q.931 cause codes to SIP response codes. For example, an entry like 17 -> 486 specifies that an ISDN User busy (17) cause code will be translated to an Busy Here (486) cause code when translating a message from SIP/TSIP/SIPS to e.g. H.323. If there is no mapping defined for the cause code to be translated, then the default SIP response code Decline (603) will be used.

The table on the right side defines the reverse mappings from SIP response codes to Q.931 cause codes. If there is no mapping defined for the SIP response code to be translated, then no cause code will be generated (that is, e.g. an resulting H.323 message will have no cause code information element).

The tables will be populated with the current defaults (as defined by the firmware build you are using), which cannot be edited. To change a default mapping, just add your own mapping as it will override the default.


Resetting to defaults

When you make any additions to the mappings, these will be stored as /q931-maps and /sip-maps in the config change SIP, config change TSIP and config change SIPS config lines. To restore the defaults, you would e.g. issue the commands

config rem SIPS /q931-maps
config rem SIPS /sip-maps

for SIPS.

External Information

List of mapped cause codes https://www.dialogic.com/webhelp/BorderNet2020/1.1.0/WebHelp/cause_code_map_ss7_sip.htm

Known Problems

There is an issue in V9 hotfix 2 builds which destroys the mapping tables when changes are done to it. The feature thus is available but must not be used. This issue has been fixed in V9 hotfix 3.

Reference:ISDN_Cause_Codes
http://en.wikipedia.org/wiki/Q.931
http://en.wikipedia.org/wiki/List_of_SIP_response_codes