Summary:ASTERISK-01973: [request] PRI cause codes reported as AST_CAUSE_FAILURE
Reporter:magg (magg)Labels:
Date Opened:2004-07-08 13:21:59Date Closed:2008-01-15 15:05:03.000-0600
Versions:Frequency of
Description:I would really like to get my hands on the real PRI cause code instead of the default AST_CAUSE_FAILURE when non of the other implemented pri codes matches.

I reckon it's a bit of work to implement them so I'd settle with just logging them so I can grep them out of the log when I need them. (and don't have to apply the line bellow every time I do cvs update ;)


suggested change on line 614 and 615 in chan_zap.c (if you guys don't have the time to really fix cause codes right now)

 ast_log(LOG_NOTICE, "I don't handle this PRI cause code yet: %i\n", cause);
Comments:By: Mark Spencer (markster) 2004-07-09 04:47:44

Can you tell me which ones specifically you're seeing that we should be handling?  Thanks!

By: magg (magg) 2004-07-09 05:59:25

I've been running a test project for a few hours and have seen the codes bellow, I reckon more will pop up later..

cause  count
1       1
18     64
21     10
27    170
28     16
31    153
38      1
41      4
42      4
47      1
88      8
98     36
100     4
102     2
127    97


By: magg (magg) 2004-07-09 06:08:38

Do you intend to map them to the existing AST_CAUSE_* codes (like 42 Switching Equipment Congestion could map to AST_CAUSE_CONGESTION), or make a AST_CAUSE_* for every one of them?

For statistics I'd really like to have all codes/causes individually, but I reckon that most people would like it to be just a few different codes, so it'll be less codes to handle.

One solution is to just log the cause, (with the uniqueid of the call if that's possible). Another would be to pass them around in parallell, but that feels redundant to me..

What do you think?

By: Olle Johansson (oej) 2004-07-16 13:57:31

Why not add the PRI Cause code to ${PRICAUSECODE} and keep the ${HANGUPCAUSE} for more general apps?

See http://www.voip-info.org/tiki-index.php?page=Asterisk+variable+hangupcause for more info on HANGUPCAUSE. Added your link, thank you.

By: twisted (twisted) 2004-07-23 21:02:52

I know this is fairly recent, but I'm trying to keep things from getting stale.  Any updates?


By: silke (silke) 2004-08-08 12:55:23

I definitely vote for ${PRICAUSECODE}.

By: silke (silke) 2004-08-12 17:11:09


could anyone please tell me what's the status of implementing
such a very helpful variable?

Will it come in the near future?

Best regards,


By: Mark Spencer (markster) 2004-08-12 17:40:59

I had a stunningly simple idea....

We'll make the AST_CAUSE_* match th PRI_CAUSE_*...

By: Mark Spencer (markster) 2004-08-12 18:23:24

Okay the match now.

By: Digium Subversion (svnbot) 2008-01-15 15:05:03.000-0600

Repository: asterisk
Revision: 3603

U   trunk/CHANGES
U   trunk/channels/chan_zap.c
U   trunk/include/asterisk/causes.h

r3603 | markster | 2008-01-15 15:05:03 -0600 (Tue, 15 Jan 2008) | 2 lines

Make Asterisk cause codes match those of Q.931 (bug ASTERISK-1973)