Number unobtainable messages not being passed to caller DONE

We have a problem on our Asterisk system whereby if a caller dials an unobtainable number, the voice message from the PSTN exchange is not being passed through to the caller, instead the line gets hungup and the caller gets an “All circuits are busy” message from the asterisk switch.

For further information, we are in the UK and the line is an ISDN30e provided by Verizon.

zaptel.conf

Autogenerated by /usr/sbin/genzaptelconf – do not hand edit

Zaptel Configuration File

This file is parsed by the Zaptel Configurator, ztcfg

It must be in the module loading order

Span 1: WCTDM/0 “Wildcard TDM400P REV I Board 1”

fxoks=1
fxoks=2
fxsks=3
fxsks=4

Span 2: WCT1/0 “Digium Wildcard TE110P T1/E1 Card 0” HDB3/CCS/CRC4 YELLOW

span=2,1,1,ccs,hdb3,crc4
bchan=5-19,21-35
dchan=20

Global data

loadzone = uk
defaultzone = uk

zapata-channels.conf

; Autogenerated by /usr/sbin/genzaptelconf – do not hand edit
; Zaptel Channels Configurations (zapata.conf)
;
; This is not intended to be a complete zapata.conf. Rather, it is intended
; to be #include-d by /etc/zapata.conf that will include the global settings
;

; Span 1: WCTDM/0 “Wildcard TDM400P REV I Board 1”

group=1
;mailbox=
;callerid=
signalling=fxs_ks
;callerid=asreceived
context=from-pstn
cidsignalling=v23
cidstart=polarity
immediate=no
;busydetect=yes
;callprogress=yes
channel => 3-4

; Span 2: WCT1/0 “Digium Wildcard TE110P T1/E1 Card 0” HDB3/CCS/CRC4
context=from-pstn
switchtype = euroisdn
signalling = pri_cpe
priindication = outofband
group=0
channel => 5-19,21-35

Any suggestions would be gratefully received.

Regards,
Dave

OK, I’ve found out a bit more about the problem. It is that the Asterisk server is not interpreting the messages coming from the ISDN line. According to this page:

http://www.voip-info.org/wiki/index.php?page=Asterisk+variable+PRI_CAUSE

I need to enable the PRI_CAUSE variable like this:

exten => i,1,SetVar(PRI_CAUSE=1)    
; invalid extension dialed - PRI_CAUSE=unallocated number
exten => i,2,Hangup                 
; send the DISCONNECT message
; This will in most cases result in a network generated recording like
"The number you have dialed has been disconnected ..." 

Unfortunately, I haven’t a clue where I should put this code in the FreePBX configuration files. Does anyone have any ideas?

Regards,
Dave.

Managed to figure out what was happening and enabled some Asterisk Voice recordings to provide a better indication of the problem. I created an extensions_custom.conf file with the macro from this web page:

http://www.voip-info.org/wiki/index.php?page=Asterisk+variable+HANGUPCAUSE

I then modified the rc-44 code to play back a message to say that the number is unavailable.

I also adjusted the macro-outisbusy macro (in extensions.conf) like this:

exten => s,1,SetVar(PRI_CAUSE=${HANGUPCAUSE})
exten => s,n,Macro(dial-result-custom)

Regards,
Dave.