Askozia Forums
May 21, 2012, 08:01:55 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Handling of ISDN disconnect  (Read 1327 times)
zwierzak
Newbie
*

Karma: 0
Posts: 1


View Profile
« on: August 06, 2008, 09:06:53 pm »

Hi!

When dialing out using sip phone thorught ISDN fritz card PCI, disconnection of ISDN call is not handled properly

Remote site hangs up here
-- NT->TE - unit:00  frame:000037 - time:06.08 20:30:15.420949 - length:51 ----
L2 00 02 000000-- SAPI = 0                                       (Call Control)
         ------1- C/R = Command
         -------0 Extension Bit = 0             (with extension, octet follows)
L2 01 A1 1010000- TEI = 80 = 0x50                               (Automatic TEI)
         -------1 Extension Bit = 1                 (no extension, final octet)
L2 02 12 0001001- N(S) = 9                               (send sequence number)
         -------0 I-Frame: Information transfer
L2 03 10 0001000- N(R) = 8                            (receive sequence number)
         -------0 P/F, Poll = No Immediate Response Required
L3 04 08 00001000 Protocol = Q.931/I.451/DSS1                            (0x08)
L3 05 01 0000---- Call Reference
         ----0001 Call Reference length is 1 byte
L3 06 85 1------- Call Reference is sent to call originator
         -0000101 Call Reference = 5 = 0x05
L3 07 45 0------- Message type extension = 0
         -1000101 Message type = DISCONNECT                              (0x45)
L3 08 08 0------- Variable length Information element
         -0001000 IE = cause
L3 09 02 00000010 IE Length = 2 bytes
L3 0A 80 1------- Extension Bit = 1                 (no extension, final octet)
         -00----- Coding standard = CCITT
         ---0---- Spare
         ----0000 Location = User
L3 0B 90 1------- Extension Bit = 1                 (no extension, final octet)
         -0010000 Cause = 16: Q.850: normal call clearing
L3 0C 1C 0------- Variable length Information element
         -0011100 IE = facility
L3 0D 21 00100001 IE Length = 33 bytes
[facility (Q.932): Protocol=Remote Operations Protocol
   0xa1 Tag: Context-spec, Constructor, code = 1
   0x1e Len: 30 (short form)
             invokeComponent
   0x02 Tag: Universal, Primitive, INTEGER (2)
   0x02 Len: 2 (short form)
   0x2d 0x8c
   Val: 35885
             InvokeIdentifier = 35885
   0x02 Tag: Universal, Primitive, INTEGER (2)
   0x01 Len: 1 (short form)
   0x23
   Val: 35
             Operation Value = aOCECurrency (35)
   0x30 Tag: Universal, Constructor, SEQUENCE (16)
   0x15 Len: 21 (short form)
             specificChargingUnits
   0x30 Tag: Universal, Constructor, SEQUENCE (16)
   0x13 Len: 19 (short form)
   0xa1 Tag: Context-spec, Constructor, code = 1
   0x0e Len: 14 (short form)
             recordedUnitsList [1]
   0x81 Tag: Context-spec, Primitive, code = 1
   0x04 Len: 4 (short form)
   0x49 0x4d 0x50 0x2e
   Val: 777014601
   0xa2 Tag: Context-spec, Constructor, code = 2
   0x06 Len: 6 (short form)
   0x81 Tag: Context-spec, Primitive, code = 1
   0x01 Len: 1 (short form)
   0x01
   Val: 1
   0x82 Tag: Context-spec, Primitive, code = 2
   0x01 Len: 1 (short form)
   0x03
   Val: 3
   0x82 Tag: Context-spec, Primitive, code = 2
   0x01 Len: 1 (short form)
   0x00
   Val: 0
]L3 2F 1E 0------- Variable length Information element
         -0011110 IE = progress indicator
L3 30 02 00000010 IE Length = 2 bytes
L3 31 82 -00----- Coding standard = CCITT
         ----0010 location = Public network serving local user
L3 32 88 -0001000 description = In-band info or appropriate pattern now available


I hear now congestion tone in my sip phone and connection counter does not stop. ISDN channel is not cleared until I hang up SIP phone despite the fact that connection ended when remote side hung up


