Regarding All circuits are busy now recording

Hi all,
I’m new to asterisk world. And trying to configure a asterisk server to terminate voip traffic to pstn network.
I have installed asterisk now and installed TDM800P 8port fxo module on it.
Then i configured simple outbound route and pstn trunk on it.
But when im trying to take a call to a mobile number from sip phone thru fxo card im getting all circuits are busy now recording. Below are the debug info. Please advice & this will be a grate help for me.

[root@localhost ~]# lsdahdi

Span 1: WCTDM/0 “Wildcard TDM800P Board 1” (MASTER)

1 FXS FXSKS (EC: MG2) RED
2 FXS FXSKS (EC: MG2) RED
3 FXS FXSKS (EC: MG2) RED
4 FXS FXSKS (EC: MG2) RED
5 FXS FXSKS (EC: MG2) RED
6 FXS FXSKS (EC: MG2) RED
7 FXS FXSKS (EC: MG2) RED
8 FXS FXSKS (EC: MG2) RED

[root@localhost ~]#
[root@localhost ~]# asterisk -vvvvvr
Asterisk 1.4.24, Copyright © 1999 - 2008 Digium, Inc. and others.
Created by Mark Spencer markster@digium.com
Asterisk comes with ABSOLUTELY NO WARRANTY; type ‘core show warranty’ for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type ‘core show license’ for details.

