Hello everyone,
So I have fixed the issue of incoming call now I was trying to use FreePBX for outbound but I am not being able to do that.
So here is the trunk pjsip setup.
But after that I am not being able to call anyone.
Here are the logs
== Using SIP RTP Audio TOS bits 184
== Using SIP RTP Audio TOS bits 184 in TCLASS field.
== Using SIP RTP Audio CoS mark 5
-- Executing [[email protected]:1] Macro("PJSIP/801-00000018", "user-callerid,LIMIT,EXTERNAL,") in new stack
-- Executing [[email protected]:1] Set("PJSIP/801-00000018", "TOUCH_MONITOR=1656932748.252") in new stack
-- Executing [[email protected]:2] Set("PJSIP/801-00000018", "CHANCONTEXT=") in new stack
-- Executing [[email protected]:3] Set("PJSIP/801-00000018", "CHANCONTEXT=") in new stack
-- Executing [[email protected]:4] Set("PJSIP/801-00000018", "CHANEXTENCONTEXT=801-00000018") in new stack
-- Executing [[email protected]:5] Set("PJSIP/801-00000018", "CHANEXTEN=801-00000018") in new stack
-- Executing [[email protected]:6] Set("PJSIP/801-00000018", "CALLERID(number)=801") in new stack
-- Executing [[email protected]:7] Set("PJSIP/801-00000018", "AMPUSER=801") in new stack
-- Executing [[email protected]:8] Set("PJSIP/801-00000018", "HOTDESCKCHAN=801-00000018") in new stack
-- Executing [[email protected]:9] Set("PJSIP/801-00000018", "HOTDESKEXTEN=801") in new stack
-- Executing [[email protected]:10] Set("PJSIP/801-00000018", "HOTDESKCALL=0") in new stack
-- Executing [[email protected]:11] ExecIf("PJSIP/801-00000018", "0?Set(HOTDESKCALL=1)") in new stack
-- Executing [[email protected]:12] ExecIf("PJSIP/801-00000018", "0?Set(CALLERID(name)=)") in new stack
-- Executing [[email protected]:13] GotoIf("PJSIP/801-00000018", "0?report") in new stack
-- Executing [[email protected]:14] ExecIf("PJSIP/801-00000018", "1?Set(REALCALLERIDNUM=801)") in new stack
-- Executing [[email protected]:15] Set("PJSIP/801-00000018", "AMPUSER=801") in new stack
-- Executing [[email protected]:16] GotoIf("PJSIP/801-00000018", "0?limit") in new stack
-- Executing [[email protected]:17] Set("PJSIP/801-00000018", "AMPUSERCIDNAME=name") in new stack
-- Executing [[email protected]:18] ExecIf("PJSIP/801-00000018", "0?Set(__CIDMASQUERADING=TRUE)") in new stack
-- Executing [[email protected]:19] GotoIf("PJSIP/801-00000018", "0?report") in new stack
-- Executing [[email protected]:20] Set("PJSIP/801-00000018", "AMPUSERCID=801") in new stack
-- Executing [[email protected]:21] Set("PJSIP/801-00000018", "__DIAL_OPTIONS=HhTtr") in new stack
-- Executing [[email protected]:22] Set("PJSIP/801-00000018", "CALLERID(all)="name" <801>") in new stack
-- Executing [[email protected]:23] ExecIf("PJSIP/801-00000018", "0?Set(CUSDIAL=)") in new stack
-- Executing [[email protected]:24] ExecIf("PJSIP/801-00000018", "0?Set(CALLERID(all)="name" <801>)") in new stack
-- Executing [[email protected]:25] GotoIf("PJSIP/801-00000018", "0?limit") in new stack
-- Executing [[email protected]:26] ExecIf("PJSIP/801-00000018", "1?Set(GROUP(concurrency_limit)=801)") in new stack
-- Executing [[email protected]:27] NoOp("PJSIP/801-00000018", "Macro Depth is 1") in new stack
-- Executing [[email protected]:28] GotoIf("PJSIP/801-00000018", "1?report2:macroerror") in new stack
-- Goto (macro-user-callerid,s,29)
-- Executing [[email protected]:29] GotoIf("PJSIP/801-00000018", "1?continue") in new stack
-- Goto (macro-user-callerid,s,47)
-- Executing [[email protected]:47] Set("PJSIP/801-00000018", "CALLERID(number)=801") in new stack
-- Executing [[email protected]:48] Set("PJSIP/801-00000018", "CALLERID(name)=name") in new stack
-- Executing [[email protected]:49] GotoIf("PJSIP/801-00000018", "0?cnum") in new stack
-- Executing [[email protected]:50] Set("PJSIP/801-00000018", "CDR(cnam)=name") in new stack
-- Executing [[email protected]:51] Set("PJSIP/801-00000018", "CDR(cnum)=801") in new stack
-- Executing [[email protected]:52] Set("PJSIP/801-00000018", "CHANNEL(language)=en") in new stack
-- Executing [[email protected]:2] Gosub("PJSIP/801-00000018", "sub-record-check,s,1(out,2123852066,dontcare)") in new stack
-- Executing [[email protected]:1] GotoIf("PJSIP/801-00000018", "0?initialized") in new stack
-- Executing [[email protected]:2] Set("PJSIP/801-00000018", "__REC_STATUS=INITIALIZED") in new stack
-- Executing [[email protected]:3] Set("PJSIP/801-00000018", "NOW=1656932748") in new stack
-- Executing [[email protected]:4] Set("PJSIP/801-00000018", "__DAY=04") in new stack
-- Executing [[email protected]:5] Set("PJSIP/801-00000018", "__MONTH=07") in new stack
-- Executing [[email protected]:6] Set("PJSIP/801-00000018", "__YEAR=2022") in new stack
-- Executing [[email protected]:7] Set("PJSIP/801-00000018", "__TIMESTR=20220704-070548") in new stack
-- Executing [[email protected]:8] Set("PJSIP/801-00000018", "__FROMEXTEN=801") in new stack
-- Executing [[email protected]:9] Set("PJSIP/801-00000018", "__MON_FMT=wav") in new stack
-- Executing [[email protected]:10] NoOp("PJSIP/801-00000018", "Recordings initialized") in new stack
-- Executing [[email protected]:11] ExecIf("PJSIP/801-00000018", "0?Set(ARG3=dontcare)") in new stack
-- Executing [[email protected]:12] Set("PJSIP/801-00000018", "REC_POLICY_MODE_SAVE=") in new stack
-- Executing [[email protected]:13] ExecIf("PJSIP/801-00000018", "0?Set(REC_STATUS=NO)") in new stack
-- Executing [[email protected]:14] GotoIf("PJSIP/801-00000018", "3?checkaction") in new stack
-- Goto (sub-record-check,s,17)
-- Executing [[email protected]:17] GotoIf("PJSIP/801-00000018", "1?sub-record-check,out,1") in new stack
-- Goto (sub-record-check,out,1)
-- Executing [[email protected]:1] NoOp("PJSIP/801-00000018", "Outbound Recording Check from 801 to 2123852066") in new stack
-- Executing [out[email protected]:2] Set("PJSIP/801-00000018", "RECMODE=dontcare") in new stack
-- Executing [[email protected]:3] ExecIf("PJSIP/801-00000018", "1?Goto(routewins)") in new stack
-- Goto (sub-record-check,out,7)
-- Executing [[email protected]:7] Gosub("PJSIP/801-00000018", "recordcheck,1(dontcare,out,2123852066)") in new stack
-- Executing [[email protected]:1] NoOp("PJSIP/801-00000018", "Starting recording check against dontcare") in new stack
-- Executing [[email protected]:2] Goto("PJSIP/801-00000018", "dontcare") in new stack
-- Goto (sub-record-check,recordcheck,3)
-- Executing [[email protected]:3] Return("PJSIP/801-00000018", "") in new stack
-- Executing [[email protected]:8] Return("PJSIP/801-00000018", "") in new stack
-- Executing [[email protected]:3] Set("PJSIP/801-00000018", "_ROUTEID=1") in new stack
-- Executing [[email protected]:4] Set("PJSIP/801-00000018", "_ROUTENAME=main") in new stack
-- Executing [[email protected]:5] Set("PJSIP/801-00000018", "MOHCLASS=default") in new stack
-- Executing [[email protected]:6] ExecIf("PJSIP/801-00000018", "1?Set(TRUNKCIDOVERRIDE=13479803070)") in new stack
-- Executing [[email protected]:7] Set("PJSIP/801-00000018", "_CALLERIDNAMEINTERNAL=name") in new stack
-- Executing [[email protected]:8] Set("PJSIP/801-00000018", "_CALLERIDNUMINTERNAL=801") in new stack
-- Executing [[email protected]:9] Set("PJSIP/801-00000018", "_EMAILNOTIFICATION=FALSE") in new stack
-- Executing [[email protected]:10] Set("PJSIP/801-00000018", "_NODEST=") in new stack
-- Executing [[email protected]:11] Macro("PJSIP/801-00000018", "dialout-trunk,2,12123852066,,off") in new stack
-- Executing [[email protected]:1] Set("PJSIP/801-00000018", "DIAL_TRUNK=2") in new stack
-- Executing [[email protected]:2] ExecIf("PJSIP/801-00000018", "0?Set(DIAL_OPTIONS=Hhtr)") in new stack
-- Executing [[email protected]:3] GosubIf("PJSIP/801-00000018", "0?sub-pincheck,s,1()") in new stack
-- Executing [[email protected]:4] ExecIf("PJSIP/801-00000018", "0?Set(CALLERID(num)=801)") in new stack
-- Executing [[email protected]:5] GotoIf("PJSIP/801-00000018", "0?disabletrunk,1") in new stack
-- Executing [[email protected]:6] Set("PJSIP/801-00000018", "DIAL_NUMBER=12123852066") in new stack
-- Executing [[email protected]:7] Set("PJSIP/801-00000018", "DIAL_TRUNK_OPTIONS=HhTtr") in new stack
-- Executing [[email protected]:8] Set("PJSIP/801-00000018", "OUTBOUND_GROUP=OUT_2") in new stack
-- Executing [[email protected]:9] Set("PJSIP/801-00000018", "DIAL_TRUNK_OPTIONS=T") in new stack
-- Executing [[email protected]:10] GotoIf("PJSIP/801-00000018", "1?nomax") in new stack
-- Goto (macro-dialout-trunk,s,12)
-- Executing [[email protected]:12] GotoIf("PJSIP/801-00000018", "0?skipoutcid") in new stack
-- Executing [[email protected]:13] Macro("PJSIP/801-00000018", "outbound-callerid,2") in new stack
-- Executing [[email protected]:1] NoOp("PJSIP/801-00000018", "801") in new stack
-- Executing [[email protected]:2] NoOp("PJSIP/801-00000018", "") in new stack
-- Executing [[email protected]:3] NoOp("PJSIP/801-00000018", "off") in new stack
-- Executing [[email protected]:4] ExecIf("PJSIP/801-00000018", "0?Set(CALLERPRES(name-pres)=)") in new stack
-- Executing [[email protected]:5] ExecIf("PJSIP/801-00000018", "0?Set(CALLERPRES(num-pres)=)") in new stack
-- Executing [[email protected]:6] Set("PJSIP/801-00000018", "HOTDESCKCHAN=801-00000018") in new stack
-- Executing [[email protected]:7] Set("PJSIP/801-00000018", "HOTDESKEXTEN=801") in new stack
-- Executing [[email protected]:8] Set("PJSIP/801-00000018", "HOTDESKCALL=0") in new stack
-- Executing [[email protected]:9] ExecIf("PJSIP/801-00000018", "0?Set(HOTDESKCALL=1)") in new stack
-- Executing [[email protected]:10] ExecIf("PJSIP/801-00000018", "0?Set(CALLERID(name)=)") in new stack
-- Executing [[email protected]:11] Set("PJSIP/801-00000018", "ALLOWTHISROUTE=NO") in new stack
-- Executing [[email protected]:12] ExecIf("PJSIP/801-00000018", "0?Set(ALLOWTHISROUTE=YES)") in new stack
-- Executing [[email protected]:13] ExecIf("PJSIP/801-00000018", "0?Hangup()") in new stack
-- Executing [[email protected]:14] ExecIf("PJSIP/801-00000018", "0?Set(REALCALLERIDNUM=801)") in new stack
-- Executing [[email protected]:15] ExecIf("PJSIP/801-00000018", "0?Set(AMPUSER=801)") in new stack
-- Executing [[email protected]:16] GotoIf("PJSIP/801-00000018", "1?normcid") in new stack
-- Goto (macro-outbound-callerid,s,20)
-- Executing [[email protected]:20] Set("PJSIP/801-00000018", "USEROUTCID=") in new stack
-- Executing [[email protected]:21] Set("PJSIP/801-00000018", "EMERGENCYCID=") in new stack
-- Executing [[email protected]:22] ExecIf("PJSIP/801-00000018", "0?Set(EMERGENCYCID=)") in new stack
-- Executing [[email protected]:23] Set("PJSIP/801-00000018", "TRUNKOUTCID=13479803070") in new stack
-- Executing [[email protected]:24] GotoIf("PJSIP/801-00000018", "1?trunkcid") in new stack
-- Goto (macro-outbound-callerid,s,30)
-- Executing [[email protected]:30] ExecIf("PJSIP/801-00000018", "1?Set(CALLERID(all)=13479803070)") in new stack
-- Executing [[email protected]:31] ExecIf("PJSIP/801-00000018", "0?Set(CALLERID(all)=)") in new stack
-- Executing [[email protected]:32] ExecIf("PJSIP/801-00000018", "1?Set(CALLERID(all)=13479803070)") in new stack
-- Executing [[email protected]:33] ExecIf("PJSIP/801-00000018", "0?Set(CALLERID(all)=801)") in new stack
-- Executing [[email protected]:34] ExecIf("PJSIP/801-00000018", "0?Set(CALLERID(all)=801)") in new stack
-- Executing [[email protected]:35] Set("PJSIP/801-00000018", "TIOHIDE=no") in new stack
-- Executing [[email protected]:36] ExecIf("PJSIP/801-00000018", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
-- Executing [[email protected]:37] ExecIf("PJSIP/801-00000018", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
-- Executing [[email protected]:38] ExecIf("PJSIP/801-00000018", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
-- Executing [[email protected]:39] ExecIf("PJSIP/801-00000018", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
-- Executing [[email protected]:40] Set("PJSIP/801-00000018", "CDR(outbound_cnum)=13479803070") in new stack
-- Executing [[email protected]:41] Set("PJSIP/801-00000018", "CDR(outbound_cnam)=") in new stack
-- Executing [[email protected]:14] GosubIf("PJSIP/801-00000018", "0?sub-flp-2,s,1()") in new stack
-- Executing [[email protected]:15] Set("PJSIP/801-00000018", "OUTNUM=12123852066") in new stack
-- Executing [[email protected]:16] Set("PJSIP/801-00000018", "custom=PJSIP") in new stack
-- Executing [[email protected]:17] ExecIf("PJSIP/801-00000018", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)") in new stack
-- Executing [[email protected]:18] ExecIf("PJSIP/801-00000018", "0?Set(DIAL_TRUNK_OPTIONS=TM(confirm))") in new stack
-- Executing [[email protected]:19] Macro("PJSIP/801-00000018", "dialout-trunk-predial-hook,") in new stack
-- Executing [[email protected]:1] MacroExit("PJSIP/801-00000018", "") in new stack
-- Executing [[email protected]:20] GotoIf("PJSIP/801-00000018", "0?bypass,1") in new stack
-- Executing [[email protected]:21] ExecIf("PJSIP/801-00000018", "1?Set(CONNECTEDLINE(num,i)=12123852066)") in new stack
-- Executing [[email protected]:22] ExecIf("PJSIP/801-00000018", "1?Set(CONNECTEDLINE(name,i)=CID:13479803070)") in new stack
-- Executing [[email protected]unk:23] ExecIf("PJSIP/801-00000018", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)13479803070)") in new stack
-- Executing [[email protected]:24] GotoIf("PJSIP/801-00000018", "0?customtrunk") in new stack
-- Executing [[email protected]:25] ExecIf("PJSIP/801-00000018", "0?Set(DIAL_TRUNK_OPTIONS=)") in new stack
-- Executing [[email protected]:26] Set("PJSIP/801-00000018", "HASH(__SIPHEADERS,Alert-Info)=unset") in new stack
-- Executing [[email protected]:27] Dial("PJSIP/801-00000018", "PJSIP/[email protected],300,Tb(func-apply-sipheaders^s^1,(2))U(sub-send-obroute-email^12123852066^2123852066^2^1656932748^^13479803070)") in new stack
-- PJSIP/outbound-00000019 Internal Gosub(func-apply-sipheaders,s,1(2)) start
-- Executing [[email protected]:1] NoOp("PJSIP/outbound-00000019", "Applying SIP Headers to channel PJSIP/outbound-00000019") in new stack
-- Executing [[email protected]:2] Set("PJSIP/outbound-00000019", "TECH=PJSIP") in new stack
-- Executing [[email protected]:3] Set("PJSIP/outbound-00000019", "SIPHEADERKEYS=Alert-Info") in new stack
-- Executing [[email protected]:4] While("PJSIP/outbound-00000019", "1") in new stack
-- Executing [[email protected]:5] Set("PJSIP/outbound-00000019", "sipheader=unset") in new stack
-- Executing [[email protected]:6] ExecIf("PJSIP/outbound-00000019", "1?Set(PJSIP_HEADER(remove,Alert-Info)=)") in new stack
[2022-07-04 07:05:48] ERROR[9422]: res_pjsip_header_funcs.c:546 remove_header: No headers had been previously added to this session.
-- Executing [[email protected]:7] ExecIf("PJSIP/outbound-00000019", "0?Set(sipheader=<http://127.0.0.1>;info=unset)") in new stack
-- Executing [[email protected]:8] ExecIf("PJSIP/outbound-00000019", "0?Set(sipheader=<http://127.0.0.1>unset)") in new stack
-- Executing [[email protected]:9] ExecIf("PJSIP/outbound-00000019", "0?Set(PJSIP_HEADER(add,Alert-Info)=unset)") in new stack
-- Executing [[email protected]:10] EndWhile("PJSIP/outbound-00000019", "") in new stack
-- Executing [[email protected]:4] While("PJSIP/outbound-00000019", "0") in new stack
-- Executing [[email protected]:11] Return("PJSIP/outbound-00000019", "") in new stack
== Spawn extension (from-pstn, 2123852066, 1) exited non-zero on 'PJSIP/outbound-00000019'
-- PJSIP/outbound-00000019 Internal Gosub(func-apply-sipheaders,s,1(2)) complete GOSUB_RETVAL=
-- Called PJSIP/[email protected]
== Everyone is busy/congested at this time (1:0/0/1)
-- Executing [[email protected]:28] NoOp("PJSIP/801-00000018", "Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 21") in new stack
-- Executing [[email protected]:29] GotoIf("PJSIP/801-00000018", "0?continue,1:s-CHANUNAVAIL,1") in new stack
-- Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
-- Executing [[email protected]:1] Set("PJSIP/801-00000018", "RC=21") in new stack
-- Executing [[email protected]:2] Goto("PJSIP/801-00000018", "21,1") in new stack
-- Goto (macro-dialout-trunk,21,1)
-- Executing [[email protected]:1] Goto("PJSIP/801-00000018", "continue,1") in new stack
-- Goto (macro-dialout-trunk,continue,1)
-- Executing [[email protected]:1] NoOp("PJSIP/801-00000018", "TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 21 - failing through to other trunks") in new stack
-- Executing [[email protected]:2] ExecIf("PJSIP/801-00000018", "1?Set(CALLERID(number)=801)") in new stack
-- Executing [[email protected]:12] Macro("PJSIP/801-00000018", "outisbusy,") in new stack
-- Executing [[email protected]:1] Progress("PJSIP/801-00000018", "") in new stack
-- Executing [[email protected]:2] GotoIf("PJSIP/801-00000018", "0?emergency,1") in new stack
-- Executing [[email protected]:3] GotoIf("PJSIP/801-00000018", "0?intracompany,1") in new stack
-- Executing [[email protected]:4] Playback("PJSIP/801-00000018", "all-circuits-busy-now&please-try-call-later, noanswer") in new stack
-- <PJSIP/801-00000018> Playing 'all-circuits-busy-now.ulaw' (language 'en')
Kindly Help,
Thank you