-- TE->NT - unit:00  frame:000038 - time:06.08 20:30:15.421007 - length:4 -----
L2 00 00 000000-- SAPI = 0                                       (Call Control)
         ------0- C/R = Command
         -------0 Extension Bit = 0             (with extension, octet follows)
L2 01 A1 1010000- TEI = 80 = 0x50                               (Automatic TEI)
         -------1 Extension Bit = 1                 (no extension, final octet)
L2 02 01 00000001 S-Frame: RR                                  (Receiver Ready)
L2 03 14 0001010- N(R) = 10                           (receive sequence number)
         -------0 P/F, Poll = No Immediate Response Required

-- NT->TE - unit:00  frame:000039 - time:06.08 20:30:15.514444 - length:12 ----
L2 00 02 000000-- SAPI = 0                                       (Call Control)
         ------1- C/R = Command
         -------0 Extension Bit = 0             (with extension, octet follows)
L2 01 87 1000011- TEI = 67 = 0x43                               (Automatic TEI)
         -------1 Extension Bit = 1                 (no extension, final octet)
L2 02 02 0000001- N(S) = 1                               (send sequence number)
         -------0 I-Frame: Information transfer
L2 03 06 0000011- N(R) = 3                            (receive sequence number)
         -------0 P/F, Poll = No Immediate Response Required
L3 04 08 00001000 Protocol = Q.931/I.451/DSS1                            (0x08)
L3 05 01 0000---- Call Reference
         ----0001 Call Reference length is 1 byte
L3 06 54 0------- Call Reference is sent from call originator
         -1010100 Call Reference = 84 = 0x54
L3 07 4D 0------- Message type extension = 0
         -1001101 Message type = RELEASE                                 (0x4d)
L3 08 08 0------- Variable length Information element
         -0001000 IE = cause
L3 09 02 00000010 IE Length = 2 bytes
L3 0A 80 1------- Extension Bit = 1                 (no extension, final octet)
         -00----- Coding standard = CCITT
         ---0---- Spare
         ----0000 Location = User
L3 0B 90 1------- Extension Bit = 1                 (no extension, final octet)
         -0010000 Cause = 16: Q.850: normal call clearing

-- NT->TE - unit:00  frame:000040 - time:06.08 20:30:15.542666 - length:4 -----
L2 00 00 000000-- SAPI = 0                                       (Call Control)
         ------0- C/R = Response
         -------0 Extension Bit = 0             (with extension, octet follows)
L2 01 87 1000011- TEI = 67 = 0x43                               (Automatic TEI)
         -------1 Extension Bit = 1                 (no extension, final octet)
L2 02 01 00000001 S-Frame: RR                                  (Receiver Ready)
L2 03 08 0000100- N(R) = 4                            (receive sequence number)
         -------0 P/F, Final = No Result of Poll

-- NT->TE - unit:00  frame:000041 - time:06.08 20:30:17.287271 - length:8 -----
L2 00 FE 111111-- SAPI = 63                                (Layer 2 Management)
         ------1- C/R = Command
         -------0 Extension Bit = 0             (with extension, octet follows)
L2 01 FF 1111111- TEI = 127 = 0x7f                              (Broadcast TEI)
         -------1 Extension Bit = 1                 (no extension, final octet)
L2 02 03 000-0011 U-Frame: UI                          (Unnumbered Information)
         ---0---- P/F, Poll = No Immediate Response Required
L2 03 0F 00001111 MEI                            (Management Entity Identifier)
L2 04 00 00000000 Ri = 0x0000                           (Reference number high)
L2 05 00 00000000 Ri                                     (Reference Number low)
L2 06 04 00000100 TEI Identity message = CHECK REQUEST                   (0x04)
L2 07 85 1000010- Ai = 66                                    (Action Indicator)
         -------1 Extension Bit = 1                 (no extension, final octet)

-- NT->TE - unit:00  frame:000042 - time:06.08 20:30:17.487761 - length:8 -----
L2 00 FE 111111-- SAPI = 63                                (Layer 2 Management)
         ------1- C/R = Command
         -------0 Extension Bit = 0             (with extension, octet follows)
