Grandstream HT503

Configured a 503 ata for an analog line with a free pax. Inbound calls work great, outbound calls give an all lines are busy message.

WARNING[2060][C-00000032]: chan_sip.c:24008 handle_response_invite: Received response: “Forbidden”

This is the where to problem lies I think.

Assuming that you have Stage Method set to 1, and the Dial Plan permits and does not alter the number dialed, then whatever number is sent from the trunk should be dialed on the FXO port.

As a start, at the Asterisk command prompt, type
sip set debug on
make a failing outbound test call, paste the Asterisk log for the call at pastebin.freepbx.org and post the link here. It would also be useful to post your trunk settings and screenshots of the FXO Port page.

This is the log from a call:

g [[email protected]:13] ExecIf("SIP/116-00000051", "0?Set(REC_STATUS=NO)") in new stack

**--** Executing [[email protected]:14] GotoIf("SIP/116-00000051", "3?checkaction") in new stack

**--** Goto (sub-record-check,s,17)

**--** Executing [[email protected]:17] GotoIf("SIP/116-00000051", "1?sub-record-check,out,1") in new stack

**--** Goto (sub-record-check,out,1)

**--** Executing [[email protected]:1] NoOp("SIP/116-00000051", "Outbound Recording Check from 116 to 8095782100") in new stack

**--** Executing [[email protected]:2] Set("SIP/116-00000051", "RECMODE=dontcare") in new stack

**--** Executing [[email protected]:3] ExecIf("SIP/116-00000051", "1?Goto(routewins)") in new stack

**--** Goto (sub-record-check,out,7)

**--** Executing [[email protected]:7] Gosub("SIP/116-00000051", "recordcheck,1(dontcare,out,8095782100)") in new stack

**--** Executing [[email protected]:1] NoOp("SIP/116-00000051", "Starting recording check against dontcare") in new stack

**--** Executing [[email protected]:2] Goto("SIP/116-00000051", "dontcare") in new stack

**--** Goto (sub-record-check,recordcheck,3)

**--** Executing [[email protected]:3] Return("SIP/116-00000051", "") in new stack

**--** Executing [[email protected]:8] Return("SIP/116-00000051", "") in new stack

**--** Executing [[email protected]:3] ExecIf("SIP/116-00000051", "0 ?Set(CDR(accountcode)=)") in new stack

**--** Executing [[email protected]:4] Set("SIP/116-00000051", "MOHCLASS=default") in new stack

**--** Executing [[email protected]:5] Set("SIP/116-00000051", "_NODEST=") in new stack

**--** Executing [[email protected]:6] Macro("SIP/116-00000051", "dialout-trunk,3,8095782100,,off") in new stack

**--** Executing [[email protected]:1] Set("SIP/116-00000051", "DIAL_TRUNK=3") in new stack

**--** Executing [[email protected]:2] GosubIf("SIP/116-00000051", "0?sub-pincheck,s,1()") in new stack

**--** Executing [[email protected]:3] GotoIf("SIP/116-00000051", "0?disabletrunk,1") in new stack

**--** Executing [[email protected]:4] Set("SIP/116-00000051", "DIAL_NUMBER=8095782100") in new stack

**--** Executing [[email protected]:5] Set("SIP/116-00000051", "DIAL_TRUNK_OPTIONS=HhTtr") in new stack

**--** Executing [[email protected]:6] Set("SIP/116-00000051", "OUTBOUND_GROUP=OUT_3") in new stack

**--** Executing [[email protected]:7] GotoIf("SIP/116-00000051", "0?nomax") in new stack

**--** Executing [[email protected]:8] GotoIf("SIP/116-00000051", "0?chanfull") in new stack

**--** Executing [[email protected]:9] GotoIf("SIP/116-00000051", "0?skipoutcid") in new stack

**--** Executing [[email protected]:10] Set("SIP/116-00000051", "DIAL_TRUNK_OPTIONS=T") in new stack