== Parsing ‘/etc/asterisk/asterisk.conf’: Found
Connected to Asterisk 1.4.24 currently running on localhost (pid = 2962)
Verbosity is at least 5
– Executing [0772328091@from-internal:1] Macro(“SIP/500-b7807e88”, “user-callerid|SKIPTTL|”) in new stack
– Executing [s@macro-user-callerid:1] Set(“SIP/500-b7807e88”, “AMPUSER=500”) in new stack
– Executing [s@macro-user-callerid:2] GotoIf(“SIP/500-b7807e88”, “0?report”) in new stack
– Executing [s@macro-user-callerid:3] ExecIf(“SIP/500-b7807e88”, “1|Set|REALCALLERIDNUM=500”) in new stack
– Executing [s@macro-user-callerid:4] Set(“SIP/500-b7807e88”, “AMPUSER=500”) in new stack
– Executing [s@macro-user-callerid:5] Set(“SIP/500-b7807e88”, “AMPUSERCIDNAME=man”) in new stack
– Executing [s@macro-user-callerid:6] GotoIf(“SIP/500-b7807e88”, “0?report”) in new stack
– Executing [s@macro-user-callerid:7] Set(“SIP/500-b7807e88”, “AMPUSERCID=500”) in new stack
– Executing [s@macro-user-callerid:8] Set(“SIP/500-b7807e88”, “CALLERID(all)=“man” <500>”) in new stack
– Executing [s@macro-user-callerid:9] Set(“SIP/500-b7807e88”, “REALCALLERIDNUM=500”) in new stack
– Executing [s@macro-user-callerid:10] GotoIf(“SIP/500-b7807e88”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,19)
– Executing [s@macro-user-callerid:19] NoOp(“SIP/500-b7807e88”, “Using CallerID “man” <500>”) in new stack
– Executing [0772328091@from-internal:2] Set(“SIP/500-b7807e88”, “_NODEST=”) in new stack
– Executing [0772328091@from-internal:3] Macro(“SIP/500-b7807e88”, “record-enable|500|OUT|”) in new stack
– Executing [s@macro-record-enable:1] GotoIf(“SIP/500-b7807e88”, “1?check”) in new stack
– Goto (macro-record-enable,s,4)
– Executing [s@macro-record-enable:4] AGI(“SIP/500-b7807e88”, “recordingcheck|20100323-090425|1269315265.5”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck|20100323-090425|1269315265.5: Outbound recording not enabled
– AGI Script recordingcheck completed, returning 0
– Executing [s@macro-record-enable:5] MacroExit(“SIP/500-b7807e88”, “”) in new stack
– Executing [0772328091@from-internal:4] Macro(“SIP/500-b7807e88”, “dialout-trunk|1|0772328091||”) in new stack
– Executing [s@macro-dialout-trunk:1] Set(“SIP/500-b7807e88”, “DIAL_TRUNK=1”) in new stack
– Executing [s@macro-dialout-trunk:2] GosubIf(“SIP/500-b7807e88”, “0?sub-pincheck|s|1”) in new stack
– Executing [s@macro-dialout-trunk:3] GotoIf(“SIP/500-b7807e88”, “0?disabletrunk|1”) in new stack
– Executing [s@macro-dialout-trunk:4] Set(“SIP/500-b7807e88”, “DIAL_NUMBER=0772328091”) in new stack
– Executing [s@macro-dialout-trunk:5] Set(“SIP/500-b7807e88”, “DIAL_TRUNK_OPTIONS=tr”) in new stack
– Executing [s@macro-dialout-trunk:6] Set(“SIP/500-b7807e88”, “OUTBOUND_GROUP=OUT_1”) in new stack
– Executing [s@macro-dialout-trunk:7] GotoIf(“SIP/500-b7807e88”, “0?nomax”) in new stack
– Executing [s@macro-dialout-trunk:8] GotoIf(“SIP/500-b7807e88”, “0?chanfull”) in new stack
– Executing [s@macro-dialout-trunk:9] GotoIf(“SIP/500-b7807e88”, “0?skipoutcid”) in new stack
– Executing [s@macro-dialout-trunk:10] Set(“SIP/500-b7807e88”, “DIAL_TRUNK_OPTIONS=”) in new stack
– Executing [s@macro-dialout-trunk:11] Macro(“SIP/500-b7807e88”, “outbound-callerid|1”) in new stack
– Executing [s@macro-outbound-callerid:1] ExecIf(“SIP/500-b7807e88”, “0|SetCallerPres|”) in new stack
– Executing [s@macro-outbound-callerid:2] ExecIf(“SIP/500-b7807e88”, “0|Set|REALCALLERIDNUM=500”) in new stack
– Executing [s@macro-outbound-callerid:3] GotoIf(“SIP/500-b7807e88”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,6)
– Executing [s@macro-outbound-callerid:6] Set(“SIP/500-b7807e88”, “USEROUTCID=”) in new stack
– Executing [s@macro-outbound-callerid:7] Set(“SIP/500-b7807e88”, “EMERGENCYCID=”) in new stack
– Executing [s@macro-outbound-callerid:8] Set(“SIP/500-b7807e88”, “TRUNKOUTCID=0312231818”) in new stack
– Executing [s@macro-outbound-callerid:9] GotoIf(“SIP/500-b7807e88”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,12)
– Executing [s@macro-outbound-callerid:12] ExecIf(“SIP/500-b7807e88”, “1|Set|CALLERID(all)=0312231818”) in new stack
– Executing [s@macro-outbound-callerid:13] GotoIf(“SIP/500-b7807e88”, “1?exit”) in new stack
– Goto (macro-outbound-callerid,s,11)
– Executing [s@macro-outbound-callerid:11] MacroExit(“SIP/500-b7807e88”, “”) in new stack
– Executing [s@macro-dialout-trunk:12] ExecIf(“SIP/500-b7807e88”, “1|AGI|fixlocalprefix”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
> fixlocalprefix: Using pattern XXXXXXXXXX
== fixlocalprefix: Dialpattern XXXXXXXXXX matched. 0772328091 -> 0772328091
– AGI Script fixlocalprefix completed, returning 0
– Executing [s@macro-dialout-trunk:13] Set(“SIP/500-b7807e88”, “OUTNUM=0772328091”) in new stack
– Executing [s@macro-dialout-trunk:14] Set(“SIP/500-b7807e88”, “custom=DAHDI/g0”) in new stack
– Executing [s@macro-dialout-trunk:15] ExecIf(“SIP/500-b7807e88”, “0|Set|DIAL_TRUNK_OPTIONS=M(setmusic^)”) in new stack
– Executing [s@macro-dialout-trunk:16] Macro(“SIP/500-b7807e88”, “dialout-trunk-predial-hook|”) in new stack
– Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“SIP/500-b7807e88”, “”) in new stack
– Executing [s@macro-dialout-trunk:17] GotoIf(“SIP/500-b7807e88”, “0?bypass|1”) in new stack
– Executing [s@macro-dialout-trunk:18] GotoIf(“SIP/500-b7807e88”, “0?customtrunk”) in new stack
– Executing [s@macro-dialout-trunk:19] Dial(“SIP/500-b7807e88”, “DAHDI/g0/0772328091|300|”) in new stack
== Everyone is busy/congested at this time (1:0/0/1)
– Executing [s@macro-dialout-trunk:20] Goto(“SIP/500-b7807e88”, “s-CHANUNAVAIL|1”) in new stack
– Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
– Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] GotoIf(“SIP/500-b7807e88”, “1?noreport”) in new stack
– Goto (macro-dialout-trunk,s-CHANUNAVAIL,3)
– Executing [s-CHANUNAVAIL@macro-dialout-trunk:3] NoOp(“SIP/500-b7807e88”, “TRUNK Dial failed due to CHANUNAVAIL (hangupcause: 0) - failing through to other trunks”) in new stack
– Executing [0772328091@from-internal:5] Macro(“SIP/500-b7807e88”, “outisbusy|”) in new stack
– Executing [s@macro-outisbusy:1] Playback(“SIP/500-b7807e88”, “all-circuits-busy-now|noanswer”) in new stack
– <SIP/500-b7807e88> Playing ‘all-circuits-busy-now’ (language ‘en’)
– Executing [s@macro-outisbusy:2] Playback(“SIP/500-b7807e88”, “pls-try-call-later|noanswer”) in new stack
– <SIP/500-b7807e88> Playing ‘pls-try-call-later’ (language ‘en’)
== Spawn extension (macro-outisbusy, s, 2) exited non-zero on ‘SIP/500-b7807e88’ in macro ‘outisbusy’
== Spawn extension (from-internal, 0772328091, 5) exited non-zero on ‘SIP/500-b7807e88’
– Executing [h@from-internal:1] Macro(“SIP/500-b7807e88”, “hangupcall”) in new stack
– Executing [s@macro-hangupcall:1] ResetCDR(“SIP/500-b7807e88”, “w”) in new stack
– Executing [s@macro-hangupcall:2] NoCDR(“SIP/500-b7807e88”, “”) in new stack
– Executing [s@macro-hangupcall:3] GotoIf(“SIP/500-b7807e88”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,6)
– Executing [s@macro-hangupcall:6] GotoIf(“SIP/500-b7807e88”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [s@macro-hangupcall:9] GotoIf(“SIP/500-b7807e88”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,11)
– Executing [s@macro-hangupcall:11] Hangup(“SIP/500-b7807e88”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 11) exited non-zero on ‘SIP/500-b7807e88’ in macro ‘hangupcall’
== Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/500-b7807e88’

  1. are you sure you have FXO modules and not FXS ones? what is the code of the modules you have and/or what is their color?
  2. please post the DAHDI config file (lile /etc/dahdi/system.conf)
  3. please post the chan_dahdi config file (like /etc/asterisk/chan_dahdi.conf and every included file)

[quote]
– Executing [s@macro-dialout-trunk:19] Dial(“SIP/500-b7807e88”, “DAHDI/g0/0772328091|300|”) in new stack
== Everyone is busy/congested at this time (1:0/0/1)[/quote]

Basically you are trying to dial on DAHDI, group #0 (DAHDI/g0) and no lines could be picked up. The main reason, in my opinion, is that your DAHDI is wrongly configured.

HTH,
Ioan.

Hi indreias,

Thank you for your repply.

I ordered TDP800P with 8 FXO port card. It have two red plugable circuits.

I was unable to find the /etc/asterisk/chan_dahdi.conf on the mentioned location. There was only two below mentioned files.

[root@localhost ~]# ls /etc/asterisk/chan_dahdi
chan_dahdi_additional.conf chan_dahdi.conf.template

[root@localhost ~]# cat /etc/dahdi/system.conf

Autogenerated by /usr/sbin/dahdi_genconf on Tue Mar 23 09:58:29 2010 – do not hand edit

Dahdi Configuration File

This file is parsed by the Dahdi Configurator, dahdi_cfg

Span 1: WCTDM/0 “Wildcard TDM800P Board 1” (MASTER)

fxsks=1
echocanceller=mg2,1
fxsks=2
echocanceller=mg2,2
fxsks=3
echocanceller=mg2,3
fxsks=4
echocanceller=mg2,4
fxsks=5
echocanceller=mg2,5
fxsks=6
echocanceller=mg2,6
fxsks=7
echocanceller=mg2,7
fxsks=8
echocanceller=mg2,8

Global data

loadzone = us
defaultzone = us

Please help me to solve this issue.

Thank yo verry much.

red modules - OK - them are FXO

please post chan_dahdi_additional.conf

In order to find which file is including chan_dahdi_additional.conf please run:

and post the content of that file as well.

Ioan.

Please post you dialplan,too.Maybe there are some issues!

Hi indreias,

Thank you for your quick reply,

Hear are the requested information,

[root@localhost ~]# cat /etc/asterisk/chan_dahdi_additional.conf
;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make ;
; custom modifications, details at: freepbx.org/configuration_files ;
;--------------------------------------------------------------------------------;
;

[root@localhost ~]#

[root@localhost ~]# grep chan_dahdi_additional.conf /etc/asterisk/*.conf
[root@localhost ~]#
[root@localhost ~]#

[root@localhost ~]# ls /etc/asterisk/
asterisk.conf iax.conf privacy.conf
cdr_mysql.conf iax_custom.conf queues_additional.conf
cdr_mysql.conf.bak iax_custom_post.conf queues.conf
chan_dahdi_additional.conf iax_general_additional.conf queues_custom.conf
chan_dahdi.conf.template iax_general_custom.conf queues_custom_general.conf
dahdi-channels.conf iax_registrations.conf queues_general_additional.conf
dahdi-channels.conf.bak iax_registrations_custom.conf queues_post_custom.conf
enum.conf indications.conf rtp.conf
extensions_additional.conf localprefixes.conf sip_additional.conf
extensions.conf logger.conf sip.conf
extensions_custom.conf manager_additional.conf sip_custom.conf
extensions_custom.conf.sample manager.conf sip_custom_post.conf
extensions_override_freepbx.conf manager.conf.bak sip_general_additional.conf
features_applicationmap_additional.conf manager_custom.conf sip_general_custom.conf
features_applicationmap_custom.conf meetme_additional.conf sip_nat.conf
features.conf meetme.conf sip_registrations.conf
features_featuremap_additional.conf modem.conf sip_registrations_custom.conf
features_featuremap_custom.conf modules.conf version
features_general_additional.conf musiconhold_additional.conf vm_email.inc
features_general_custom.conf musiconhold.conf vm_general.inc
freepbx_featurecodes.conf musiconhold_custom.conf voicemail.conf
freepbx_module_admin.conf no voicemail.conf.template
globals_custom.conf phone.conf zapata_additional.conf
iax_additional.conf phpagi.conf zapata.conf.template
[root@localhost ~]#

[root@localhost asterisk]# cat dahdi-channels.conf
; Autogenerated by /usr/sbin/dahdi_genconf on Tue Mar 23 09:58:29 2010 – do not hand edit
; Dahdi Channels Configurations (chan_dahdi.conf)
;
; This is not intended to be a complete chan_dahdi.conf. Rather, it is intended
; to be #include-d by /etc/asterisk/chan_dahdi.conf that will include the global settings
;

; Span 1: WCTDM/0 “Wildcard TDM800P Board 1” (MASTER)
;;; line="1 WCTDM/0/0"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 1
callerid=
group=
context=default

;;; line="2 WCTDM/0/1"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 2
callerid=
group=
context=default

;;; line="3 WCTDM/0/2"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 3
callerid=
group=
context=default

;;; line="4 WCTDM/0/3"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 4
callerid=
group=
context=default

;;; line="5 WCTDM/0/4"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 5
callerid=
group=
context=default

;;; line="6 WCTDM/0/5"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 6
callerid=
group=
context=default

;;; line="7 WCTDM/0/6"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 7
callerid=
group=
context=default

;;; line="8 WCTDM/0/7"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 8
callerid=
group=
context=default

Hi sunking,

I’m using simple dial plan.

all 10digit XXXXXXXXXX will route to fxo trunk.

You are not using a simple dialplan; there are large numbers of steps, including AGI steps, before the Dial applications is called.

You are actually getting a channel unavailable status, rather than a busy status. This is indicative of a misconfiguration.

I am not really familiar with Dahdi and circuit switched lines, but I rather guess that the RED at the end of the status lines means that there is a serious alarm condition on the line.

run the following command:

cat << EOF > /etc/asterisk/chan_dahdi.conf
[trunkgroups]
[channels]
#include dahdi-channels.conf
EOF

stop your Asterisk instance (I think you are using A FreePBX GUI so you should issue amportal stop)
start your Asterisk instance (…amportal start)

post here the results of:

dahdi_cfg -vv lsdahdi

HTH,
Ioan.

Thank you for ur repply. Hear are the requested information.

[root@localhost asterisk]# cat /etc/asterisk/chan_dahdi
chan_dahdi_additional.conf chan_dahdi.conf chan_dahdi.conf.template

[root@localhost asterisk]# cat /etc/asterisk/chan_dahdi.conf
[trunkgroups]
[channels]
#include dahdi-channels.conf
[root@localhost asterisk]#

[root@localhost asterisk]# amportal stop

STOPPING ASTERISK
Asterisk Stopped

STOPPING FOP SERVER
FOP Server Stopped
[root@localhost asterisk]# amportal start

SETTING FILE PERMISSIONS
Permissions OK

STARTING ASTERISK
Asterisk Started

STARTING FOP SERVER
FOP Server Started
[root@localhost asterisk]# dahdi_cfg -vv
DAHDI Tools Version - 2.1.0.2

DAHDI Version: 2.1.0.4
Echo Canceller(s): MG2
Configuration

Channel map:

Channel 01: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 01)
Channel 02: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 02)
Channel 03: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 03)
Channel 04: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 04)
Channel 05: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 05)
Channel 06: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 06)
Channel 07: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 07)
Channel 08: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 08)