L2 01 FF 1111111- TEI = 127 = 0x7f                              (Broadcast TEI)
         -------1 Extension Bit = 1                 (no extension, final octet)
L2 02 03 000-0011 U-Frame: UI                          (Unnumbered Information)
         ---0---- P/F, Poll = No Immediate Response Required
L2 03 0F 00001111 MEI                            (Management Entity Identifier)
L2 04 00 00000000 Ri = 0x0000                           (Reference number high)
L2 05 00 00000000 Ri                                     (Reference Number low)
L2 06 04 00000100 TEI Identity message = CHECK REQUEST                   (0x04)
L2 07 CB 1100101- Ai = 101                                   (Action Indicator)
         -------1 Extension Bit = 1                 (no extension, final octet)

-- NT->TE - unit:00  frame:000043 - time:06.08 20:30:19.087497 - length:8 -----
L2 00 FE 111111-- SAPI = 63                                (Layer 2 Management)
         ------1- C/R = Command
         -------0 Extension Bit = 0             (with extension, octet follows)
L2 01 FF 1111111- TEI = 127 = 0x7f                              (Broadcast TEI)
         -------1 Extension Bit = 1                 (no extension, final octet)
L2 02 03 000-0011 U-Frame: UI                          (Unnumbered Information)
         ---0---- P/F, Poll = No Immediate Response Required
L2 03 0F 00001111 MEI                            (Management Entity Identifier)
L2 04 00 00000000 Ri = 0x0000                           (Reference number high)
L2 05 00 00000000 Ri                                     (Reference Number low)
L2 06 04 00000100 TEI Identity message = CHECK REQUEST                   (0x04)
L2 07 C3 1100001- Ai = 97                                    (Action Indicator)
         -------1 Extension Bit = 1                 (no extension, final octet)

-- NT->TE - unit:00  frame:000044 - time:06.08 20:30:19.298271 - length:8 -----
L2 00 FE 111111-- SAPI = 63                                (Layer 2 Management)
         ------1- C/R = Command
         -------0 Extension Bit = 0             (with extension, octet follows)
L2 01 FF 1111111- TEI = 127 = 0x7f                              (Broadcast TEI)
         -------1 Extension Bit = 1                 (no extension, final octet)
L2 02 03 000-0011 U-Frame: UI                          (Unnumbered Information)
         ---0---- P/F, Poll = No Immediate Response Required
L2 03 0F 00001111 MEI                            (Management Entity Identifier)
L2 04 00 00000000 Ri = 0x0000                           (Reference number high)
L2 05 00 00000000 Ri                                     (Reference Number low)
L2 06 04 00000100 TEI Identity message = CHECK REQUEST                   (0x04)
L2 07 A9 1010100- Ai = 84                                    (Action Indicator)
         -------1 Extension Bit = 1                 (no extension, final octet)

-- TE->NT - unit:00  frame:000045 - time:06.08 20:30:23.418857 - length:8 -----
L2 00 00 000000-- SAPI = 0                                       (Call Control)
         ------0- C/R = Command
         -------0 Extension Bit = 0             (with extension, octet follows)
L2 01 A1 1010000- TEI = 80 = 0x50                               (Automatic TEI)
         -------1 Extension Bit = 1                 (no extension, final octet)
L2 02 10 0001000- N(S) = 8                               (send sequence number)
         -------0 I-Frame: Information transfer
L2 03 15 0001010- N(R) = 10                           (receive sequence number)
         -------1 P/F, Poll = Immediate Response Required
L3 04 08 00001000 Protocol = Q.931/I.451/DSS1                            (0x08)
L3 05 01 0000---- Call Reference
         ----0001 Call Reference length is 1 byte
L3 06 05 0------- Call Reference is sent from call originator
         -0000101 Call Reference = 5 = 0x05
L3 07 75 0------- Message type extension = 0
         -1110101 Message type = STATUS_ENQUIRY                          (0x75)

-- NT->TE - unit:00  frame:000046 - time:06.08 20:30:23.433984 - length:4 -----
L2 00 00 000000-- SAPI = 0                                       (Call Control)
         ------0- C/R = Response
         -------0 Extension Bit = 0             (with extension, octet follows)
L2 01 A1 1010000- TEI = 80 = 0x50                               (Automatic TEI)
         -------1 Extension Bit = 1                 (no extension, final octet)
L2 02 01 00000001 S-Frame: RR                                  (Receiver Ready)
L2 03 13 0001001- N(R) = 9                            (receive sequence number)
         -------1 P/F, Final = Result of Poll

-- NT->TE - unit:00  frame:000047 - time:06.08 20:30:23.494238 - length:15 ----
L2 00 02 000000-- SAPI = 0                                       (Call Control)
         ------1- C/R = Command
         -------0 Extension Bit = 0             (with extension, octet follows)
L2 01 A1 1010000- TEI = 80 = 0x50                               (Automatic TEI)
         -------1 Extension Bit = 1                 (no extension, final octet)
L2 02 14 0001010- N(S) = 10                              (send sequence number)
         -------0 I-Frame: Information transfer
L2 03 12 0001001- N(R) = 9                            (receive sequence number)
         -------0 P/F, Poll = No Immediate Response Required
L3 04 08 00001000 Protocol = Q.931/I.451/DSS1                            (0x08)
L3 05 01 0000---- Call Reference
         ----0001 Call Reference length is 1 byte
L3 06 85 1------- Call Reference is sent to call originator
         -0000101 Call Reference = 5 = 0x05
L3 07 7D 0------- Message type extension = 0
         -1111101 Message type = STATUS                                  (0x7d)
L3 08 08 0------- Variable length Information element
         -0001000 IE = cause
L3 09 02 00000010 IE Length = 2 bytes
L3 0A 82 1------- Extension Bit = 1                 (no extension, final octet)
         -00----- Coding standard = CCITT
         ---0---- Spare
         ----0010 Location = Public network serving local user
L3 0B 9E 1------- Extension Bit = 1                 (no extension, final octet)
         -0011110 Cause = 30: Q.850: response to STATUS ENQUIRY
L3 0C 14 0------- Variable length Information element
         -0010100 IE = call state
L3 0D 01 00000001 IE Length = 1 bytes
L3 0E 0C -00----- Coding standard = CCITT
         ---01100 state = Disconnect indication

-- TE->NT - unit:00  frame:000048 - time:06.08 20:30:23.494276 - length:4 -----
L2 00 00 000000-- SAPI = 0                                       (Call Control)
         ------0- C/R = Command
         -------0 Extension Bit = 0             (with extension, octet follows)
L2 01 A1 1010000- TEI = 80 = 0x50                               (Automatic TEI)
         -------1 Extension Bit = 1                 (no extension, final octet)
L2 02 01 00000001 S-Frame: RR                                  (Receiver Ready)
L2 03 16 0001011- N(R) = 11                           (receive sequence number)
         -------0 P/F, Poll = No Immediate Response Required

-- TE->NT - unit:00  frame:000049 - time:06.08 20:30:23.916287 - length:12 ----
L2 00 00 000000-- SAPI = 0                                       (Call Control)
         ------0- C/R = Command
         -------0 Extension Bit = 0             (with extension, octet follows)
L2 01 A1 1010000- TEI = 80 = 0x50                               (Automatic TEI)
         -------1 Extension Bit = 1                 (no extension, final octet)
L2 02 12 0001001- N(S) = 9                               (send sequence number)
         -------0 I-Frame: Information transfer
L2 03 17 0001011- N(R) = 11                           (receive sequence number)
         -------1 P/F, Poll = Immediate Response Required
L3 04 08 00001000 Protocol = Q.931/I.451/DSS1                            (0x08)
L3 05 01 0000---- Call Reference
         ----0001 Call Reference length is 1 byte
L3 06 05 0------- Call Reference is sent from call originator
         -0000101 Call Reference = 5 = 0x05
L3 07 5A 0------- Message type extension = 0
         -1011010 Message type = RELEASE_COMPLETE                        (0x5a)
L3 08 08 0------- Variable length Information element
         -0001000 IE = cause
L3 09 02 00000010 IE Length = 2 bytes
L3 0A 80 1------- Extension Bit = 1                 (no extension, final octet)
         -00----- Coding standard = CCITT
         ---0---- Spare
         ----0000 Location = User