**--** Executing [[email protected]:11] Macro("SIP/116-00000051", "outbound-callerid,3") in new stack

**--** Executing [[email protected]:1] ExecIf("SIP/116-00000051", "0?Set(CALLERPRES(name-pres)=)") in new stack

**--** Executing [[email protected]:2] ExecIf("SIP/116-00000051", "0?Set(CALLERPRES(num-pres)=)") in new stack

**--** Executing [[email protected]:3] ExecIf("SIP/116-00000051", "0?Set(REALCALLERIDNUM=116)") in new stack

**--** Executing [[email protected]:4] GotoIf("SIP/116-00000051", "1?normcid") in new stack

**--** Goto (macro-outbound-callerid,s,7)

**--** Executing [[email protected]:7] Set("SIP/116-00000051", "USEROUTCID=") in new stack

**--** Executing [[email protected]:8] Set("SIP/116-00000051", "EMERGENCYCID=") in new stack

**--** Executing [[email protected]:9] Set("SIP/116-00000051", "TRUNKOUTCID=8092748784") in new stack

**--** Executing [[email protected]:10] GotoIf("SIP/116-00000051", "1?trunkcid") in new stack

**--** Goto (macro-outbound-callerid,s,15)

**--** Executing [[email protected]:15] ExecIf("SIP/116-00000051", "1?Set(CALLERID(all)=8092748784)") in new stack

**--** Executing [[email protected]outbound-callerid:16] ExecIf("SIP/116-00000051", "0?Set(CALLERID(all)=)") in new stack

**--** Executing [[email protected]:17] ExecIf("SIP/116-00000051", "0?Set(CALLERID(all)=)") in new stack

**--** Executing [[email protected]:18] ExecIf("SIP/116-00000051", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack

**--** Executing [[email protected]:19] ExecIf("SIP/116-00000051", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack

**--** Executing [[email protected]:20] Set("SIP/116-00000051", "CDR(outbound_cnum)=8092748784") in new stack

**--** Executing [[email protected]:21] Set("SIP/116-00000051", "CDR(outbound_cnam)=") in new stack

**--** Executing [[email protected]:12] GosubIf("SIP/116-00000051", "0?sub-flp-3,s,1()") in new stack

**--** Executing [[email protected]:13] Set("SIP/116-00000051", "OUTNUM=8095782100") in new stack

**--** Executing [[email protected]:14] Set("SIP/116-00000051", "custom=SIP/8092748784") in new stack

**--** Executing [[email protected]:15] ExecIf("SIP/116-00000051", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)") in new stack

**--** Executing [[email protected]:16] ExecIf("SIP/116-00000051", "0?Set(DIAL_TRUNK_OPTIONS=TM(confirm))") in new stack

**--** Executing [[email protected]:17] Macro("SIP/116-00000051", "dialout-trunk-predial-hook,") in new stack

**--** Executing [[email protected]:1] MacroExit("SIP/116-00000051", "") in new stack

**--** Executing [[email protected]:18] GotoIf("SIP/116-00000051", "0?skipcrm") in new stack

**--** Executing [[email protected]:19] Set("SIP/116-00000051", "__CRM_DIRECTION=OUTBOUND") in new stack

**--** Executing [[email protected]:20] Set("SIP/116-00000051", "__CRM_DESTINATION=8095782100") in new stack

**--** Executing [[email protected]:21] Set("SIP/116-00000051", "__CRM_SOURCE=116") in new stack

**--** Executing [[email protected]:22] AGI("SIP/116-00000051", "sangomacrm.agi") in new stack

**--** Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi

**--** <SIP/116-00000051>AGI Script sangomacrm.agi completed, returning 0

**--** Executing [[email protected]:23] Set("SIP/116-00000051", "CHANNEL(hangup_handler_push)=crm-hangup,s,1") in new stack

**--** Executing [[email protected]:24] NoOp("SIP/116-00000051", "CRM Finished") in new stack

**--** Executing [[email protected]:25] GotoIf("SIP/116-00000051", "0?bypass,1") in new stack

**--** Executing [[email protected]:26] ExecIf("SIP/116-00000051", "1?Set(CONNECTEDLINE(num,i)=8095782100)") in new stack

**--** Executing [[email protected]:27] ExecIf("SIP/116-00000051", "1?Set(CONNECTEDLINE(name,i)=CID:8092748784)") in new stack

**--** Executing [[email protected]:28] ExecIf("SIP/116-00000051", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)8092748784)") in new stack

**--** Executing [[email protected]:29] GotoIf("SIP/116-00000051", "0?customtrunk") in new stack

**--** Executing [[email protected]:30] Dial("SIP/116-00000051", "SIP/8092748784/8095782100,300,T") in new stack

**==** Using SIP RTP TOS bits 184

**==** Using SIP RTP CoS mark 5

**--** Called SIP/8092748784/8095782100

[2020-12-08 21:32:03] WARNING[2060][C-00000033]: chan_sip.c:24008 handle_response_invite: Received response: "Forbidden" from '<sip:[email protected]>;tag=as66bc363d'

**==** Everyone is busy/congested at this time (1:0/0/1)

**--** Executing [[email protected]:31] NoOp("SIP/116-00000051", "Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 21") in new stack

**--** Executing [[email protected]:32] GotoIf("SIP/116-00000051", "0?continue,1:s-CHANUNAVAIL,1") in new stack

**--** Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)

**--** Executing [[email protected]:1] Set("SIP/116-00000051", "RC=21") in new stack

**--** Executing [[email protected]:2] Goto("SIP/116-00000051", "21,1") in new stack

**--** Goto (macro-dialout-trunk,21,1)

**--** Executing [[email protected]ialout-trunk:1] Goto("SIP/116-00000051", "continue,1") in new stack

**--** Goto (macro-dialout-trunk,continue,1)

**--** Executing [[email protected]:1] NoOp("SIP/116-00000051", "TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 21 - failing through to other trunks") in new stack

**--** Executing [[email protected]:2] ExecIf("SIP/116-00000051", "1?Set(CALLERID(number)=116)") in new stack

**--** Executing [[email protected]:7] Macro("SIP/116-00000051", "outisbusy,") in new stack

**--** Executing [[email protected]:1] Progress("SIP/116-00000051", "") in new stack

**--** Executing [[email protected]:2] GotoIf("SIP/116-00000051", "0?emergency,1") in new stack

**--** Executing [[email protected]:3] GotoIf("SIP/116-00000051", "0?intracompany,1") in new stack

**--** Executing [[email protected]:4] Playback("SIP/116-00000051", "all-circuits-busy-now&please-try-call-later, noanswer") in new stack

**--** <SIP/116-00000051> Playing 'all-circuits-busy-now.ulaw' (language 'es')

**--** <SIP/116-00000051> Playing 'please-try-call-later.ulaw' (language 'es')

**--** Executing [[email protected]:5] Congestion("SIP/116-00000051", "20") in new stack

[2020-12-08 21:32:07] WARNING[28708][C-00000033]: channel.c:5005 ast_prod: Prodding channel 'SIP/116-00000051' failed

**==** Spawn extension (macro-outisbusy, s, 5) exited non-zero on 'SIP/116-00000051' in macro 'outisbusy'

**==** Spawn extension (from-internal, 8095782100, 7) exited non-zero on 'SIP/116-00000051'

**--** Executing [[email protected]:1] Macro("SIP/116-00000051", "hangupcall") in new stack

**--** Executing [[email protected]:1] GotoIf("SIP/116-00000051", "1?theend") in new stack

**--** Goto (macro-hangupcall,s,3)

**--** Executing [[email protected]:3] ExecIf("SIP/116-00000051", "0?Set(CDR(recordingfile)=)") in new stack

**--** Executing [[email protected]:4] NoOp("SIP/116-00000051", " monior file= ") in new stack

**--** Executing [[email protected]:5] AGI("SIP/116-00000051", "attendedtransfer-rec-restart.php,,") in new stack

**--** Launched AGI Script /var/lib/asterisk/agi-bin/attendedtransfer-rec-restart.php

**--** <SIP/116-00000051>AGI Script attendedtransfer-rec-restart.php completed, returning 0

**--** Executing [[email protected]:6] Hangup("SIP/116-00000051", "") in new stack

**==** Spawn extension (macro-hangupcall, s, 6) exited non-zero on 'SIP/116-00000051' in macro 'hangupcall'

**==** Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/116-00000051'

**--** SIP/116-00000051 Internal Gosub(crm-hangup,s,1) start

**--** Executing [[email protected]:1] NoOp("SIP/116-00000051", "Sending Hangup to CRM") in new stack

**--** Executing [[email protected]:2] NoOp("SIP/116-00000051", "HANGUP CAUSE: 34") in new stack

**--** Executing [[email protected]:3] ExecIf("SIP/116-00000051", "0?Set(__CRM_VOICEMAIL=)") in new stack

**--** Executing [[email protected]:4] NoOp("SIP/116-00000051", "MASTER CHANNEL: 1607463123.81 = 1607463123.81") in new stack

**--** Executing [[email protected]:5] GotoIf("SIP/116-00000051", "0?return") in new stack

**--** Executing [[email protected]:6] Set("SIP/116-00000051", "__CRM_HANGUP=1") in new stack

**--** Executing [[email protected]:7] AGI("SIP/116-00000051", "sangomacrm.agi") in new stack

**--** Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi

**--** <SIP/116-00000051>AGI Script sangomacrm.agi completed, returning 0

**--** Executing [[email protected]:8] Return("SIP/116-00000051", "") in new stack

**==** Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/116-00000051'

**--** SIP/116-00000051 Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=

This is the config for the 503

