Release Reason / Cause Code Translation
Â
Dialogic IMG Integrated Media Gateways ('IMGs') allow you to specify custom translation tables that map SIP reason codes to TDM reason codes. These custom cause code tables can then be associated with a channel group (under Cause Code Mapping Table) to allow the modification of cause codes if a SIP call leg fails to connect. Â
There are some limitations to the cause code mapping:
Only the 'standard' SIP codes are available for remapping, so if a SIP server sends a non-standard code such as '507', it is not possible to add a custom mapping for this in the IMG.
Some 'standard' entries cannot be remapped. For example, '404 - not found' can be remapped arbitrarily, so you could map this to '34 - No circuit/channel available' on the TDM side by adding a 404 to 34 mapping in the Cause Code table. However, '503 - Service Unavailable' cannot be remapped via the table. This has an internal mapping in the IMG to '41 - Temporary Failure', and you'll find a custom entry in the table for 503 (for example mapping 503 to 34) will not be used.
Note: it is useful when testing to run call tracing using the Call Tracing object in the IMG configuration, or connect using telnet (IMG 1010) or ssh (IMG 2020) to the IMG and (Advanced Debug menu -> W29P). This will show you the code that is received, if the translation table was used, and the code that comes out the other side.
Â
Interpreting SIP Reason Headers
In some cases, SIP servers may be able to generate their own TDM reason codes using a feature called the SIP Reason header, sometimes also referred to as 'Q.850'. Here the SIP header of the error response (e.g. '503 - Service Unavailable') also contains a Reason field that can be explicitly coded with a TDM reason code, for example:
Reason: Q.850 ;cause=34 ;text="no circuit"
Â
Here's an example from the IMG trace:
13:25:00.188 CALL(SIP) (02:00088:01)
---> [192.168.185.31, 5060 -> 192.168.185.36, 5060]
SIP/2.0 503 Service unavailable\r\n
Via: SIP/2.0/UDP 192.168.185.36:5060;rport=5060;branch=z
9hG4bK-315b-1218547500-19937-359\r\n
Call-ID: 354f-43e-712200813250-WOBBLE-2-192.168.185.36\r
\n
CSeq: 1 INVITE\r\n
To: <sip:01628581213@192.168.185.31:5060>;tag=259c01a106
e46f7a121fc102b51da771.7100\r\n
From: unavailable<sip:unavailable@192.168.185.36>;tag=95
ffcd055e0f78f7d5d397020e89288da2e37b00\r\n
Reason: Q.850 ;cause=34\r\n
Server: Sip EXpress router (0.9.4 (i386/linux))\r\n
Content-Length: 0\r\n
Warning: 392 192.168.185.31:5060 "Noisy feedback tells:
pid=17203 req_src_ip=192.168.185.36 req_src_port=5060 i
n_uri=sip:01628581213@192.168.185.31:5060 out_uri=sip:01
628581213@192.168.185.31:5060 via_cnt==1"\r\n
\r\n
Â
If the SIP server can generate responses containing the Reason header, then the IMG can be configured to extract this code and send the code out on the TDM side, so that a translate table is not needed. Supported protocol identifiers in the SIP Reason header are "Q.850" and "SIP". Other protocols are being ignored. If more than one Reason header is present, only the first one will be processed.
To configure this, set Incoming Reason Header Cause Code to 'enable' in the SIP Profile used for these calls.
Â
Related Documentation:
IMG 1010, IMG 1004:
Cause Code Tables
SIP Reason Header
IMG 2020:
Customize / Map Cause Codes
SIP Reason Header
Â
Product List:
Dialogic IMG 1010 Integrated Media Gateway
Dialogic IMG 1004 Integrated Media Gateway
Dialogic IMG 2020 Integrated Media Gateway (IMG 2020), formerly referred to as Dialogic BorderNetâ„¢ 2020 Session Border Controller