L3 0B 90 1------- Extension Bit = 1                 (no extension, final octet)
         -0010000 Cause = 16: Q.850: normal call clearing
Logged
Michael
Askozia Staff
Hero Member
*

Karma: 49
Posts: 1020


View Profile
« Reply #1 on: August 07, 2008, 12:11:21 pm »

I would contact the author of ISDN4BSD, Hans Petter Selasky, directly about this (http://www.selasky.org/hans_petter/isdn4bsd/). His address is at the bottom of that page.
Logged
giovanni.v
Hero Member
*****

Karma: 53
Posts: 670


View Profile
« Reply #2 on: August 08, 2008, 03:42:03 pm »

Got a similar problem (see next message), however something look very strange in the log from zwierzak.

The pbx (TE) shall handle the DISCONNECT message (frame 000037)  from network sending a RELEASE but the call reference i see in the frame 000038 is for another call not the request  in frame 000037. The disconnect message call reference is 0x05 but the release call reference is 0x54.

The last frame in the zwierzak log (000049) show a RELEASE_COMPLETE for reference 0x05 sent by the TE to the network. Wrong, almost not possible, this message is expected from NT in respose to the pbx RELEASE message it never sent, messed the logs?
Logged
giovanni.v
Hero Member
*****

Karma: 53
Posts: 670


View Profile
« Reply #3 on: August 08, 2008, 04:32:15 pm »

Another case here.
Scenario:
A SIP phone start a call to an external number routed via a BRI ISDN.
I have stripped any redundand message not related to the call, like RR and so on.

1) Called phone rings, the called answer, conversation start.
To help keeping logs short i am only reporting the call connect phase frames to note the time.

Code:
-- NT->TE - unit:09  frame:000115 - time:05.08 20:08:16.297248 - length:28 ----
L2 00 02 000000-- SAPI = 0                                       (Call Control)
         ------1- C/R = Command
         -------0 Extension Bit = 0             (with extension, octet follows)
L2 01 01 0000000- TEI = 0 = 0x00                            (Non-automatic TEI)
         -------1 Extension Bit = 1                 (no extension, final octet)
L2 02 D0 1101000- N(S) = 104                             (send sequence number)
         -------0 I-Frame: Information transfer
L2 03 DC 1101110- N(R) = 110                          (receive sequence number)
         -------0 P/F, Poll = No Immediate Response Required
L3 04 08 00001000 Protocol = Q.931/I.451/DSS1                            (0x08)
L3 05 01 0000---- Call Reference
         ----0001 Call Reference length is 1 byte
L3 06 8B 1------- Call Reference is sent to call originator
         -0001011 Call Reference = 11 = 0x0b
L3 07 07 0------- Message type extension = 0
         -0000111 Message type = CONNECT                                 (0x07)
L3 08 29 0------- Variable length Information element
         -0101001 IE = date/time
L3 09 05 00000101 IE Length = 5 bytes
L3 0A 14 00010100 Year = 08
L3 0B 01 00000001 Month = 08
L3 0C 15 00010101 Day = 05
L3 0D 04 00000100 Hour = 20
L3 0E 20 00100000 Minute = 08
L3 0F 00 00000000 Second = 16                                  (invalid offset)
         0------- Variable length Information element
         -1001100 IE = connected number
L3 10 0B 00001011 IE Length = 11 bytes
L3 11 80 1------- Extension Bit = 1                 (no extension, final octet)
         -000---- Type = Unknown
         ----0000 Plan = Unknown                                          (0x0)
L3 12 30 00110000 Number digit = 0
L3 13 36 00110110 Number digit = 6
L3 14 35 00110101 Number digit = 5
L3 15 35 00110101 Number digit = 5
L3 16 35 00110101 Number digit = 5
L3 17 35 00110101 Number digit = 5
L3 18 31 00110001 Number digit = 1
L3 19 31 00110001 Number digit = 1
L3 1A 31 00110001 Number digit = 1
L3 1B 31 00110001 Number digit = 1

-- TE->NT - unit:09  frame:000116 - time:05.08 20:08:16.297297 - length:8 -----
L2 00 00 000000-- SAPI = 0                                       (Call Control)
         ------0- C/R = Command
         -------0 Extension Bit = 0             (with extension, octet follows)
