DAHDI Trunk Congestion after Asterisk Server Reboot [FIXED]

Dear,

After I reboot the computer where Asterisk is installed and I try to make a call thru dahdi trunk, this trunk give me a congestion message until I make an external call fro manother telephone to my asterisk box. After taht, calls trhu dahdi trunk works perfectly.

This is the log of the first situation (with congestion error):

<------------>
Scheduling destruction of SIP dialog ‘dec2a7b-0d8c9225-8393a@201.48.113.132’ in 32000 ms (Method: OPTIONS)
Really destroying SIP dialog ‘dec2a7b-2d1c9225-a193a@201.48.113.132’ Method: OPTIONS
– Executing [910621@from-internal:1] Set(“DAHDI/3-1”, “EMERGENCYROUTE=YES”) in new stack
– Executing [910621@from-internal:2] Set(“DAHDI/3-1”, “__ROUTENAME=Net”) in new stack
– Executing [910621@from-internal:3] Macro(“DAHDI/3-1”, “user-callerid,SKIPTTL,”) in new stack
– Executing [s@macro-user-callerid:1] Set(“DAHDI/3-1”, “AMPUSER=7000”) in new stack
– Executing [s@macro-user-callerid:2] GotoIf(“DAHDI/3-1”, “0?report”) in new stack
– Executing [s@macro-user-callerid:3] ExecIf(“DAHDI/3-1”, “1?Set(REALCALLERIDNUM=7000)”) in new stack
– Executing [s@macro-user-callerid:4] Set(“DAHDI/3-1”, “AMPUSER=7000”) in new stack
– Executing [s@macro-user-callerid:5] Set(“DAHDI/3-1”, “AMPUSERCIDNAME=Ramal Casa”) in new stack
– Executing [s@macro-user-callerid:6] GotoIf(“DAHDI/3-1”, “0?report”) in new stack
– Executing [s@macro-user-callerid:7] Set(“DAHDI/3-1”, “AMPUSERCID=7000”) in new stack
– Executing [s@macro-user-callerid:8] Set(“DAHDI/3-1”, “CALLERID(all)=“Ramal Casa” <7000>”) in new stack
– Executing [s@macro-user-callerid:9] ExecIf(“DAHDI/3-1”, “0?Set(CHANNEL(language)=)”) in new stack
– Executing [s@macro-user-callerid:10] GotoIf(“DAHDI/3-1”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,19)
– Executing [s@macro-user-callerid:19] NoOp(“DAHDI/3-1”, “Using CallerID “Ramal Casa” <7000>”) in new stack
– Executing [910621@from-internal:4] Set(“DAHDI/3-1”, “_NODEST=”) in new stack
– Executing [910621@from-internal:5] Macro(“DAHDI/3-1”, “record-enable,7000,OUT,”) in new stack
– Executing [s@macro-record-enable:1] GotoIf(“DAHDI/3-1”, “1?check”) in new stack
– Goto (macro-record-enable,s,4)
– Executing [s@macro-record-enable:4] AGI(“DAHDI/3-1”, “recordingcheck,20090916-122234,sip.lcvleo.com-1253114547.2”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck,20090916-122234,sip.lcvleo.com-1253114547.2: Outbound recording enabled.
recordingcheck,20090916-122234,sip.lcvleo.com-1253114547.2: CALLFILENAME=OUT7000-20090916-122234-sip.lcvleo.com-1253114547.2
– <DAHDI/3-1>AGI Script recordingcheck completed, returning 0
– Executing [s@macro-record-enable:999] MixMonitor(“DAHDI/3-1”, “/home/asterisk/OUT7000-20090916-122234-sip.lcvleo.com-1253114547.2.wav,”) in new stack
– Executing [910621@from-internal:6] Macro(“DAHDI/3-1”, “dialout-trunk,1,10621,”) in new stack
– Executing [s@macro-dialout-trunk:1] Set(“DAHDI/3-1”, “DIAL_TRUNK=1”) in new stack
– Executing [s@macro-dialout-trunk:2] AGI(“DAHDI/3-1”, “checkperms.agi”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/checkperms.agi
== Begin MixMonitor Recording DAHDI/3-1
checkperms.agi: Starting checkperms.agi
> checkperms.agi: SQL Debug: SELECT allowed,faildest FROM routepermissions WHERE exten=‘7000’ and routename=‘Net’
== checkperms.agi: Access to route granted
– <DAHDI/3-1>AGI Script checkperms.agi completed, returning 0
– Executing [s@macro-dialout-trunk:3] GosubIf(“DAHDI/3-1”, “0?sub-pincheck,s,1”) in new stack
– Executing [s@macro-dialout-trunk:4] GotoIf(“DAHDI/3-1”, “0?disabletrunk,1”) in new stack
– Executing [s@macro-dialout-trunk:5] Set(“DAHDI/3-1”, “DIAL_NUMBER=10621”) in new stack
– Executing [s@macro-dialout-trunk:6] Set(“DAHDI/3-1”, “DIAL_TRUNK_OPTIONS=tr”) in new stack
– Executing [s@macro-dialout-trunk:7] Set(“DAHDI/3-1”, “OUTBOUND_GROUP=OUT_1”) in new stack
– Executing [s@macro-dialout-trunk:8] GotoIf(“DAHDI/3-1”, “0?nomax”) in new stack
– Executing [s@macro-dialout-trunk:9] GotoIf(“DAHDI/3-1”, “0?chanfull”) in new stack
– Executing [s@macro-dialout-trunk:10] GotoIf(“DAHDI/3-1”, “0?skipoutcid”) in new stack
– Executing [s@macro-dialout-trunk:11] Set(“DAHDI/3-1”, “DIAL_TRUNK_OPTIONS=”) in new stack
– Executing [s@macro-dialout-trunk:12] Macro(“DAHDI/3-1”, “outbound-callerid,1”) in new stack
– Executing [s@macro-outbound-callerid:1] ExecIf(“DAHDI/3-1”, “0?Set(CALLERPRES()=)”) in new stack
– Executing [s@macro-outbound-callerid:2] ExecIf(“DAHDI/3-1”, “0?Set(REALCALLERIDNUM=7000)”) in new stack
– Executing [s@macro-outbound-callerid:3] GotoIf(“DAHDI/3-1”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,6)
– Executing [s@macro-outbound-callerid:6] Set(“DAHDI/3-1”, “USEROUTCID=”) in new stack
– Executing [s@macro-outbound-callerid:7] Set(“DAHDI/3-1”, “EMERGENCYCID=”) in new stack
– Executing [s@macro-outbound-callerid:8] Set(“DAHDI/3-1”, “TRUNKOUTCID=”) in new stack
– Executing [s@macro-outbound-callerid:9] GotoIf(“DAHDI/3-1”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,12)
– Executing [s@macro-outbound-callerid:12] ExecIf(“DAHDI/3-1”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [s@macro-outbound-callerid:13] ExecIf(“DAHDI/3-1”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [s@macro-outbound-callerid:14] ExecIf(“DAHDI/3-1”, “0?Set(CALLERPRES()=prohib_passed_screen)”) in new stack
– Executing [s@macro-dialout-trunk:13] ExecIf(“DAHDI/3-1”, “1?AGI(fixlocalprefix)”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
> fixlocalprefix: Using pattern [1-6]X.
== fixlocalprefix: Dialpattern [1-6]X. matched. 10621 -> 10621
– <DAHDI/3-1>AGI Script fixlocalprefix completed, returning 0
– Executing [s@macro-dialout-trunk:14] Set(“DAHDI/3-1”, “OUTNUM=10621”) in new stack
– Executing [s@macro-dialout-trunk:15] Set(“DAHDI/3-1”, “custom=DAHDI/g0”) in new stack
– Executing [s@macro-dialout-trunk:16] ExecIf(“DAHDI/3-1”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^))”) in new stack
– Executing [s@macro-dialout-trunk:17] Macro(“DAHDI/3-1”, “dialout-trunk-predial-hook,”) in new stack
– Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“DAHDI/3-1”, “”) in new stack
– Executing [s@macro-dialout-trunk:18] GotoIf(“DAHDI/3-1”, “0?bypass,1”) in new stack
– Executing [s@macro-dialout-trunk:19] GotoIf(“DAHDI/3-1”, “0?customtrunk”) in new stack
– Executing [s@macro-dialout-trunk:20] Dial(“DAHDI/3-1”, “DAHDI/g0/10621,300,”) in new stack
== Everyone is busy/congested at this time (1:0/1/0)
– Executing [s@macro-dialout-trunk:21] Goto(“DAHDI/3-1”, “s-CONGESTION,1”) in new stack
– Goto (macro-dialout-trunk,s-CONGESTION,1)
– Executing [s-CONGESTION@macro-dialout-trunk:1] GotoIf(“DAHDI/3-1”, “1?noreport”) in new stack
– Goto (macro-dialout-trunk,s-CONGESTION,3)
– Executing [s-CONGESTION@macro-dialout-trunk:3] NoOp(“DAHDI/3-1”, “TRUNK Dial failed due to CONGESTION - failing through to other trunks”) in new stack
– Executing [910621@from-internal:7] Macro(“DAHDI/3-1”, “outisbusy,”) in new stack
– Executing [s@macro-outisbusy:1] GotoIf(“DAHDI/3-1”, “1?emergency,1”) in new stack
– Goto (macro-outisbusy,emergency,1)
– Executing [emergency@macro-outisbusy:1] Playback(“DAHDI/3-1”, “all-circuits-busy-now&pls-try-call-later”) in new stack
– <DAHDI/3-1> Playing ‘all-circuits-busy-now.gsm’ (language ‘en’)
== Manager ‘admin’ logged on from 127.0.0.1
– <DAHDI/3-1> Playing ‘pls-try-call-later.gsm’ (language ‘en’)
== Manager ‘admin’ logged off from 127.0.0.1
– Executing [emergency@macro-outisbusy:2] Congestion(“DAHDI/3-1”, “20”) in new stack
Really destroying SIP dialog '692b76031af4f0ad5c7ae6475e55f965@lcvleo.com’ Method: REGISTER
Really destroying SIP dialog '121fdb88531a76d402b7deae3728fdad@lcvleo.com’ Method: REGISTER
== Manager ‘admin’ logged on from 127.0.0.1
== Manager ‘admin’ logged off from 127.0.0.1
lcvserv*CLI>
<— SIP read from UDP://201.48.113.131:5060 —>
OPTIONS sip:12025186@189.122.161.166 SIP/2.0
Via: SIP/2.0/UDP 201.48.113.131:5060;branch=0
From: sip:pinger@201.48.113.143;tag=caea3456
To: sip:12025186@189.122.161.166
Call-ID: ff9e1851-7d6e3465-0f222@201.48.113.131
CSeq: 1 OPTIONS
Content-Length: 0

<------------->

This is the second situation’s log messages (without congestion error):

<------------->
— (8 headers 0 lines) —
Scheduling destruction of SIP dialog '121fdb88531a76d402b7deae3728fdad@lcvleo.com’ in 32000 ms (Method: REGISTER)
== Manager ‘admin’ logged on from 127.0.0.1
== Manager ‘admin’ logged off from 127.0.0.1
– Starting simple switch on ‘DAHDI/3-1’
– Executing [910621@from-internal:1] Set(“DAHDI/3-1”, “EMERGENCYROUTE=YES”) in new stack
– Executing [910621@from-internal:2] Set(“DAHDI/3-1”, “__ROUTENAME=Net”) in new stack
– Executing [910621@from-internal:3] Macro(“DAHDI/3-1”, “user-callerid,SKIPTTL,”) in new stack
– Executing [s@macro-user-callerid:1] Set(“DAHDI/3-1”, “AMPUSER=7000”) in new stack
– Executing [s@macro-user-callerid:2] GotoIf(“DAHDI/3-1”, “0?report”) in new stack
– Executing [s@macro-user-callerid:3] ExecIf(“DAHDI/3-1”, “1?Set(REALCALLERIDNUM=7000)”) in new stack
– Executing [s@macro-user-callerid:4] Set(“DAHDI/3-1”, “AMPUSER=7000”) in new stack
– Executing [s@macro-user-callerid:5] Set(“DAHDI/3-1”, “AMPUSERCIDNAME=Ramal Casa”) in new stack
– Executing [s@macro-user-callerid:6] GotoIf(“DAHDI/3-1”, “0?report”) in new stack
– Executing [s@macro-user-callerid:7] Set(“DAHDI/3-1”, “AMPUSERCID=7000”) in new stack
– Executing [s@macro-user-callerid:8] Set(“DAHDI/3-1”, “CALLERID(all)=“Ramal Casa” <7000>”) in new stack
– Executing [s@macro-user-callerid:9] ExecIf(“DAHDI/3-1”, “0?Set(CHANNEL(language)=)”) in new stack
– Executing [s@macro-user-callerid:10] GotoIf(“DAHDI/3-1”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,19)
– Executing [s@macro-user-callerid:19] NoOp(“DAHDI/3-1”, “Using CallerID “Ramal Casa” <7000>”) in new stack
– Executing [910621@from-internal:4] Set(“DAHDI/3-1”, “_NODEST=”) in new stack
– Executing [910621@from-internal:5] Macro(“DAHDI/3-1”, “record-enable,7000,OUT,”) in new stack
– Executing [s@macro-record-enable:1] GotoIf(“DAHDI/3-1”, “1?check”) in new stack
– Goto (macro-record-enable,s,4)
– Executing [s@macro-record-enable:4] AGI(“DAHDI/3-1”, “recordingcheck,20090916-122548,sip.lcvleo.com-1253114741.4”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck,20090916-122548,sip.lcvleo.com-1253114741.4: Outbound recording enabled.
recordingcheck,20090916-122548,sip.lcvleo.com-1253114741.4: CALLFILENAME=OUT7000-20090916-122548-sip.lcvleo.com-1253114741.4
– <DAHDI/3-1>AGI Script recordingcheck completed, returning 0
– Executing [s@macro-record-enable:999] MixMonitor(“DAHDI/3-1”, “/home/asterisk/OUT7000-20090916-122548-sip.lcvleo.com-1253114741.4.wav,”) in new stack
– Executing [910621@from-internal:6] Macro(“DAHDI/3-1”, “dialout-trunk,1,10621,”) in new stack
– Executing [s@macro-dialout-trunk:1] Set(“DAHDI/3-1”, “DIAL_TRUNK=1”) in new stack
– Executing [s@macro-dialout-trunk:2] AGI(“DAHDI/3-1”, “checkperms.agi”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/checkperms.agi
== Begin MixMonitor Recording DAHDI/3-1
checkperms.agi: Starting checkperms.agi
> checkperms.agi: SQL Debug: SELECT allowed,faildest FROM routepermissions WHERE exten=‘7000’ and routename=‘Net’
== checkperms.agi: Access to route granted
– <DAHDI/3-1>AGI Script checkperms.agi completed, returning 0
– Executing [s@macro-dialout-trunk:3] GosubIf(“DAHDI/3-1”, “0?sub-pincheck,s,1”) in new stack
– Executing [s@macro-dialout-trunk:4] GotoIf(“DAHDI/3-1”, “0?disabletrunk,1”) in new stack
– Executing [s@macro-dialout-trunk:5] Set(“DAHDI/3-1”, “DIAL_NUMBER=10621”) in new stack
– Executing [s@macro-dialout-trunk:6] Set(“DAHDI/3-1”, “DIAL_TRUNK_OPTIONS=tr”) in new stack
– Executing [s@macro-dialout-trunk:7] Set(“DAHDI/3-1”, “OUTBOUND_GROUP=OUT_1”) in new stack
– Executing [s@macro-dialout-trunk:8] GotoIf(“DAHDI/3-1”, “0?nomax”) in new stack
– Executing [s@macro-dialout-trunk:9] GotoIf(“DAHDI/3-1”, “0?chanfull”) in new stack
– Executing [s@macro-dialout-trunk:10] GotoIf(“DAHDI/3-1”, “0?skipoutcid”) in new stack
– Executing [s@macro-dialout-trunk:11] Set(“DAHDI/3-1”, “DIAL_TRUNK_OPTIONS=”) in new stack
– Executing [s@macro-dialout-trunk:12] Macro(“DAHDI/3-1”, “outbound-callerid,1”) in new stack
– Executing [s@macro-outbound-callerid:1] ExecIf(“DAHDI/3-1”, “0?Set(CALLERPRES()=)”) in new stack
– Executing [s@macro-outbound-callerid:2] ExecIf(“DAHDI/3-1”, “0?Set(REALCALLERIDNUM=7000)”) in new stack
– Executing [s@macro-outbound-callerid:3] GotoIf(“DAHDI/3-1”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,6)
– Executing [s@macro-outbound-callerid:6] Set(“DAHDI/3-1”, “USEROUTCID=”) in new stack
– Executing [s@macro-outbound-callerid:7] Set(“DAHDI/3-1”, “EMERGENCYCID=”) in new stack
– Executing [s@macro-outbound-callerid:8] Set(“DAHDI/3-1”, “TRUNKOUTCID=”) in new stack
– Executing [s@macro-outbound-callerid:9] GotoIf(“DAHDI/3-1”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,12)
– Executing [s@macro-outbound-callerid:12] ExecIf(“DAHDI/3-1”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [s@macro-outbound-callerid:13] ExecIf(“DAHDI/3-1”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [s@macro-outbound-callerid:14] ExecIf(“DAHDI/3-1”, “0?Set(CALLERPRES()=prohib_passed_screen)”) in new stack
– Executing [s@macro-dialout-trunk:13] ExecIf(“DAHDI/3-1”, “1?AGI(fixlocalprefix)”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
> fixlocalprefix: Using pattern [1-6]X.
== fixlocalprefix: Dialpattern [1-6]X. matched. 10621 -> 10621
– <DAHDI/3-1>AGI Script fixlocalprefix completed, returning 0
– Executing [s@macro-dialout-trunk:14] Set(“DAHDI/3-1”, “OUTNUM=10621”) in new stack
– Executing [s@macro-dialout-trunk:15] Set(“DAHDI/3-1”, “custom=DAHDI/g0”) in new stack
– Executing [s@macro-dialout-trunk:16] ExecIf(“DAHDI/3-1”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^))”) in new stack
– Executing [s@macro-dialout-trunk:17] Macro(“DAHDI/3-1”, “dialout-trunk-predial-hook,”) in new stack
– Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“DAHDI/3-1”, “”) in new stack
– Executing [s@macro-dialout-trunk:18] GotoIf(“DAHDI/3-1”, “0?bypass,1”) in new stack
– Executing [s@macro-dialout-trunk:19] GotoIf(“DAHDI/3-1”, “0?customtrunk”) in new stack
– Executing [s@macro-dialout-trunk:20] Dial(“DAHDI/3-1”, “DAHDI/g0/10621,300,”) in new stack
– Called g0/10621
lcvserv*CLI>
<— SIP read from UDP://201.48.113.131:5060 —>
OPTIONS sip:12025186@189.122.161.166 SIP/2.0
Via: SIP/2.0/UDP 201.48.113.131:5060;branch=0
From: sip:pinger@201.48.113.143;tag=f38d3456
To: sip:12025186@189.122.161.166
Call-ID: ff9e1851-a6014465-6a322@201.48.113.131
CSeq: 1 OPTIONS
Content-Length: 0

<------------->

Can anybody helpe me?

Thank you so much! :smile: