Trunk channel UNAVAILABLE to call out?

Hello i have a grandstream 4104 everything is working but i lost my pbx hard drive die out i had to start all over. So i got everything back and i can call in But when i call out it said all circuits are busy now please try again later. So i looked at putty and i get this message

== Everyone is busy/congested at this time (1:0/0/1)
– Executing [[email protected]:23] NoOp(“SIP/806-00007e32”, “Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 20”) in new stack
– Executing [[email protected]:24] GotoIf(“SIP/806-00007e32”, “0?continue,1:s-CHANUNAVAIL,1”) in new stack
– Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
– Executing [[email protected]:1] Set(“SIP/806-00007e32”, “RC=20”) in new stack
– Executing [[email protected]:2] Goto(“SIP/806-00007e32”, “20,1”) in new stack
– Goto (macro-dialout-trunk,20,1)
– Executing [2[email protected]:1] Goto(“SIP/806-00007e32”, “continue,1”) in new stack
– Goto (macro-dialout-trunk,continue,1)
– Executing [[email protected]:1] NoOp(“SIP/806-00007e32”, “TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 20 - failing through to other trunks”) in new stack
– Executing [[email protected]:2] Set(“SIP/806-00007e32”, “CALLERID(number)=806”) in new stack
– Executing [[email protected]:8] Macro(“SIP/806-00007e32”, “outisbusy,”) in new stack
– Executing [[email protected]:1] Progress(“SIP/806-00007e32”, “”) in new stack
– Executing [[email protected]:2] GotoIf(“SIP/806-00007e32”, “0?emergency,1”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/806-00007e32”, “0?intracompany,1”) in new stack
– Executing [[email protected]:4] Playback(“SIP/806-00007e32”, “all-circuits-busy-now&pls-try-call-later, noanswer”) in new stack
– <SIP/806-00007e32> Playing ‘all-circuits-busy-now.ulaw’ (language ‘en’)
> 0x7f8a78754380 – Probation passed - setting RTP source address to 10.1.12.139:16848
> 0x7f8a783a8980 – Probation passed - setting RTP source address to 10.1.12.139:19232
== Spawn extension (macro-outisbusy, s, 4) exited non-zero on ‘SIP/806-00007e32’ in macro ‘outisbusy’
== Spawn extension (from-internal, 609XXXXXXX, 8) exited non-zero on ‘SIP/806-00007e32’
– Executing [[email protected]:1] Hangup(“SIP/806-00007e32”, “”) in new stack
== Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/806-00007e32’

there is only one phone line on it for test. And only one Phone connected to the PBX. Can someone please help me Not sure what is wrong.

We need the part right before this line - it will tell you WHY everyone is congested.

This is the whole thing i get from it.

– Executing [[email protected]:1] Macro(“SIP/806-00007f93”, “user-callerid,LIMIT,EXTERNAL,”) in new stack
– Executing [[email protected]:1] Set(“SIP/806-00007f93”, “TOUCH_MONITOR=1474052893.64267”) in new stack
– Executing [[email protected]:2] Set(“SIP/806-00007f93”, “AMPUSER=806”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/806-00007f93”, “0?report”) in new stack
– Executing [[email protected]:4] ExecIf(“SIP/806-00007f93”, “1?Set(REALCALLERIDNUM=806)”) in new stack
– Executing [[email protected]:5] Set(“SIP/806-00007f93”, “AMPUSER=806”) in new stack
– Executing [[email protected]:6] GotoIf(“SIP/806-00007f93”, “0?limit”) in new stack
– Executing [[email protected]:7] Set(“SIP/806-00007f93”, “AMPUSERCIDNAME=1440 MHP NJ”) in new stack
– Executing [[email protected]:8] GotoIf(“SIP/806-00007f93”, “0?report”) in new stack
– Executing [[email protected]:9] Set(“SIP/806-00007f93”, “AMPUSERCID=806”) in new stack
– Executing [[email protected]:10] Set(“SIP/806-00007f93”, “__DIAL_OPTIONS=Ttr”) in new stack
– Executing [[email protected]:11] Set(“SIP/806-00007f93”, “CALLERID(all)=“1440 MHP NJ” <806>”) in new stack
– Executing [[email protected]:12] GotoIf(“SIP/806-00007f93”, “0?limit”) in new stack
– Executing [[email protected]:13] ExecIf(“SIP/806-00007f93”, “1?Set(GROUP(concurrency_limit)=806)”) in new stack
– Executing [[email protected]:14] GosubIf(“SIP/806-00007f93”, “7?sub-ccss,s,1(from-internal,6099541532)”) in new stack
– Executing [[email protected]:1] ExecIf(“SIP/806-00007f93”, “0?Return()”) in new stack
– Executing [[email protected]:2] Set(“SIP/806-00007f93”, “CCSS_SETUP=TRUE”) in new stack
– Executing [[email protected]:3] GosubIf(“SIP/806-00007f93”, “0?monitor_config,1(from-internal,6099541532):monitor_default,1(from-internal,6099541532)”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/806-00007f93”, “0?is_exten”) in new stack
– Executing [[email protected]:2] StackPop(“SIP/806-00007f93”, “”) in new stack
– Executing [[email protected]:3] Return(“SIP/806-00007f93”, “FALSE”) in new stack
– Executing [[email protected]:15] ExecIf(“SIP/806-00007f93”, “0?Set(CHANNEL(language)=)”) in new stack
– Executing [[email protected]:16] GotoIf(“SIP/806-00007f93”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,30)
– Executing [[email protected]:30] Set(“SIP/806-00007f93”, “CALLERID(number)=806”) in new stack
– Executing [[email protected]:31] Set(“SIP/806-00007f93”, “CALLERID(name)=1440 MHP NJ”) in new stack
– Executing [[email protected]:32] Set(“SIP/806-00007f93”, “CDR(cnum)=806”) in new stack
– Executing [[email protected]:33] Set(“SIP/806-00007f93”, “CDR(cnam)=1440 MHP NJ”) in new stack
– Executing [[email protected]:34] Set(“SIP/806-00007f93”, “CHANNEL(language)=en”) in new stack
– Executing [[email protected]:2] Gosub(“SIP/806-00007f93”, “sub-record-check,s,1(out,6099541532,dontcare)”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/806-00007f93”, “0?initialized”) in new stack
– Executing [[email protected]:2] Set(“SIP/806-00007f93”, “__REC_STATUS=INITIALIZED”) in new stack
– Executing [[email protected]:3] Set(“SIP/806-00007f93”, “NOW=1474052893”) in new stack
– Executing [[email protected]:4] Set(“SIP/806-00007f93”, “__DAY=16”) in new stack
– Executing [[email protected]:5] Set(“SIP/806-00007f93”, “__MONTH=09”) in new stack
– Executing [[email protected]:6] Set(“SIP/806-00007f93”, “__YEAR=2016”) in new stack
– Executing [[email protected]:7] Set(“SIP/806-00007f93”, “__TIMESTR=20160916-150813”) in new stack
– Executing [[email protected]:8] Set(“SIP/806-00007f93”, “__FROMEXTEN=806”) in new stack
– Executing [[email protected]:9] Set(“SIP/806-00007f93”, “__MON_FMT=wav”) in new stack
– Executing [[email protected]:10] NoOp(“SIP/806-00007f93”, “Recordings initialized”) in new stack
– Executing [[email protected]:11] ExecIf(“SIP/806-00007f93”, “0?Set(ARG3=dontcare)”) in new stack
– Executing [[email protected]:12] Set(“SIP/806-00007f93”, “REC_POLICY_MODE_SAVE=”) in new stack
– Executing [[email protected]:13] ExecIf(“SIP/806-00007f93”, “0?Set(REC_STATUS=NO)”) in new stack
– Executing [[email protected]:14] GotoIf(“SIP/806-00007f93”, “3?checkaction”) in new stack
– Goto (sub-record-check,s,17)
– Executing [[email protected]:17] GotoIf(“SIP/806-00007f93”, “1?sub-record-check,out,1”) in new stack
– Goto (sub-record-check,out,1)
– Executing [[email protected]:1] NoOp(“SIP/806-00007f93”, “Outbound Recording Check from 806 to 6099541532”) in new stack
– Executing [[email protected]:2] Set(“SIP/806-00007f93”, “RECMODE=dontcare”) in new stack
– Executing [[email protected]:3] ExecIf(“SIP/806-00007f93”, “1?Goto(routewins)”) in new stack
– Goto (sub-record-check,out,7)
– Executing [[email protected]:7] Gosub(“SIP/806-00007f93”, “recordcheck,1(dontcare,out,6099541532)”) in new stack
– Executing [[email protected]:1] NoOp(“SIP/806-00007f93”, “Starting recording check against dontcare”) in new stack
– Executing [[email protected]:2] Goto(“SIP/806-00007f93”, “dontcare”) in new stack
– Goto (sub-record-check,recordcheck,3)
– Executing [[email protected]:3] Return(“SIP/806-00007f93”, “”) in new stack
– Executing [[email protected]:8] Return(“SIP/806-00007f93”, “”) in new stack
– Executing [[email protected]:3] ExecIf(“SIP/806-00007f93”, “0 ?Set(CDR(accountcode)=)”) in new stack
– Executing [[email protected]:4] Set(“SIP/806-00007f93”, “MOHCLASS=default”) in new stack
– Executing [[email protected]:5] ExecIf(“SIP/806-00007f93”, “1?Set(TRUNKCIDOVERRIDE=6094038994)”) in new stack
– Executing [[email protected]:6] Set(“SIP/806-00007f93”, “_NODEST=”) in new stack
– Executing [[email protected]:7] Macro(“SIP/806-00007f93”, “dialout-trunk,4,6099541532,off”) in new stack
– Executing [[email protected]:1] Set(“SIP/806-00007f93”, “DIAL_TRUNK=4”) in new stack
– Executing [[email protected]:2] GosubIf(“SIP/806-00007f93”, “0?sub-pincheck,s,1()”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/806-00007f93”, “0?disabletrunk,1”) in new stack
– Executing [[email protected]:4] Set(“SIP/806-00007f93”, “DIAL_NUMBER=6099541532”) in new stack
– Executing [[email protected]:5] Set(“SIP/806-00007f93”, “DIAL_TRUNK_OPTIONS=Ttr”) in new stack
– Executing [[email protected]:6] Set(“SIP/806-00007f93”, “OUTBOUND_GROUP=OUT_4”) in new stack
– Executing [[email protected]:7] GotoIf(“SIP/806-00007f93”, “0?nomax”) in new stack
– Executing [[email protected]:8] GotoIf(“SIP/806-00007f93”, “0?chanfull”) in new stack
– Executing [[email protected]:9] GotoIf(“SIP/806-00007f93”, “0?skipoutcid”) in new stack
– Executing [[email protected]:10] Set(“SIP/806-00007f93”, “DIAL_TRUNK_OPTIONS=Tt”) in new stack
– Executing [[email protected]:11] Macro(“SIP/806-00007f93”, “outbound-callerid,4”) in new stack
– Executing [[email protected]:1] ExecIf(“SIP/806-00007f93”, “0?Set(CALLERPRES()=)”) in new stack
– Executing [[email protected]:2] ExecIf(“SIP/806-00007f93”, “0?Set(REALCALLERIDNUM=806)”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/806-00007f93”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,6)
– Executing [[email protected]:6] Set(“SIP/806-00007f93”, “USEROUTCID=”) in new stack
– Executing [[email protected]:7] Set(“SIP/806-00007f93”, “EMERGENCYCID=”) in new stack
– Executing [[email protected]:8] Set(“SIP/806-00007f93”, “TRUNKOUTCID=6094038994”) in new stack
– Executing [[email protected]:9] GotoIf(“SIP/806-00007f93”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,14)
– Executing [[email protected]:14] ExecIf(“SIP/806-00007f93”, “1?Set(CALLERID(all)=6094038994)”) in new stack
– Executing [[email protected]:15] ExecIf(“SIP/806-00007f93”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [[email protected]:16] ExecIf(“SIP/806-00007f93”, “1?Set(CALLERID(all)=6094038994)”) in new stack
– Executing [[email protected]:17] ExecIf(“SIP/806-00007f93”, “0?Set(CALLERPRES()=prohib_passed_screen)”) in new stack
– Executing [[email protected]:18] Set(“SIP/806-00007f93”, “CDR(outbound_cnum)=6094038994”) in new stack
– Executing [[email protected]:19] Set(“SIP/806-00007f93”, “CDR(outbound_cnam)=”) in new stack
– Executing [[email protected]:12] GosubIf(“SIP/806-00007f93”, “0?sub-flp-4,s,1()”) in new stack
– Executing [s[email protected]:13] Set(“SIP/806-00007f93”, “OUTNUM=6099541532”) in new stack
– Executing [[email protected]:14] Set(“SIP/806-00007f93”, “custom=SIP/GXW4104”) in new stack
– Executing [[email protected]:15] ExecIf(“SIP/806-00007f93”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)Tt)”) in new stack
– Executing [[email protected]:16] ExecIf(“SIP/806-00007f93”, “0?Set(DIAL_TRUNK_OPTIONS=TtM(confirm))”) in new stack
– Executing [[email protected]:17] Macro(“SIP/806-00007f93”, “dialout-trunk-predial-hook,”) in new stack
– Executing [[email protected]:1] MacroExit(“SIP/806-00007f93”, “”) in new stack
– Executing [[email protected]:18] GotoIf(“SIP/806-00007f93”, “0?bypass,1”) in new stack
– Executing [[email protected]:19] ExecIf(“SIP/806-00007f93”, “1?Set(CONNECTEDLINE(num,i)=6099541532)”) in new stack
– Executing [[email protected]:20] ExecIf(“SIP/806-00007f93”, “1?Set(CONNECTEDLINE(name,i)=CID:6094038994)”) in new stack
– Executing [[email protected]:21] GotoIf(“SIP/806-00007f93”, “0?customtrunk”) in new stack
– Executing [[email protected]:22] Dial(“SIP/806-00007f93”, “SIP/GXW4104/6099541532,300,Tt”) in new stack
[2016-09-16 15:08:13] WARNING[28010][C-0000567d]: app_dial.c:2437 dial_exec_full: Unable to create channel of type ‘SIP’ (cause 20 - Subscriber absent)
== Everyone is busy/congested at this time (1:0/0/1)
– Executing [[email protected]:23] NoOp(“SIP/806-00007f93”, “Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 20”) in new stack
– Executing [[email protected]:24] GotoIf(“SIP/806-00007f93”, “0?continue,1:s-CHANUNAVAIL,1”) in new stack
– Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
– Executing [[email protected]:1] Set(“SIP/806-00007f93”, “RC=20”) in new stack
– Executing [[email protected]:2] Goto(“SIP/806-00007f93”, “20,1”) in new stack
– Goto (macro-dialout-trunk,20,1)
– Executing [[email protected]:1] Goto(“SIP/806-00007f93”, “continue,1”) in new stack
– Goto (macro-dialout-trunk,continue,1)
– Executing [[email protected]:1] NoOp(“SIP/806-00007f93”, “TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 20 - failing through to other trunks”) in new stack
– Executing [[email protected]:2] Set(“SIP/806-00007f93”, “CALLERID(number)=806”) in new stack
– Executing [[email protected]:8] Macro(“SIP/806-00007f93”, “outisbusy,”) in new stack
– Executing [[email protected]:1] Progress(“SIP/806-00007f93”, “”) in new stack
– Executing [[email protected]:2] GotoIf(“SIP/806-00007f93”, “0?emergency,1”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/806-00007f93”, “0?intracompany,1”) in new stack
– Executing [[email protected]:4] Playback(“SIP/806-00007f93”, “all-circuits-busy-now&pls-try-call-later, noanswer”) in new stack
– <SIP/806-00007f93> Playing ‘all-circuits-busy-now.ulaw’ (language ‘en’)
> 0x7f8a783a8080 – Probation passed - setting RTP source address to 10.1.12.139:19324
> 0x7f8a780c75a0 – Probation passed - setting RTP source address to 10.1.12.139:16814
– <SIP/806-00007f93> Playing ‘pls-try-call-later.ulaw’ (language ‘en’)
– Executing [[email protected]:1] Macro(“SIP/GXW4108-00007f87”, “hangupcall”) in new stack
– Executing [[email protected]:1] ExecIf(“SIP/GXW4108-00007f87”, “0?Set(CDR(recordingfile)=.wav)”) in new stack
– Executing [[email protected]:2] GotoIf(“SIP/GXW4108-00007f87”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,4)
– Executing [[email protected]:4] Hangup(“SIP/GXW4108-00007f87”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘SIP/GXW4108-00007f87’ in macro ‘hangupcall’
== Spawn extension (macro-dial, h, 1) exited non-zero on ‘SIP/GXW4108-00007f87’
== Spawn extension (macro-dial, s, 7) exited non-zero on ‘SIP/GXW4108-00007f87’ in macro ‘dial’
== Spawn extension (ext-group, 601, 11) exited non-zero on ‘SIP/GXW4108-00007f87’
– Executing [[email protected]:5] Congestion(“SIP/806-00007f93”, “20”) in new stack
[2016-09-16 15:08:17] WARNING[28010][C-0000567d]: channel.c:4861 ast_prod: Prodding channel ‘SIP/806-00007f93’ failed
== Spawn extension (macro-outisbusy, s, 5) exited non-zero on ‘SIP/806-00007f93’ in macro ‘outisbusy’
== Spawn extension (from-internal, 6099541532, 8) exited non-zero on ‘SIP/806-00007f93’
– Executing [[email protected]:1] Hangup(“SIP/806-00007f93”, “”) in new stack
== Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/806-00007f93’

If in the outbound i put the trunk to the analog cards i can call out.

This is strange because the sip trunk works on inbound calls with no problem and in outbound i did the same dialing pattern as the analog trunk.

This seems more a gateway problem than a asterisk problem.

See if this document helps you: https://www.grandstream.com/sites/default/files/Faq/gxw410x_interop_asterisk.pdf

I will look more into it thank you.

It is no help to me. It looked like everything i did correctly so far.

Your connection to the the Grandstream is no longer working, you will need to re-engineer it.

http://networking.ringofsaturn.com/Routers/isdncausecodes.php

“Subscriber absent”

Hello Dicko I’m not sure what that means it’s not working. I can get incoming and the trunk is working. in the PBX but i don’t know why outgoing is not working. If the grand stream box was the problem then incoming shouldn’t work either correct?

No, I always treat incoming trunks and outgoing trunks separately, especially with SIP gateway devices, because in fact they are :wink: If you connect to extensions on the GS then they need to be configured appropriately , either way try:-

sip set debug on

in asterisk CLI and watch . . .

i get something from the debug

<------------->
— (10 headers 0 lines) —
Retransmitting #4 (NAT) to 00.00.00.00:5060:
OPTIONS sip:00.00.00.00 SIP/2.0
Via: SIP/2.0/UDP 00.00.00.00:5060;branch=z9hG4bK0b73da85;rport
Max-Forwards: 70
From: “Unknown” sip:[email protected];tag=as4bbebc79
To: sip:96.88.170.169
Contact: sip:[email protected]:5060
Call-ID: [email protected]:5060
CSeq: 102 OPTIONS
User-Agent: FPBX-12.0.76.3(11.21.2)
Date: Fri, 16 Sep 2016 22:00:27 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


Really destroying SIP dialog ‘[email protected]:5060’ Method: OPTIONS
Retransmitting #2 (no NAT) to 10.1.12.139:5060:
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 10.1.12.139:5060;branch=z9hG4bK2221b75b;received=10.1.12.139
From: “806” sip:[email protected];tag=88f0778892e301091c4c1a92-0d45cff5
To: sip:[email protected];tag=as080e0d6c
Call-ID: [email protected]
CSeq: 102 INVITE
Server: FPBX-12.0.76.3(11.21.2)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


Retransmitting #3 (no NAT) to 10.1.12.139:5060:
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 10.1.12.139:5060;branch=z9hG4bK2221b75b;received=10.1.12.139
From: “806” sip:[email protected];tag=88f0778892e301091c4c1a92-0d45cff5
To: sip:[email protected];tag=as080e0d6c
Call-ID: [email protected]
CSeq: 102 INVITE
Server: FPBX-12.0.76.3(11.21.2)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


Really destroying SIP dialog ‘[email protected]’ Method: REGISTER
Retransmitting #4 (no NAT) to 10.1.12.139:5060:
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 10.1.12.139:5060;branch=z9hG4bK2221b75b;received=10.1.12.139
From: “806” sip:[email protected];tag=88f0778892e301091c4c1a92-0d45cff5
To: sip:[email protected];tag=as080e0d6c
Call-ID: [email protected]
CSeq: 102 INVITE
Server: FPBX-12.0.76.3(11.21.2)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0

Apparently your calls to:-

are being rejected probably a user/password issue

10.1.12.139 is the phone. I tried another phone with different ip and i get the same thing. I also thought it was the phone that was the problem.

Then the problem lies between

and your PBX

10.1.12.232 is another phone that is connected i tired different phones in different rooms

my pbx is 10.1.10.195 there is a vpn router that is there and one at my home connected together. at my home i have 2 phones and the Grand stream box

it was all working into the hard drive on the pbx die out. and putting it all back together is a nightmare.

Ah, that’s why rigorous backups of the machine and it’s configuration are so important for “wise virgins” to arrange both “on-site” and “off-site” copies of both. You will have to reverse engineer back to what worked, sorry

You are right i wish i did but i only had one drive and it was new too.

Google drive? any other cloud storage? another harddrive should cost you 30 bucks or so, a usb thumb drive maybe 10?

Personally I recommend Mondorescue, it generally “just works”