L2 01 01 0000000- TEI = 0 = 0x00                            (Non-automatic TEI)
         -------1 Extension Bit = 1                 (no extension, final octet)
L2 02 DC 1101110- N(S) = 110                             (send sequence number)
         -------0 I-Frame: Information transfer
L2 03 D3 1101001- N(R) = 105                          (receive sequence number)
         -------1 P/F, Poll = Immediate Response Required
L3 04 08 00001000 Protocol = Q.931/I.451/DSS1                            (0x08)
L3 05 01 0000---- Call Reference
         ----0001 Call Reference length is 1 byte
L3 06 0B 0------- Call Reference is sent from call originator
         -0001011 Call Reference = 11 = 0x0b
L3 07 0F 0------- Message type extension = 0
         -0001111 Message type = CONNECT_ACKNOWLEDGE                     (0x0f)

2) Now the called part hang-up, then the public network (NT) notify to the pbx (TE). Starting here the network enter the disconnect state.

Code:
-- NT->TE - unit:09  frame:000138 - time:05.08 20:08:46.707859 - length:19 ----
L2 00 02 000000-- SAPI = 0                                       (Call Control)
         ------1- C/R = Command
         -------0 Extension Bit = 0             (with extension, octet follows)
L2 01 01 0000000- TEI = 0 = 0x00                            (Non-automatic TEI)
         -------1 Extension Bit = 1                 (no extension, final octet)
L2 02 E0 1110000- N(S) = 112                             (send sequence number)
         -------0 I-Frame: Information transfer
L2 03 E4 1110010- N(R) = 114                          (receive sequence number)
         -------0 P/F, Poll = No Immediate Response Required
L3 04 08 00001000 Protocol = Q.931/I.451/DSS1                            (0x08)
L3 05 01 0000---- Call Reference
         ----0001 Call Reference length is 1 byte
L3 06 8B 1------- Call Reference is sent to call originator
         -0001011 Call Reference = 11 = 0x0b
L3 07 45 0------- Message type extension = 0
         -1000101 Message type = DISCONNECT                              (0x45)
L3 08 08 0------- Variable length Information element
         -0001000 IE = cause
L3 09 02 00000010 IE Length = 2 bytes
L3 0A 80 1------- Extension Bit = 1                 (no extension, final octet)
         -00----- Coding standard = CCITT
         ---0---- Spare
         ----0000 Location = User
L3 0B 90 1------- Extension Bit = 1                 (no extension, final octet)
         -0010000 Cause = 16: Q.850: normal call clearing
L3 0C 29 0------- Variable length Information element
         -0101001 IE = date/time
L3 0D 05 00000101 IE Length = 5 bytes
L3 0E 14 00010100 Year = 08
L3 0F 01 00000001 Month = 08
L3 10 15 00010101 Day = 05
L3 11 04 00000100 Hour = 20
L3 12 21 00100001 Minute = 08
L3 13 00 00000000 Second = 46


3) But the calling extension does nothing leaving the phone (hands free) off-hook.

Note that the DISCONNECT message do not contain the progress indicator #8 (isn't mandatory), no tones/inband info is available.
Here the calling phone remain silent.

After a number of fake STATUS_ENQUIRY from pbx about call reference 0x127 (stripped), the pbx do some STATUS_ENQUIRY about our call (0x0b) but again do nothing to clear it.

Code:
-- TE->NT - unit:09  frame:000149 - time:05.08 20:08:54.710670 - length:8 -----
L2 00 00 000000-- SAPI = 0                                       (Call Control)
         ------0- C/R = Command
         -------0 Extension Bit = 0             (with extension, octet follows)
L2 01 01 0000000- TEI = 0 = 0x00                            (Non-automatic TEI)
         -------1 Extension Bit = 1                 (no extension, final octet)
L2 02 EA 1110101- N(S) = 117                             (send sequence number)
         -------0 I-Frame: Information transfer
L2 03 E7 1110011- N(R) = 115                          (receive sequence number)
         -------1 P/F, Poll = Immediate Response Required