8 channels to configure.

Setting echocan for channel 1 to mg2
Setting echocan for channel 2 to mg2
Setting echocan for channel 3 to mg2
Setting echocan for channel 4 to mg2
Setting echocan for channel 5 to mg2
Setting echocan for channel 6 to mg2
Setting echocan for channel 7 to mg2
Setting echocan for channel 8 to mg2
[root@localhost asterisk]# lsdahdi

Span 1: WCTDM/0 “Wildcard TDM800P Board 1” (MASTER)

1 FXS FXSKS (In use) (EC: MG2) RED
2 FXS FXSKS (In use) (EC: MG2) RED
3 FXS FXSKS (In use) (EC: MG2) RED
4 FXS FXSKS (In use) (EC: MG2) RED
5 FXS FXSKS (In use) (EC: MG2) RED
6 FXS FXSKS (In use) (EC: MG2) RED
7 FXS FXSKS (In use) (EC: MG2) RED
8 FXS FXSKS (In use) (EC: MG2) RED
[root@localhost asterisk]#

ok - we have to debug one more issue -> why lsdahdi show “FXS FXSKS” instead of “FXO FXSKS”

For this please provide the output from:

[quote=“indreias”]ok - we have to debug one more issue -> why lsdahdi show “FXS FXSKS” instead of “FXO FXSKS”

