All circut busy now

hi everyone

i dont know why sometimes when i want to call outbound for example pstn call i recieve a message “all circut busy now” and i have to restart system.but after hours or days this circle continue.I use sangoma a200 card and i have 40 sip extension. i have put my asterisk -rv after call outbound. there is a phrase here is interesting :
TRUNK Dial failed due to CONGESTION - failing through to other trunks

Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck,20100501-120938,1272699578.144: Outbound recording not enabled
– <SIP/1005-b7824050>AGI Script recordingcheck completed, returning 0
– Executing [[email protected]:5] MacroExit(“SIP/1005-b7824050”, “”) in new stack
– Executing [[email protected]:4] Macro(“SIP/1005-b7824050”, “dialout-trunk,1,119,”) in new stack
– Executing [[email protected]:1] Set(“SIP/1005-b7824050”, “DIAL_TRUNK=1”) in new stack
– Executing [[email protected]:2] GosubIf(“SIP/1005-b7824050”, “0?sub-pincheck,s,1”) in new stack
– Executing [[email protected]cro-dialout-trunk:3] GotoIf(“SIP/1005-b7824050”, “0?disabletrunk,1”) in new stack
– Executing [[email protected]:4] Set(“SIP/1005-b7824050”, “DIAL_NUMBER=119”) in new stack
– Executing [[email protected]:5] Set(“SIP/1005-b7824050”, “DIAL_TRUNK_OPTIONS=tr”) in new stack
– Executing [[email protected]:6] Set(“SIP/1005-b7824050”, “OUTBOUND_GROUP=OUT_1”) in new stack
– Executing [[email protected]:7] GotoIf(“SIP/1005-b7824050”, “1?nomax”) in new stack
– Goto (macro-dialout-trunk,s,9)
– Executing [[email protected]:9] GotoIf(“SIP/1005-b7824050”, “0?skipoutcid”) in new stack
– Executing [[email protected]:10] Set(“SIP/1005-b7824050”, “DIAL_TRUNK_OPTIONS=”) in new stack
– Executing [[email protected]:11] Macro(“SIP/1005-b7824050”, “outbound-callerid,1”) in new stack
– Executing [[email protected]:1] ExecIf(“SIP/1005-b7824050”, “0?Set(CALLERPRES()=)”) in new stack
– Executing [[email protected]:2] ExecIf(“SIP/1005-b7824050”, “0?Set(REALCALLERIDNUM=1005)”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/1005-b7824050”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,6)
– Executing [[email protected]:6] Set(“SIP/1005-b7824050”, “USEROUTCID=”) in new stack
– Executing [[email protected]:7] Set(“SIP/1005-b7824050”, “EMERGENCYCID=”) in new stack
– Executing [[email protected]:8] Set(“SIP/1005-b7824050”, “TRUNKOUTCID=”) in new stack
– Executing [[email protected]:9] GotoIf(“SIP/1005-b7824050”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,12)
– Executing [[email protected]:12] ExecIf(“SIP/1005-b7824050”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [[email protected]:13] ExecIf(“SIP/1005-b7824050”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [[email protected]:14] ExecIf(“SIP/1005-b7824050”, “0?Set(CALLERPRES()=prohib_passed_screen)”) in new stack
– Executing [[email protected]:12] ExecIf(“SIP/1005-b7824050”, “1?AGI(fixlocalprefix)”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
– <SIP/1005-b7824050>AGI Script fixlocalprefix completed, returning 0
– Executing [[email protected]:13] Set(“SIP/1005-b7824050”, “OUTNUM=119”) in new stack
– Executing [[email protected]:14] Set(“SIP/1005-b7824050”, “custom=DAHDI/g0”) in new stack
– Executing [[email protected]:15] ExecIf(“SIP/1005-b7824050”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^))”) in new stack
– Executing [[email protected]:16] Macro(“SIP/1005-b7824050”, “dialout-trunk-predial-hook,”) in new stack
– Executing [[email protected]:1] MacroExit(“SIP/1005-b7824050”, “”) in new stack
– Executing [[email protected]:17] GotoIf(“SIP/1005-b7824050”, “0?bypass,1”) in new stack
– Executing [[email protected]:18] GotoIf(“SIP/1005-b7824050”, “0?customtrunk”) in new stack
– Executing [[email protected]:19] Dial(“SIP/1005-b7824050”, “DAHDI/g0/119,300,”) in new stack
== Everyone is busy/congested at this time (1:0/1/0)
– Executing [[email protected]:20] Goto(“SIP/1005-b7824050”, “s-CONGESTION,1”) in new stack
– Goto (macro-dialout-trunk,s-CONGESTION,1)
– Executing [[email protected]:1] GotoIf(“SIP/1005-b7824050”, “1?noreport”) in new stack
– Goto (macro-dialout-trunk,s-CONGESTION,3)
– Executing [[email protected]:3] NoOp(“SIP/1005-b7824050”, “TRUNK Dial failed due to CONGESTION - failing through to other trunks”) in new stack
– Executing [[email protected]:5] Macro(“SIP/1005-b7824050”, “outisbusy,”) in new stack
– Executing [[email protected]:1] Playback(“SIP/1005-b7824050”, “all-circuits-busy-now,noanswer”) in new stack
– <SIP/1005-b7824050> Playing ‘all-circuits-busy-now.ulaw’ (language ‘en’)
– Executing [[email protected]:2] Playback(“SIP/1005-b7824050”, “pls-try-call-later,noanswer”) in new stack
– <SIP/1005-b7824050> Playing ‘pls-try-call-later.ulaw’ (language ‘en’)
– Executing [[email protected]:3] Macro(“SIP/1005-b7824050”, “hangupcall”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/1005-b7824050”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,4)
– Executing [[email protected]:4] GotoIf(“SIP/1005-b7824050”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,7)
– Executing [[email protected]:7] GotoIf(“SIP/1005-b7824050”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [[email protected]:9] Hangup(“SIP/1005-b7824050”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘SIP/1005-b7824050’ in macro ‘hangupcall’
== Spawn extension (macro-outisbusy, s, 3) exited non-zero on ‘SIP/1005-b7824050’ in macro ‘outisbusy’
== Spawn extension (from-internal, 9119, 5) exited non-zero on ‘SIP/1005-b7824050’
– Executing [[email protected]:1] Macro(“SIP/1005-b7824050”, “hangupcall”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/1005-b7824050”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,4)
– Executing [[email protected]:4] GotoIf(“SIP/1005-b7824050”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,7)
– Executing [[email protected]:7] GotoIf(“SIP/1005-b7824050”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [[email protected]:9] Hangup(“SIP/1005-b7824050”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘SIP/1005-b7824050’ in macro ‘hangupcall’
== Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/1005-b7824050

what should i do? :frowning:

The trunk is reporting congestion.

You can see it in the response:

-- Executing [[email protected]:19] Dial("SIP/1005-b7824050", "DAHDI/g0/119,300,") in new stack

Starting with FreePBX 2.7, there are more details printed out that report the HANGUPCAUSE which may provide more insight into what the channel is reporting back.

thnks but how can i use freepbx 2.7 and how can i take report from hangupcause.thanks in advance