L3 04 08 00001000 Protocol = Q.931/I.451/DSS1                            (0x08)
L3 05 01 0000---- Call Reference
         ----0001 Call Reference length is 1 byte
L3 06 0B 0------- Call Reference is sent from call originator
         -0001011 Call Reference = 11 = 0x0b
L3 07 75 0------- Message type extension = 0
         -1110101 Message type = STATUS_ENQUIRY                          (0x75)


-- NT->TE - unit:09  frame:000151 - time:05.08 20:08:54.742722 - length:15 ----
L2 00 02 000000-- SAPI = 0                                       (Call Control)
         ------1- C/R = Command
         -------0 Extension Bit = 0             (with extension, octet follows)
L2 01 01 0000000- TEI = 0 = 0x00                            (Non-automatic TEI)
         -------1 Extension Bit = 1                 (no extension, final octet)
L2 02 E6 1110011- N(S) = 115                             (send sequence number)
         -------0 I-Frame: Information transfer
L2 03 EC 1110110- N(R) = 118                          (receive sequence number)
         -------0 P/F, Poll = No Immediate Response Required
L3 04 08 00001000 Protocol = Q.931/I.451/DSS1                            (0x08)
L3 05 01 0000---- Call Reference
         ----0001 Call Reference length is 1 byte
L3 06 8B 1------- Call Reference is sent to call originator
         -0001011 Call Reference = 11 = 0x0b
L3 07 7D 0------- Message type extension = 0
         -1111101 Message type = STATUS                                  (0x7d)
L3 08 08 0------- Variable length Information element
         -0001000 IE = cause
L3 09 02 00000010 IE Length = 2 bytes
L3 0A 80 1------- Extension Bit = 1                 (no extension, final octet)
         -00----- Coding standard = CCITT
         ---0---- Spare
         ----0000 Location = User
L3 0B 9E 1------- Extension Bit = 1                 (no extension, final octet)
         -0011110 Cause = 30: Q.850: response to STATUS ENQUIRY
L3 0C 14 0------- Variable length Information element
         -0010100 IE = call state
L3 0D 01 00000001 IE Length = 1 bytes
L3 0E 0B -00----- Coding standard = CCITT
         ---01011 state = Disconnect request
         
4) After 30 seconds the network call for a RELEASE because it's T305 timer for the disconnect state elapsed.

Code:
-- NT->TE - unit:09  frame:000161 - time:05.08 20:09:16.703139 - length:19 ----
L2 00 02 000000-- SAPI = 0                                       (Call Control)
         ------1- C/R = Command
         -------0 Extension Bit = 0             (with extension, octet follows)
L2 01 01 0000000- TEI = 0 = 0x00                            (Non-automatic TEI)
         -------1 Extension Bit = 1                 (no extension, final octet)
L2 02 EC 1110110- N(S) = 118                             (send sequence number)
         -------0 I-Frame: Information transfer
L2 03 F0 1111000- N(R) = 120                          (receive sequence number)
         -------0 P/F, Poll = No Immediate Response Required
L3 04 08 00001000 Protocol = Q.931/I.451/DSS1                            (0x08)
L3 05 01 0000---- Call Reference
         ----0001 Call Reference length is 1 byte
L3 06 8B 1------- Call Reference is sent to call originator
         -0001011 Call Reference = 11 = 0x0b
L3 07 4D 0------- Message type extension = 0
         -1001101 Message type = RELEASE                                 (0x4d)
L3 08 08 0------- Variable length Information element
         -0001000 IE = cause
L3 09 02 00000010 IE Length = 2 bytes
L3 0A 80 1------- Extension Bit = 1                 (no extension, final octet)
         -00----- Coding standard = CCITT
         ---0---- Spare
         ----0000 Location = User
L3 0B 90 1------- Extension Bit = 1                 (no extension, final octet)
         -0010000 Cause = 16: Q.850: normal call clearing
L3 0C 29 0------- Variable length Information element
         -0101001 IE = date/time
L3 0D 05 00000101 IE Length = 5 bytes
L3 0E 14 00010100 Year = 08
L3 0F 01 00000001 Month = 08
L3 10 15 00010101 Day = 05
L3 11 04 00000100 Hour = 20
L3 12 21 00100001 Minute = 09
L3 13 00 00000000 Second = 16                                  (invalid offset)