P855=0
P730=0
P694=97
P731=1
P695=0
P856=200
P4593=2
P732=60
P571=20
P857=200
P4594=2
P4630=0
P697=1
P572=1
P4631=0
P698=1
P735=8092748784
P4632=0
P574=0
P610=1
P736=8092748784
P611=0
P4634=180
P737=2
P612=60
P613=8060
P291=0
P4510=60
P739=5012
P292=4
P578=0
P4350=0
P614=0
P579=101
P615=0
P170=0
P171=0
P4355=0
P172=0
P173=0
P174=0
P4518=7547
P175=0
P91=0
P4359=0
P92=0
P176=0
P212=1
P93=0
P177=0
P94=0
P178=0
P95=0
P179=0
P96=97
P97=0
P98=100
P10=0
P99=0
P11=200
P860=100
P12=5
P861=100
P13=255
P862=100
P863=0
P14=255
P864=0
P15=255
P740=5062
P865=0
P901=80
P16=0
P580=0
P17=10
P18=0
P867=0
P582=0
P19=200
P743=0
P4640=50
P868=0
P5001=0
P584=0
P620=1
P5002=100
P460=0
P621=0
P5003=199
P747=5060
P622=0
P5005=60
P4520=5
P4360=0
P624=100
P749=0
P589=1
P4362=0
P4648=0
P501=1
P627=90
P180=0
P4363=0
P502=0
P628=0
P4400=0
P342=0
P181=0
P4364=0
P629=0
P504=97
P4365=0
P2630=0
P4366=0
P4402=0
P183=0
P505=0
P4367=0
P4404=0
P4368=0
P185=60
P186=0
P4369=0
P4406=1
P509=0
P4408=1
P189=0
P4409=1
[email protected],[email protected],c=0/0;
P103=0
P228=0
[email protected],[email protected],c=2000/4000;
P8=1
P20=1
P229=0
P870=0
[email protected],[email protected],c=500/500;
P9=10
P21=10
[email protected],[email protected],c=250/250;
P22=0
P872=0
[email protected],[email protected],c=100/100-100/100-100/100;
P23=200
[email protected],c=300/10000-300/10000-0/0;
P24=1
P108=0
P874=0
P25=0
P109=1
P26=0
P750=0
P27=0
P751=1
P28=0
P752=1
P591=0
P29=0
P630=0
P631=1
P595=0
P632=0
P757=0
P471=20
P633=1
P758=8
P759=4
P4370=0
P634=400
P474=0
P635=0
P4371=1
P510=0
P4657=99
P4372=1
P475=3
P190=1
P4373=1
P191=1
P513=1
P4374=1
P4411=100
P192=fm.grandstream.com/gs
P514=99
P4412=99
P193=10080
P515=100
P4413=104
P230=0
P194=0
P516=60
P4414=103
P195=*00
P517=0
P231=0
P4378=1
P4415=102
P518=102
P519=100
P198=100
P110=255.255.255.0
P111=192.168.2.1
P112=120
P237=fm.grandstream.com/gs
P238=0
P4010=c=2000/4000;
P30=us.pool.ntp.org
P4011=c=2000/4000;
P880=0
P31=1
P4012=c=2000/4000;
P32=60
P4013=c=2000/4000;
P882=0
P4014=c=2000/4000;
P4015=c=2000/4000;
P884=0
P4016=c=2000/4000;
P4017=c=2000/4000;
P760=18
P37=2
P4018=c=2000/4000;
P761=2
P38=12
P4019=c=2000/4000;
P4820=0
P762=98
P39=5004
P4660=0
P763=0
P4821=0
P4822=0
P764=100
P8203=1!2!<2>
P640=7060
P765=0
P4823=0
P641=400
P767=100
P4825=0
P8206=000b8246dd3d
P643=0
P4826=0
P8207=1!1!<1!1!>
P4827=0
P8208=0,!1,!
P4828=0
P520=99
P4382=0
P646=0
P521=104
P522=103
P523=0
P648=0
P4384=0
P649=0
P489=1
P365=0
P240=0
P401=1
P4424=1
P527=90
P528=0
P243=0
P529=0
P2530=0
P4428=0
P245=8
P246=MTZ+6MDT+5,M3.2.0,M11.1.0
P247=0
P248=0
P4020=c=2000/4000;
P40=5060
P249=0
P4021=c=2000/4000;
P124=102
P890=0
P4022=c=2000/4000;
P125=100
P891=0
P4023=c=2000/4000;
P126=99
P892=0
P4024=c=2000/4000;
P127=104
P893=0
P4790=0
P4025=c=2000/4000;
P128=103
P894=0
P129=0
P4026=c=2000/4000;
P4791=0
P895=0
P46=99
P4027=c=2000/4000;
P4792=0
P4793=0
P4028=c=2000/4000;
P896=1024
P4830=0
P4794=0
P772=1
P4029=c=2000/4000;
P897=3600
P4831=0
P4795=0
P49=0
P898=300
P4832=0
P810=60
P899=0
P4796=0
P774=0
P8214=MhXL([email protected]#(!M8V8*?E<SA!G1V"@[email protected]
(IVDUX0mHmmmm
m

P4833=0
P651=0
P813=0
P652=8
P778=0
P814=99
P653=4
P492=4
P3300=100
P4390=400
P779=101
P815=100
P654=18
P4551=1812
P530=0
P655=2
P816=60
P3302=100
P4552=1813
P3303=0
P531=1
P656=98
P532=60
P4393=0
P818=102
P657=200
P3304=2
P3305=8092748784
P533=1
P658=100
P4394=0
P819=100
P4555=1812
P3306=10.0.200.6
P534=180
P4556=1813
P535=0
P3307=5060
P250=400
P4558=2
P251=300
P4559=3
P252=1100
P539=7004
P253=0
P130=0
P132=1
P9997=nouse
P133=1
P258=0
P4030=c=2000/4000;
P9998=nouse
P50=0
P4031=c=2000/4000;
P9999=0
P135=0
P51=0
P4032=c=2000/4000;
P52=0
P4033=c=2000/4000;
P4034=c=2000/4000;
P4035=c=2000/4000;
P138=20
P139=20
P4036=c=2000/4000;
P4037=c=2000/4000;
P57=0
P4038=c=2000/4000;
P58=8
P4039=c=2000/4000;
P59=4
P820=99
P660=18
P821=104
P661=2
P822=103
P823=0
P662=98
P824=0
P4560=0
P663=0
P825=0
P664=0
P4561=0
P4562=0
P665=0
P540=50
P4563=0
P702=0
P541=400
P4564=0
P828=0
P4565=0
P543=0
P704=97
P829=0
P4566=0
P705=0
P4567=0
P546=0
P4568=1
P260=180
P4569=0
P261=90
P1387=0
P262=0
P709=0
P263=0
P549=0
P264=0
P265=0
P266=0
P427=90
P4200={ x+ | *x+ | *xx*x+ }
P267=1
P428=0
P4201={ x+ | *x+ | *xx*x+ }
P429=0
P4040=c=2000/4000;
P2430=0
P4202={ x+ | *x+ | *xx*x+ }
[email protected],[email protected],c=0/0;
P60=18
P4203={ x+ | *x+ | *xx*x+ }
P145=1
P61=2
P62=98
P4043=0
P63=0
P4044=0
P4045=0
P64=AST4ADT
P148=HT500
P65=0
P791=0
P830=0
P831=1
P832=1
P671=20
P833=400
P4570=0
P834=400
P798=2
P835=1
P710=0
P711=0
P550=0
P836=0
P837=0
P712=0
P4573=8004
P676=60
P551=1
P552=0
P4574=101
P838=600
P839=0
P714=0
P4575=0
P430=0
P4577=0
P431=0
P4578=0
P432=0
P4579=0
P557=0
P271=0
P433=1
P272=0
P558=8
P4330=20
P559=4
P4331=20
P434=180
P435=0
P4332=20
P150=0
P276=1
P151=0
P277=0
P152=0
P153=0
P4050=c=2000/4000;
P4337=0
P154=0
P4051=c=2000/4000;
P155=0
P4052=c=2000/4000;
P4339=0
P156=0
P72=1
P4053=c=2000/4000;
P157=0
P4054=c=2000/4000;
P74=0
P4055=c=2000/4000;
P4056=c=2000/4000;
P4057=c=2000/4000;
P4058=c=2000/4000;
P78=0
P4059=c=2000/4000;
P79=101
P840=10
[email protected],[email protected],c=500/500;
P842=0
P843=4
P683=0
P844=-20
P845=-40
P560=100
P685=0
P846=70
P561=100
P4583=100
P847=40
P562=100
P4584=100
P848=40
P849=30
P563=0
P4585=100
P689=1
P601=1
P440=50
P565=0
P441=400
P4588=4
P567=100
P281=s1pphone
P4340=0
P443=0
P729=0
P4341=0
P283=0
P4342=0
P4343=0
P4629=0
P446=0
P285=1
P286=1
P608=0
P4506=0
P609=0
P4507=300
P288=1
P449=0
P200=0
P81=0
P166=0
P4349=0
P167=0
P168=0
P2330=0
P84=20
P169=0
P205=0
P85=4
P86=0
P206=2
P87=0
P208=0
P88=0
P209=50
P850=100
P851=100
P691=0
P852=100
P853=0
P692=1
P854=0

P3304 (Stage Method) should be 1. If you still have trouble, please post log with SIP trace as noted in previous post.

wow thanks for the fast reply, will do that test and follow the previous post

OMG it worked, im gonna have to read up on that. That option didn’t even register in my radar.

THANKS A LOT Stewart1!!!

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.