For this please provide the output from:

Hi indreias,

Now im @ office and i lost my connection to my home asterisk server. So as soon as i go home i will post that debug.
Any way thank you very much for your kind help.

Hi friend,

Hear are the requested details.

[root@localhost ~]# dmesg | grep AUTO
Port 1: Installed – AUTO FXO (FCC mode)
Port 2: Installed – AUTO FXO (FCC mode)
Port 3: Installed – AUTO FXO (FCC mode)
Port 4: Installed – AUTO FXO (FCC mode)
Port 5: Installed – AUTO FXO (FCC mode)
Port 6: Installed – AUTO FXO (FCC mode)
Port 7: Installed – AUTO FXO (FCC mode)
Port 8: Installed – AUTO FXO (FCC mode)

ok - so the ports are correctly identified as FXO ones…probably there is an error in lsdahdi output (as I do not see FXO there).

so - now we hope DAHDI is well configured but we see them all in RED. This is an indication that the line is not detected.
Did you put a PSTN line into one of the FXO ports? It is a trivial question but maybe you forget it.

Ioan.

hi frnd,

I think i found the problem. Those PST lines are connected through splitters. When i plug normal phone to the PSTN line through splitters it worked well. So i didn’t care about it. But unfortunately through splitter FXO won’t detect the pstn line. That’s terrible. When i removed the splitter and connect the line now its working fine.

Any way your last hint helped me to sort out this problem and i really want to thank you.

But i still have a small doubt. I don’t zapata.conf in my asterisk folder. So where should i mention the “answeronpolarityswitch=yes” & hanguponpolarityswitch=yes to support line reversal ?

Thank you.

glad to hear that you have now a working system.

for all zapata settings please use chan_dahdi.conf, under the [channels] context, just before you have the include command.

BR,
Ioan.