5) finally this event is good enough for our PBX realease the call!

Code:
-- TE->NT - unit:09  frame:000162 - time:05.08 20:09:16.703208 - length:12 ----
L2 00 00 000000-- SAPI = 0                                       (Call Control)
         ------0- C/R = Command
         -------0 Extension Bit = 0             (with extension, octet follows)
L2 01 01 0000000- TEI = 0 = 0x00                            (Non-automatic TEI)
         -------1 Extension Bit = 1                 (no extension, final octet)
L2 02 F0 1111000- N(S) = 120                             (send sequence number)
         -------0 I-Frame: Information transfer
L2 03 EF 1110111- N(R) = 119                          (receive sequence number)
         -------1 P/F, Poll = Immediate Response Required
L3 04 08 00001000 Protocol = Q.931/I.451/DSS1                            (0x08)
L3 05 01 0000---- Call Reference
         ----0001 Call Reference length is 1 byte
L3 06 0B 0------- Call Reference is sent from call originator
         -0001011 Call Reference = 11 = 0x0b
L3 07 5A 0------- Message type extension = 0
         -1011010 Message type = RELEASE_COMPLETE                        (0x5a)
L3 08 08 0------- Variable length Information element
         -0001000 IE = cause
L3 09 02 00000010 IE Length = 2 bytes
L3 0A 80 1------- Extension Bit = 1                 (no extension, final octet)
         -00----- Coding standard = CCITT
         ---0---- Spare
         ----0000 Location = User
L3 0B E6 1------- Extension Bit = 1                 (no extension, final octet)
         -1100110 Cause = 102: Q.850: recovery on timer expiry

I have no idea to know if the problem is in i4BSD or in chan capi.

May be someone look this as a minor problem but there are almost two things to consider.
We can see the first evident one on the call logs:
Aug 05 20:08:08      698     33411112222     SIP/698-0876a000 -> CAPI/9/003933411112222     Dial( CAPI/9/003933411112222/bl||To )     68     60     ANSWERED

Real call duration is 30 seconds but you get 60 seconds billable time, 30 real + 30 network time out.
The billable time must be stopped at the DISCONNECT message because the network drop the B channel so no audio stream is longer avalilable.
May be this problem is in chan_capi?

The least thing, but not last, it's about telecom regulations.
Here in the DISCONNECT message we do not have inband audio (no disconnect tome), the pbx must send a RELEASE COMPLETE to the network, not waiting a timeout, as per ETSI rules in ETS 300 102-1 (5.3.4.2):
Quote
ETS 300 102-1: December 1990
5.3.4.2 Clearing when tones/announcements not provided
When in-band tones/announcements  are not  provided, the  DISCONNECT  message does not contain
progress indicator #8 "in-band information or appropriate pattern now available". The network shall initiate
clearing by: sending  the DISCONNECT message; starting timer T305;  disconnecting the B-channel; and
entering the Disconnect Indication state.
On the receipt of the DISCONNECT message without progress indicator #8, the user shall: disconnect the
B-channel; send a RELEASE message; start timer T308; and enter the Release Request state.
On receipt of the RELEASE message, the network shall: stop timer T305; release  the B-channel; send a
RELEASE COMPLETE message; release the call reference; and return to the Null state.
If timer T305 expires, the network shall: send a RELEASE message to the user with the cause  number
originally contained in the DISCONNECT message; start timer T308; and enter the Release Request state.
In addition to the original clearing cause, the RELEASE message may contain a second cause information
element with cause #102 "recovery on timer expiry".

Don't worry Michael i just want contribute to have a better Askozia in the near future... [IT]un inglese non abbastanza buono per essere gentile :-))[/IT]
« Last Edit: August 08, 2008, 06:32:46 pm by Iax » Logged
Michael
Askozia Staff
Hero Member
*

Karma: 49
Posts: 1020


View Profile
« Reply #4 on: August 11, 2008, 04:25:12 pm »

If either/both of you could contact the ISDN4BSD project directly it would be a huge help. I can relay information but I'm not really adding any value to it.

Thanks for providing such detailed reports!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.23 seconds with 19 queries.