Strange ${HANGUPCAUSE} behaviour

Something bizarre with my ${HANGUPCAUSE} why am i seeing 2 different causes (the correct one is 91) ${HANGUPCAUSE} is set to 0 when this happens

[ Ext: 0 Coding: CCITT (ITU) standard (0) 0: 0 Location: Private network serving the remote user (5)
< Ext: 1 Cause: (null) (0), class = Normal Event (0) ]
< Cause data 1: 91 (145)

Anyone else seen this before?

  1. Isnt there a bug in LibPri/Pricause ?
  2. You can set Pricause:

exten => h,1,Set(PriCause=WhateverYouTelcoHasDefinedForStandardHangup)
exten => h,2,Hangup()

You can intercept busy, congestion, not available as well.

In this case it looks it has set ${HANGUPCAUSE} to 0 but it is actually 91, it is receiving the 91 just doing something funny with it. It would be nice to get it to work so the end user could receive the correct tone played to them.

As far as i know, asterisk isnt setting the pricause.
The pricause differs from country to country, even from provider to provider (you can google your local standard causes).

So you need to set the cause at the right place to the right value.

Also, a busy should be set, and if it is by
exten=> 5555,102,busy
exten=> 5555,103,congestion

If you let him run into the mailbox, you (of course) dont set busy at all (now you are answering the call technically)