TDM Disconnection not relayed as a SIP BYE
Symptom
The symptom can affect outbound IP to TDM calls through a gateway from the Dialogic 1000 Media Gateway Series (DMG1000) or the Dialogic 2000 Media Gateway Series (DMG2000) that originate in Microsoft Office Communications Server (OCS) and which pass through an OCS Mediation Server.
Calls that disconnect from the TDM side may not be disconnected on the IP side; the IP call remains established until it is dropped from the IP side.
Reason for the issue
This symptom can occur when the Microsoft OCS Mediation Server has been configured to use a single NIC, or to use a set of NICs bound together, rather than two separate NICs.
On OCS Mediation Server, it is generally necessary to use two separate NICs on different sub-nets; one NIC connects to OCS and the other NIC connects to the DMG1000/DMG2000 gateway.
See the 'Analysis' section (below) for more information.
Identifying the issue
The problem can be identified by collecting a DMG1000/DMG2000 gateway trace with the following trace masks:
TelDrv prot
Tel event
VoIP prot
Alarm init
The trace may be similar to this:
01 981:33:024 [VoIP ] Prot ---->INVITE sip:+7165551212@192.168.1.3;user=phone SIP/2.0
02 981:33:024 [VoIP ] Prot FROM: <sip:+9135551212@ocs.domain.com;user=phone>;
epid=3E2DC4E18E;tag=365. . .
03 981:33:024 [VoIP ] Prot TO: <sip:+7165551212@192.168.1.3;user=phone>
04 981:33:024 [VoIP ] Prot CSEQ: 1349 INVITE
05 981:33:024 [VoIP ] Prot CALL-ID: 9149a694-b84c-46a5-8367-931fb8a2d5a8
06 981:33:024 [VoIP ] Prot MAX-FORWARDS: 70
07 981:33:024 [VoIP ] Prot VIA: SIP/2.0/TCP 192.168.1.5:2331;branch=z9hG4bK746e3cfc
08 981:33:024 [VoIP ] Prot CONTACT: <sip:ocs.domain.com:5060;transport=Tcp;
maddr=192.168.1.5;ms-opaque=. . .>
09 981:33:024 [VoIP ] Prot CONTENT-LENGTH: 311
10 981:33:024 [VoIP ] Prot SUPPORTED: 100rel
11 981:33:024 [VoIP ] Prot USER-AGENT: RTCC/3.0.0.0 MediationServer
12 981:33:024 [VoIP ] Prot CONTENT-TYPE: application/sdp; charset=utf-8
13 981:33:024 [VoIP ] Prot ALLOW: UPDATE
14 981:33:024 [VoIP ] Prot ALLOW: Ack, Cancel, Bye,Invite
. . .
15 981:33:024 [teldrv-1 ] Prot [ 4] NLS->SETUP: 08 02 00 04 . . .
16 981:33:024 [VoIP ] Prot
17 981:33:024 [VoIP ] Prot <----SIP/2.0 100 Trying
. . .
18 981:33:024 [VoIP ] Prot <----SIP/2.0 180 Ringing
. . .
19 981:33:072 [teldrv-1 ] Prot [ 4] NLS<-CALL_PROC: 08 02 80 04 02 18 03 A9 83 84
20 981:33:072 [Tel-1 ] Event l4_appl() N_CALL_PROC_IN connid:1 cause[00:00] datalen:0
. . .
21 981:33:072 [teldrv-1 ] Prot [ 4] NLS<-ALERT: 08 02 80 04 . . .
. . .
22 981:35:344 [teldrv-1 ] Prot [ 4] NLS<-CONN: 08 02 80 04 . . .
. . .
23 981:35:344 [teldrv-1 ] Prot [ 4] NLS->CONN_ACK: 08 02 00 04 . . .
. . .
24 981:37:104 [VoIP ] Prot <----SIP/2.0 200 OK
. . .
25 981:37:104 [VoIP ] Prot ---->ACK sip:+7165551212@192.168.1.3:5060;transport=tcp SIP/2.0
. . .
26 981:43:616 [teldrv-1 ] Prot [ 4] NLS<-DISC: 08 02 80 04 . . .
27 981:43:616 [Tel-1 ] Event Q931 CAUSE = Normal call clearing
28 981:43:616 [teldrv-1 ] Prot [ 4] NLS->REL: 08 02 00 04 4D 08 02 80 90
29 981:43:632 [teldrv-1 ] Prot [ 4] NLS<-REL_COM: 08 02 80 04 5A
30 981:43:632 [Tel-1 ] Event l4_appl() N_DISC_CF connid:1 cause[00:00] datalen:0
31 981:43:632 [Alarm ] Init ALARM |621| - id:[384] info:[0x0] txt:[Error in sending SIP
message]
32 981:47:168 [VoIP ] Prot
33 981:47:168 [VoIP ] Prot ---->BYE sip:+7165551212@192.168.1.3:5060;transport=tcp SIP/2.0
. . .
34 981:47:168 [VoIP ] Prot <----SIP/2.0 481 Call Leg/Transaction Does Not Exist
Lines 01 - 14: we see the Invite go to the DMG1000/DMG2000 gateway to make a call to 7165551212 from OCS user 9135551212.
Lines 15 - 23: we see the TDM call go out on the PSTN and get connected.
Lines 24 - 25: we see the DMG1000/DMG2000 gateway inform the OCS Mediation Server of the connected call.
Lines 26 - 30: the DMG1000/DMG2000 gateway detects a disconnection request from the PSTN when the called party hangs up and the DMG1000/DMG2000 gateway responds properly with a release complete when the TDM call is fully torn down.
Line 31: the DMG1000/DMG2000 gateway was unable to send a SIP message to the OCS Mediation Server to signal the call disconnection.
Lines 33 - 34: the BYE request and the DMG1000/DMG2000 gateway response to it when the OCS client disconnects their call.
In a network capture, at the point where you would expect to see the BYE request transmitted from the DMG1000/2000 to the OCS Mediation Server, you may see a series of TCP connection attempts (SYN - RST, ACK) as the DMG1000/DMG2000 gateway attempts to establish a TCP connection to the OCS Mediation Server. These connection requests will be made to the IP address provided to the DMG1000/DMG2000 gateway in the maddr part of the INVITE Contact header.
Analysis
The issue occurs because the INVITE is sent to the DMG1000/DMG2000 gateway from OCS with a Contact header containing an incorrect IP address. This IP address is not being used by OCS Mediation Server to listen for inbound TCP connections from the DMG1000/DMG2000 gateway.
In this case the Contact header was set for:
CONTACT: <sip:ocs.domain.com:5060;transport=Tcp;maddr=192.168.1.5;ms-opaque=ba203bbfbfcd365f>
The maddr of 192.168.1.5 is not the address OCS Mediation Server uses to talk to the DMG1000/DMG2000 gateway ; it is the address the OCS Mediation Server uses to talk to OCS.
The normal practice is to use two NICs in an OCS Mediation Server. One NIC connects to the DMG1000/DMG2000 gateway ; the second NIC connects to the Office Communications Server. Please refer to Microsoft® OCS documentation and support forums for more information.
If both NICs are on the same sub-net, OCS Mediation Server uses the NIC highest in the binding order. If this is the Office Communications Server listening IP address, it will reject traffic from the DMG1000/DMG2000 gateway .
Glossary of Acronyms / Terms
NIC - Network Interface Card
OCS - Office Communications Server
TDM - Time Domain Multiplexed
PSTN - Public Switched Telephone Network