[Home]

Summary:ASTERISK-00884: zaptel ignoring Q931 release code 17 (busy)
Reporter:zoa (zoa)Labels:
Date Opened:2004-01-20 15:15:58.000-0600Date Closed:2008-01-15 14:42:33.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:zaptel seems to ignore the release code 17 on a pri.
As a result the +101 priority will never get called, not will there be busy in the cdr's.

Cypromis reported this and is having some issues with a customer over the busy not being reported)



****** ADDITIONAL INFORMATION ******

cleopatra*CLI>
> [
> [00
> [00 01
> [00 01 40
> [00 01 40 42
> [00 01 40 42 08
> [00 01 40 42 08 02
> [00 01 40 42 08 02 00
> [00 01 40 42 08 02 00 03
> [00 01 40 42 08 02 00 03 05
> [00 01 40 42 08 02 00 03 05 04
> [00 01 40 42 08 02 00 03 05 04 03
> [00 01 40 42 08 02 00 03 05 04 03 80
> [00 01 40 42 08 02 00 03 05 04 03 80 90
> [00 01 40 42 08 02 00 03 05 04 03 80 90 a3
> [00 01 40 42 08 02 00 03 05 04 03 80 90 a3 18
> [00 01 40 42 08 02 00 03 05 04 03 80 90 a3 18 03
> [00 01 40 42 08 02 00 03 05 04 03 80 90 a3 18 03 a9
> [00 01 40 42 08 02 00 03 05 04 03 80 90 a3 18 03 a9 83
> [00 01 40 42 08 02 00 03 05 04 03 80 90 a3 18 03 a9 83 81
> [00 01 40 42 08 02 00 03 05 04 03 80 90 a3 18 03 a9 83 81 6c
> [00 01 40 42 08 02 00 03 05 04 03 80 90 a3 18 03 a9 83 81 6c 02
> [00 01 40 42 08 02 00 03 05 04 03 80 90 a3 18 03 a9 83 81 6c 02 00
> [00 01 40 42 08 02 00 03 05 04 03 80 90 a3 18 03 a9 83 81 6c 02 00 c3
> [00 01 40 42 08 02 00 03 05 04 03 80 90 a3 18 03 a9 83 81 6c 02 00 c3 70
> [00 01 40 42 08 02 00 03 05 04 03 80 90 a3 18 03 a9 83 81 6c 02 00 c3 70 0c
> [00 01 40 42 08 02 00 03 05 04 03 80 90 a3 18 03 a9 83 81 6c 02 00 c3 70 0c 91
> [00 01 40 42 08 02 00 03 05 04 03 80 90 a3 18 03 a9 83 81 6c 02 00 c3 70 0c 91 31
> [00 01 40 42 08 02 00 03 05 04 03 80 90 a3 18 03 a9 83 81 6c 02 00 c3 70 0c 91 31 35
> [00 01 40 42 08 02 00 03 05 04 03 80 90 a3 18 03 a9 83 81 6c 02 00 c3 70 0c 91 31 35 30
> [00 01 40 42 08 02 00 03 05 04 03 80 90 a3 18 03 a9 83 81 6c 02 00 c3 70 0c 91 31 35 30 33
> [00 01 40 42 08 02 00 03 05 04 03 80 90 a3 18 03 a9 83 81 6c 02 00 c3 70 0c 91 31 35 30 33 34
> [00 01 40 42 08 02 00 03 05 04 03 80 90 a3 18 03 a9 83 81 6c 02 00 c3 70 0c 91 31 35 30 33 34 35
> [00 01 40 42 08 02 00 03 05 04 03 80 90 a3 18 03 a9 83 81 6c 02 00 c3 70 0c 91 31 35 30 33 34 35 32
> [00 01 40 42 08 02 00 03 05 04 03 80 90 a3 18 03 a9 83 81 6c 02 00 c3 70 0c 91 31 35 30 33 34 35 32 37
> [00 01 40 42 08 02 00 03 05 04 03 80 90 a3 18 03 a9 83 81 6c 02 00 c3 70 0c 91 31 35 30 33 34 35 32 37 30
> [00 01 40 42 08 02 00 03 05 04 03 80 90 a3 18 03 a9 83 81 6c 02 00 c3 70 0c 91 31 35 30 33 34 35 32 37 30 35
> [00 01 40 42 08 02 00 03 05 04 03 80 90 a3 18 03 a9 83 81 6c 02 00 c3 70 0c 91 31 35 30 33 34 35 32 37 30 35 33
> [00 01 40 42 08 02 00 03 05 04 03 80 90 a3 18 03 a9 83 81 6c 02 00 c3 70 0c 91 31 35 30 33 34 35 32 37 30 35 33 a1
> [00 01 40 42 08 02 00 03 05 04 03 80 90 a3 18 03 a9 83 81 6c 02 00 c3 70 0c 91 31 35 30 33 34 35 32 37 30 35 33 a1 ]
> [00 01 40 42 08 02 00 03 05 04 03 80 90 a3 18 03 a9 83 81 6c 02 00 c3 70 0c 91 31 35 30 33 34 35 32 37 30 35 33 a1 ]
> Informational frame:
> SAPI: 00  C/R: 0 EA: 0
>  TEI: 000        EA: 1
> N(S): 032   0: 0
> N(R): 033   P: 0
> 34 bytes of data
-- Restarting T203 counter
Stopping T_203 timer
Starting T_200 timer
> Protocol Discriminator: Q.931 (8)  len=34
> Call Ref: len= 2 (reference 3/0x3) (Originator)
> Message type: SETUP (5)
> Bearer Capability (len= 3) [ Ext: 1  Q.931 Std: 0  Info transfer capability: Speech (0)
>                              Ext: 1  Trans mode/rate: 64kbps, circuit-mode (16)
>                              Ext: 1  User information layer 1: A-Law (35)
> Channel ID (len= 5) [ Ext: 1  IntID: Implicit, PRI Spare: 0, Exclusive Dchan: 0
>                        ChanSel: Reserved
>                       Ext: 1  Coding: 0   Number Specified   Channel Type: 3
>                       Ext: 1  Channel: 1 ]
> Calling Number (len= 4) [ Ext: 0  TON: Unknown Number Type (0)  NPI: Unknown Number Plan (0)
>                           Presentation: Unknown (67) '' ]
> Called Number (len=14) [ Ext: 1  TON: International Number (1)  NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1) '15034527053' ]
> Sending Complete (len= 0)
   -- Called g1/xxxxxxxxxx
cleopatra*CLI>
< [
< [00
< [00 01
< [00 01 01
< [00 01 01 42
< [00 01 01 42 ]
< [00 01 01 42 ]
< Supervisory frame:
< SAPI: 00  C/R: 0 EA: 0
<  TEI: 000        EA: 1
< Zero: 0     S: 0 01: 1  [ RR (receive ready) ]
< N(R): 033 P/F: 0
< 0 bytes of data
-- ACKing all packets from 31 to (but not including) 33
-- ACKing packet 32, new txqueue is -1 (-1 means empty)
-- Since there was nothing left, stopping T200 counter
-- Nothing left, starting T203 counter
-- Restarting T203 counter
cleopatra*CLI>
< [
< [02
< [02 01
< [02 01 42
< [02 01 42 42
< [02 01 42 42 08
< [02 01 42 42 08 02
< [02 01 42 42 08 02 80
< [02 01 42 42 08 02 80 03
< [02 01 42 42 08 02 80 03 02
< [02 01 42 42 08 02 80 03 02 18
< [02 01 42 42 08 02 80 03 02 18 03
< [02 01 42 42 08 02 80 03 02 18 03 a9
< [02 01 42 42 08 02 80 03 02 18 03 a9 83
< [02 01 42 42 08 02 80 03 02 18 03 a9 83 81
< [02 01 42 42 08 02 80 03 02 18 03 a9 83 81 ]
< [02 01 42 42 08 02 80 03 02 18 03 a9 83 81 ]
< Informational frame:
< SAPI: 00  C/R: 1 EA: 0
<  TEI: 000        EA: 1
< N(S): 033   0: 0
< N(R): 033   P: 0
< 10 bytes of data
-- ACKing all packets from 32 to (but not including) 33
-- Since there was nothing left, stopping T200 counter
-- Stopping T203 counter since we got an ACK
-- Nothing left, starting T203 counter
< Protocol Discriminator: Q.931 (8)  len=10
< Call Ref: len= 2 (reference 32771/0x8003) (Terminator)
< Message type: CALL PROCEEDING (2)
< Channel ID (len= 5) [ Ext: 1  IntID: Implicit, PRI Spare: 0, Exclusive Dchan: 0
<                        ChanSel: Reserved
<                       Ext: 1  Coding: 0   Number Specified   Channel Type: 3
<                       Ext: 1  Channel: 1 ]
Sending Receiver Ready (34)

> [
> [02
> [02 01
> [02 01 01
> [02 01 01 44
> [02 01 01 44 ]
> [02 01 01 44 ]
> Supervisory frame:
> SAPI: 00  C/R: 1 EA: 0
>  TEI: 000        EA: 1
> Zero: 0     S: 0 01: 1  [ RR (receive ready) ]
> N(R): 034 P/F: 0
> 0 bytes of data
-- Restarting T203 counter
-- Restarting T203 counter
cleopatra*CLI>
< [
< [02
< [02 01
< [02 01 44
< [02 01 44 42
< [02 01 44 42 08
< [02 01 44 42 08 02
< [02 01 44 42 08 02 80
< [02 01 44 42 08 02 80 03
< [02 01 44 42 08 02 80 03 45
< [02 01 44 42 08 02 80 03 45 08
< [02 01 44 42 08 02 80 03 45 08 02
< [02 01 44 42 08 02 80 03 45 08 02 82
< [02 01 44 42 08 02 80 03 45 08 02 82 91
< [02 01 44 42 08 02 80 03 45 08 02 82 91 ]
< [02 01 44 42 08 02 80 03 45 08 02 82 91 ]
< Informational frame:
< SAPI: 00  C/R: 1 EA: 0
<  TEI: 000        EA: 1
< N(S): 034   0: 0
< N(R): 033   P: 0
< 9 bytes of data
-- ACKing all packets from 32 to (but not including) 33
-- Since there was nothing left, stopping T200 counter
-- Stopping T203 counter since we got an ACK
-- Nothing left, starting T203 counter
< Protocol Discriminator: Q.931 (8)  len=9
< Call Ref: len= 2 (reference 32771/0x8003) (Terminator)
< Message type: DISCONNECT (69)
< Cause (len= 2) [ Ext: 1  Coding: CCITT (ITU) standard (0) 0: 0   Location: Public network serving the local user (2)
<                  Ext: 1  Cause: User busy (17), class = Normal Event (1) ]
Sending Receiver Ready (35)

> [
> [02
> [02 01
> [02 01 01
> [02 01 01 46
> [02 01 01 46 ]
> [02 01 01 46 ]
> Supervisory frame:
> SAPI: 00  C/R: 1 EA: 0
>  TEI: 000        EA: 1
> Zero: 0     S: 0 01: 1  [ RR (receive ready) ]
> N(R): 035 P/F: 0
> 0 bytes of data
-- Restarting T203 counter
-- Restarting T203 counter
   -- Channel 1, span 1 got hangup
cleopatra*CLI>
> [
> [00
> [00 01
> [00 01 42
> [00 01 42 46
> [00 01 42 46 08
> [00 01 42 46 08 02
> [00 01 42 46 08 02 00
> [00 01 42 46 08 02 00 03
> [00 01 42 46 08 02 00 03 4d
> [00 01 42 46 08 02 00 03 4d 08
> [00 01 42 46 08 02 00 03 4d 08 02
> [00 01 42 46 08 02 00 03 4d 08 02 81
> [00 01 42 46 08 02 00 03 4d 08 02 81 91
> [00 01 42 46 08 02 00 03 4d 08 02 81 91 ]
> [00 01 42 46 08 02 00 03 4d 08 02 81 91 ]
> Informational frame:
> SAPI: 00  C/R: 0 EA: 0
>  TEI: 000        EA: 1
> N(S): 033   0: 0
> N(R): 035   P: 0
> 9 bytes of data
-- Restarting T203 counter
Stopping T_203 timer
Starting T_200 timer
> Protocol Discriminator: Q.931 (8)  len=9
> Call Ref: len= 2 (reference 3/0x3) (Originator)
> Message type: RELEASE (77)
> Cause (len= 2) [ Ext: 1  Coding: CCITT (ITU) standard (0) 0: 0   Location: Private network serving the local user (1)
>                  Ext: 1  Cause: User busy (17), class = Normal Event (1) ]
   -- Hungup 'Zap/1-1'
Comments:By: cypromis (cypromis) 2004-01-20 15:18:33.000-0600

same here with PRI's in Poland and UK

By: cypromis (cypromis) 2004-01-20 17:46:12.000-0600

also congestion message from q931 is not handled correctly in zap channel

By: zoa (zoa) 2004-01-20 18:50:38.000-0600

it would also be very usefull if it could store "unexistant" number in the cdr if the number does not exist.

< Message type: DISCONNECT (69)
< Cause (len= 2) [ Ext: 1  Coding: CCITT (ITU) standard (0) 0: 0   Location: Public network serving the local user (2)
<                  Ext: 1  Cause: Unallocated (unassigned) number (1), class = Normal Event (0) ]
-- Processing IE 8 (Cause)

By: cypromis (cypromis) 2004-01-21 05:50:49.000-0600

the whole cause handling is a bit bad. wouldn't it be possible besides doing the right messaging back to the cchannel handling core to also have the disconnect reasons stored in the CDR's ? even in channel dependant format ? ie: the release code number for PRI or H323 and the message no for SIP ? would help us providers a hell to find out what is wrong if somebody reports he cannot reach a destination

By: cypromis (cypromis) 2004-01-26 16:24:48.000-0600

Not getting busy on anything when zap call gets a busy line is a complete showstopper.

By: ewieling (ewieling) 2004-01-29 11:31:06.000-0600

It's totally screwed up my Asterisk deployment.  There is no way the user can tell if the number dialed was invalid, busy, not answered, or some other error occured.

By: ewieling (ewieling) 2004-01-29 11:32:02.000-0600

It should also be noted that ${HANGUPCAUSE} always seems to be set to "0"

By: Andrew Kohlsmith (akohlsmith) 2004-01-29 14:24:00.000-0600

I agree that this is a showstopper bug for any kind of VOIP rollout.  Right now it's definitely affecting NuFone and VoicePulse Connect for IAX2 anyway.  

Having the disconnect cause in CDR would be very handy.

I don't know the ISDN code well enough -- how difficult of a problem is this to resolve?

By: ewieling (ewieling) 2004-01-29 14:44:15.000-0600

Well getting the PRI CAUSE code is easy enough.  I even have the PRI cause code being mapped to the ASTERISK cause code (there's an asterisk function for this already) and put in ${HANGUPCAUSE).  I can't seem to figure out why app_dial is not seeing the ASTERISK cause code and doing n+101.  HANGUPCAUSE is documented to be the PRI cause code, however, so my small change is inconsistent with the docs.  chan_zap.c and app_dial.c are giving me a headache.  I don't know them well enough to build any kind of patch to fix the problem.  pbx.c sets HANGUPCAUSE by setting it to the value of c->hangupcause.  I'm assuming c->hangupcause is the asterisk cause code, so HANGUPCAUSE would NEVER have worked as expected.

By: ewieling (ewieling) 2004-01-30 17:10:07.000-0600

A more general method of reporting cause codes would be nice.  Perhaps AST_CAUSE_CODE and an AST_CAUSE_TEXT variables.  The channel drivers would translate their native cause codes into the Asterisk cause codes and then we can access the info in a technology independent way from withing the dial plan.  The AST_CAUSE_TEXT could be piped to a Speech Synth app to inform the user why their call didn't go thru or why they were disconnected.

I suspect this is a non-trivial thing to do.  Just having HANGUPCAUSE working as documented would solve my (and other's) immediate problem.

Something like:

exten => _9NXXNNNN,1,Dial(Zap/g1/${EXTEN:1})
exten => _9NXXNNNN,2,Festival(${AST_CAUSE_TEXT})
exten => _9NXXNNNN,102,Festival(${AST_CAUSE_TEXT})
exten => _9NXXXXXX,103,Busy

By: ewieling (ewieling) 2004-01-30 17:15:10.000-0600

Here is the part of my extensions.conf:

exten => _91NXXNXXXXXX,1,SetCIDNum(9857648744)
exten => _91NXXNXXXXXX,2,Dial(${PSTN}/${EXTEN:1})
exten => _91NXXNXXXXXX,3,NoOp(${HANGUPCAUSE})
exten => _91NXXNXXXXXX,4,Macro(generic-error)
exten => _91NXXNXXXXXX,103,NoOp(${HANGUPCAUSE})
exten => _91NXXNXXXXXX,104,Busy

Here is the console output with pri debug on:

-- Executing SetCIDNum("IAX2[btel@btel]/4", "9857648744") in new stack
-- Executing Dial("IAX2[btel@btel]/4", "Zap/g1/5048379775||d") in new stack
-- Making new call for cr 32774
> Protocol Discriminator: Q.931 (8) len=61
> Call Ref: len= 2 (reference 6/0x6) (Originator)
> Message type: SETUP (5)
> Bearer Capability (len= 3) [ Ext: 1 Q.931 Std: 0 Info transfer capability: Speech (0)
> Ext: 1 Trans mode/rate: 64kbps, circuit-mode (16)
> Ext: 1 User information layer 1: u-Law (34)
> Channel ID (len= 5) [ Ext: 1 IntID: Implicit, PRI Spare: 0, Exclusive Dchan: 0
> ChanSel: Reserved
> Ext: 1 Coding: 0 Number Specified Channel Type: 3
> Ext: 1 Channel: 1 ]
> Display (len=13) [ > Display (len=13) [ 1> Display (len=13) [ 1E> Display (len=13) [ 1Er> Display (len=13) [ 1Eri> Display (len=13) [ 1Eric> Display (len=13) [ 1Eric > Display (len=13) [ 1Eric W> Display (len=13) [ 1Eric Wi> Display (len=13) [ 1Eric Wie> Display (len=13) [ 1Eric Wiel> Display (len=13) [ 1Eric Wieli> Display (len=13) [ 1Eric Wielin> Display (len=13) [ 1Eric Wieling> Display (len=13) [ 1Eric Wieling ]
> Progress Indicator (len= 2) [ Ext: 1 Coding: CCITT (ITU) standard (0) 0: 0 Location: User (0)
> Ext: 1 Progress Description: Calling equipment is non-ISDN. (3) ]
> Calling Number (len=14) [ Ext: 0 TON: Unknown Number Type (0) NPI: Unknown Number Plan (0)
> Presentation: Presentation permitted, user number not screened (0) '9857648744' ]
> Called Number (len=13) [ Ext: 1 TON: Unknown Number Type (0) NPI: Unknown Number Plan (0) '5048379775' ]
-- Called g1/5048379775
< Protocol Discriminator: Q.931 (8) len=9
< Call Ref: len= 2 (reference 32774/0x8006) (Terminator)
< Message type: RELEASE COMPLETE (90)
< Cause (len= 2) [ Ext: 1 Coding: CCITT (ITU) standard (0) 0: 0 Location: User (0)
< Ext: 1 Cause: User busy (17), class = Normal Event (1) ]
-- Processing IE 8 (Cause)
-- Channel 1, span 1 got hangup
NEW_HANGUP DEBUG: Calling q931_hangup, ourstate Null, peerstate Null
NEW_HANGUP DEBUG: Destroying the call, ourstate Null, peerstate Null
-- Hungup 'Zap/1-1'
== No one is available to answer at this time
-- Executing NoOp("IAX2[btel@btel]/4", "0") in new stack
-- Executing Macro("IAX2[btel@btel]/4", "generic-error") in new stack
-- Executing Busy("IAX2[btel@btel]/4", "") in new stack
== Spawn extension (macro-generic-error, s, 1) exited non-zero on 'IAX2[btel@btel]/4' in macro 'generic-error'
== Spawn extension (local-access, s, 4) exited non-zero on 'IAX2[btel@btel]/4'
-- Hungup 'IAX2[btel@btel]/4'

By: Brian West (bkw918) 2004-01-31 13:37:22.000-0600

n+101 on busy has been fixed in cvs.  HANGUPCAUSE is minor and will be address by another bug.  Please let me know if you have any problems and we will reopen.

bkw

By: Digium Subversion (svnbot) 2008-01-15 14:42:33.000-0600

Repository: asterisk
Revision: 2100

U   trunk/channels/chan_zap.c

------------------------------------------------------------------------
r2100 | markster | 2008-01-15 14:42:33 -0600 (Tue, 15 Jan 2008) | 2 lines

Send busy when busy, congestion when congestion on PRI (bug ASTERISK-884)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=2100