Outgoing call disconnects after 40 - 48 sconds

All of my external calls are disconnecting after 40 seconds or so. This is my sip trunk config

username=xxxxxxxxxxx
type=peer
setvar=T38GATEWAY=no
secret=xxxxxxxxxx
realm=zw.liquid.tel
qualify=yes
nat=yes
insecure=very
host=zw.liquid.tel
dtmfmode=rfc2833
disallow=all
context=from-trunk
canreinvite=no
allow=g722,alaw,ulaw

I have nat enabled between my firewall and the ipbx on ports 5060 and 14000-65000 for rtp.
i have enabled sip debug and this is what im getting, any help will be appreciated
<— SIP read from UDP:172.16.12.56:5060 —>
SIP/2.0 200 OK
From: “Unknown” sip:[email protected]:5160;tag=as55c8ae9d
To: sip:zw.liquid.tel;tag=sip+1+31b40006+74caa44f
Via: SIP/2.0/UDP 172.16.80.210:5160;received=172.16.80.210;rport=29685;branch=z9hG4bK52330b18
Server: SIP/2.0
Max-Forwards: 70
Contact: sip:[email protected]:5160
Call-ID: [email protected]:5160
CSeq: 102 OPTIONS
User-Agent: FPBX-14.0.13.23(15.7.4)
Date: Sun, 25 Oct 2020 16:17:06 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0

<------------->
— (14 headers 0 lines) —
Really destroying SIP dialog ‘[email protected]:5160’ Method: OPTIONS
== Setting global variable ‘SIPDOMAIN’ to ‘192.168.4.1’
== 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] GotoIf(“PJSIP/192-0000013e”, “1?ext-local,167,1:followme-check,167,1”) in new stack
– Goto (ext-local,167,1)
– Executing [[email protected]:1] Set(“PJSIP/192-0000013e”, “__RINGTIMER=15”) in new stack
– Executing [[email protected]:2] Macro(“PJSIP/192-0000013e”, “exten-vm,167,167,0,0,0”) in new stack
– Executing [[email protected]:1] Macro(“PJSIP/192-0000013e”, “user-callerid,”) in new stack
– Executing [[email protected]:1] Set(“PJSIP/192-0000013e”, “TOUCH_MONITOR=1603642634.372”) in new stack
– Executing [[email protected]:2] Set(“PJSIP/192-0000013e”, “AMPUSER=192”) in new stack
– Executing [[email protected]:3] GotoIf(“PJSIP/192-0000013e”, “0?report”) in new stack
– Executing [[email protected]:4] ExecIf(“PJSIP/192-0000013e”, “1?Set(REALCALLERIDNUM=192)”) in new stack
– Executing [[email protected]:5] Set(“PJSIP/192-0000013e”, “AMPUSER=192”) in new stack
– Executing [[email protected]:6] GotoIf(“PJSIP/192-0000013e”, “0?limit”) in new stack
– Executing [[email protected]:7] Set(“PJSIP/192-0000013e”, “AMPUSERCIDNAME=Gate 5”) in new stack
– Executing [[email protected]:8] ExecIf(“PJSIP/192-0000013e”, “0?Set(__CIDMASQUERADING=TRUE)”) in new stack
– Executing [[email protected]:9] GotoIf(“PJSIP/192-0000013e”, “0?report”) in new stack
– Executing [[email protected]:10] Set(“PJSIP/192-0000013e”, “AMPUSERCID=192”) in new stack
– Executing [[email protected]:11] Set(“PJSIP/192-0000013e”, “__DIAL_OPTIONS=HhTtr”) in new stack
– Executing [[email protected]:12] Set(“PJSIP/192-0000013e”, “CALLERID(all)=“Gate 5” <192>”) in new stack
– Executing [[email protected]:13] GotoIf(“PJSIP/192-0000013e”, “0?limit”) in new stack
– Executing [[email protected]:14] ExecIf(“PJSIP/192-0000013e”, “0?Set(GROUP(concurrency_limit)=192)”) in new stack
– Executing [[email protected]:15] ExecIf(“PJSIP/192-0000013e”, “0?Set(CHANNEL(language)=)”) in new stack
– Executing [[email protected]:16] NoOp(“PJSIP/192-0000013e”, “Macro Depth is 2”) in new stack
– Executing [[email protected]:17] GotoIf(“PJSIP/192-0000013e”, “1?report2:macroerror”) in new stack
– Goto (macro-user-callerid,s,18)
– Executing [[email protected]-callerid:18] GotoIf(“PJSIP/192-0000013e”, “0?continue”) in new stack
– Executing [[email protected]:19] ExecIf(“PJSIP/192-0000013e”, “1?Set(__CALLEE_ACCOUNCODE=)”) in new stack
– Executing [[email protected]:20] Set(“PJSIP/192-0000013e”, “__TTL=64”) in new stack
– Executing [[email protected]:21] GotoIf(“PJSIP/192-0000013e”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,37)
– Executing [[email protected]:37] Set(“PJSIP/192-0000013e”, “CALLERID(number)=192”) in new stack
– Executing [[email protected]:38] Set(“PJSIP/192-0000013e”, “CALLERID(name)=Gate 5”) in new stack
– Executing [[email protected]:39] GotoIf(“PJSIP/192-0000013e”, “0?cnum”) in new stack
– Executing [[email protected]:40] Set(“PJSIP/192-0000013e”, “CDR(cnam)=Gate 5”) in new stack
– Executing [[email protected]:41] Set(“PJSIP/192-0000013e”, “CDR(cnum)=192”) in new stack
– Executing [[email protected]:42] Set(“PJSIP/192-0000013e”, “CHANNEL(language)=en”) in new stack
– Executing [[email protected]:2] Set(“PJSIP/192-0000013e”, “RingGroupMethod=none”) in new stack
– Executing [[email protected]:3] Set(“PJSIP/192-0000013e”, “__EXTTOCALL=167”) in new stack
– Executing [[email protected]:4] Set(“PJSIP/192-0000013e”, “__PICKUPMARK=167”) in new stack
– Executing [[email protected]:5] Set(“PJSIP/192-0000013e”, “RT=15”) in new stack
[2020-10-25 18:17:14] WARNING[19364][C-000000bc]: chan_sip.c:23073 func_header_read: This function can only be used on SIP channels.
– Executing [[email protected]:6] ExecIf(“PJSIP/192-0000013e”, “0?Macro(vm,167,DIRECTDIAL,)”) in new stack
[2020-10-25 18:17:14] WARNING[19364][C-000000bc]: chan_sip.c:23073 func_header_read: This function can only be used on SIP channels.
[2020-10-25 18:17:14] WARNING[19364][C-000000bc]: chan_sip.c:23073 func_header_read: This function can only be used on SIP channels.
– Executing [[email protected]:7] ExecIf(“PJSIP/192-0000013e”, “0?MacroExit()”) in new stack
[2020-10-25 18:17:14] WARNING[19364][C-000000bc]: chan_sip.c:23073 func_header_read: This function can only be used on SIP channels.
[2020-10-25 18:17:14] WARNING[19364][C-000000bc]: chan_sip.c:23073 func_header_read: This function can only be used on SIP channels.
– Executing [[email protected]:8] ExecIf(“PJSIP/192-0000013e”, “0?Gosub(ext-intercom,*80167,1())”) in new stack
[2020-10-25 18:17:14] WARNING[19364][C-000000bc]: chan_sip.c:23073 func_header_read: This function can only be used on SIP channels.
[2020-10-25 18:17:14] WARNING[19364][C-000000bc]: chan_sip.c:23073 func_header_read: This function can only be used on SIP channels.
– Executing [[email protected]:9] ExecIf(“PJSIP/192-0000013e”, “0?MacroExit()”) in new stack
[2020-10-25 18:17:14] WARNING[19364][C-000000bc]: chan_sip.c:23073 func_header_read: This function can only be used on SIP channels.
[2020-10-25 18:17:14] WARNING[19364][C-000000bc]: chan_sip.c:23073 func_header_read: This function can only be used on SIP channels.
– Executing [[email protected]:10] ExecIf(“PJSIP/192-0000013e”, “0?ChanSpy(PJSIP/167,q)”) in new stack
[2020-10-25 18:17:14] WARNING[19364][C-000000bc]: chan_sip.c:23073 func_header_read: This function can only be used on SIP channels.
[2020-10-25 18:17:14] WARNING[19364][C-000000bc]: chan_sip.c:23073 func_header_read: This function can only be used on SIP channels.
– Executing [[email protected]:11] ExecIf(“PJSIP/192-0000013e”, “0?MacroExit()”) in new stack
[2020-10-25 18:17:14] WARNING[19364][C-000000bc]: chan_sip.c:23073 func_header_read: This function can only be used on SIP channels.
– Executing [[email protected]:12] ExecIf(“PJSIP/192-0000013e”, “0?Macro(vm,167,DIRECTDIAL,)”) in new stack
– Executing [[email protected]:13] ExecIf(“PJSIP/192-0000013e”, “0?MacroExit()”) in new stack
– Executing [[email protected]:14] ExecIf(“PJSIP/192-0000013e”, “0?Gosub(ext-intercom,*80167,1())”) in new stack
– Executing [[email protected]:15] ExecIf(“PJSIP/192-0000013e”, “0?MacroExit()”) in new stack
– Executing [[email protected]:16] ExecIf(“PJSIP/192-0000013e”, “0?ChanSpy(PJSIP/167,q)”) in new stack
– Executing [[email protected]:17] ExecIf(“PJSIP/192-0000013e”, “0?MacroExit()”) in new stack
– Executing [[email protected]:18] Gosub(“PJSIP/192-0000013e”, “sub-record-check,s,1(exten,167,dontcare)”) in new stack
– Executing [[email protected]:1] GotoIf(“PJSIP/192-0000013e”, “0?initialized”) in new stack
– Executing [[email protected]:2] Set(“PJSIP/192-0000013e”, “__REC_STATUS=INITIALIZED”) in new stack
– Executing [[email protected]:3] Set(“PJSIP/192-0000013e”, “NOW=1603642634”) in new stack
– Executing [[email protected]:4] Set(“PJSIP/192-0000013e”, “__DAY=25”) in new stack
– Executing [[email protected]:5] Set(“PJSIP/192-0000013e”, “__MONTH=10”) in new stack
– Executing [[email protected]:6] Set(“PJSIP/192-0000013e”, “__YEAR=2020”) in new stack
– Executing [[email protected]:7] Set(“PJSIP/192-0000013e”, “__TIMESTR=20201025-181714”) in new stack
– Executing [[email protected]:8] Set(“PJSIP/192-0000013e”, “__FROMEXTEN=192”) in new stack
– Executing [[email protected]:9] Set(“PJSIP/192-0000013e”, “__MON_FMT=wav”) in new stack
– Executing [[email protected]:10] NoOp(“PJSIP/192-0000013e”, “Recordings initialized”) in new stack
– Executing [[email protected]:11] ExecIf(“PJSIP/192-0000013e”, “0?Set(ARG3=dontcare)”) in new stack
– Executing [[email protected]:12] Set(“PJSIP/192-0000013e”, “REC_POLICY_MODE_SAVE=”) in new stack
– Executing [[email protected]:13] ExecIf(“PJSIP/192-0000013e”, “0?Set(REC_STATUS=NO)”) in new stack
– Executing [[email protected]:14] GotoIf(“PJSIP/192-0000013e”, “5?checkaction”) in new stack
– Goto (sub-record-check,s,17)
– Executing [[email protected]:17] GotoIf(“PJSIP/192-0000013e”, “1?sub-record-check,exten,1”) in new stack
– Goto (sub-record-check,exten,1)
– Executing [[email protected]:1] NoOp(“PJSIP/192-0000013e”, “Exten Recording Check between 192 and 167”) in new stack
– Executing [[email protected]:2] Set(“PJSIP/192-0000013e”, “CALLTYPE=internal”) in new stack
– Executing [[email protected]:3] ExecIf(“PJSIP/192-0000013e”, “0?Set(CALLTYPE=)”) in new stack
– Executing [[email protected]:4] Set(“PJSIP/192-0000013e”, “CALLEE=dontcare”) in new stack
– Executing [[email protected]:5] ExecIf(“PJSIP/192-0000013e”, “0?Set(CALLEE=dontcare)”) in new stack
– Executing [[email protected]:6] GotoIf(“PJSIP/192-0000013e”, “0?callee”) in new stack
– Executing [[email protected]:7] GotoIf(“PJSIP/192-0000013e”, “1?caller”) in new stack
– Goto (sub-record-check,exten,13)
– Executing [[email protected]:13] Set(“PJSIP/192-0000013e”, “RECMODE=dontcare”) in new stack
– Executing [[email protected]:14] ExecIf(“PJSIP/192-0000013e”, “0?Set(RECMODE=dontcare)”) in new stack
– Executing [[email protected]:15] ExecIf(“PJSIP/192-0000013e”, “1?Set(RECMODE=dontcare)”) in new stack
– Executing [[email protected]:16] Gosub(“PJSIP/192-0000013e”, “recordcheck,1(dontcare,internal,167)”) in new stack
– Executing [[email protected]:1] NoOp(“PJSIP/192-0000013e”, “Starting recording check against dontcare”) in new stack
– Executing [[email protected]:2] Goto(“PJSIP/192-0000013e”, “dontcare”) in new stack
– Goto (sub-record-check,recordcheck,3)
– Executing [[email protected]:3] Return(“PJSIP/192-0000013e”, “”) in new stack
– Executing [[email protected]:17] Return(“PJSIP/192-0000013e”, “”) in new stack
– Executing [[email protected]:19] GotoIf(“PJSIP/192-0000013e”, “1?macrodial”) in new stack
– Goto (macro-exten-vm,s,25)
– Executing [[email protected]:25] GosubIf(“PJSIP/192-0000013e”, “0?clrheader,1()”) in new stack
– Executing [[email protected]:26] Macro(“PJSIP/192-0000013e”, “dial-one,15,HhTtr,167”) in new stack
– Executing [[email protected]:1] Set(“PJSIP/192-0000013e”, “DEXTEN=167”) in new stack
– Executing [[email protected]:2] Set(“PJSIP/192-0000013e”, “__CRM_SOURCE=192”) in new stack
– Executing [[email protected]:3] ExecIf(“PJSIP/192-0000013e”, “0?Set(__EXTTOCALL=167)”) in new stack
– Executing [[email protected]:4] Set(“PJSIP/192-0000013e”, “DIALSTATUS_CW=”) in new stack
– Executing [[email protected]:5] GosubIf(“PJSIP/192-0000013e”, “0?screen,1()”) in new stack
– Executing [[email protected]:6] GosubIf(“PJSIP/192-0000013e”, “0?cf,1()”) in new stack
– Executing [[email protected]:7] GotoIf(“PJSIP/192-0000013e”, “1?skip1”) in new stack
– Goto (macro-dial-one,s,10)
– Executing [[email protected]:10] GotoIf(“PJSIP/192-0000013e”, “0?nodial”) in new stack
– Executing [[email protected]:11] GotoIf(“PJSIP/192-0000013e”, “0?continue”) in new stack
– Executing [[email protected]:12] Set(“PJSIP/192-0000013e”, “EXTHASCW=ENABLED”) in new stack
– Executing [[email protected]:13] GotoIf(“PJSIP/192-0000013e”, “0?next1:cwinusebusy”) in new stack
– Goto (macro-dial-one,s,25)
– Executing [[email protected]:25] GotoIf(“PJSIP/192-0000013e”, “0?next3:continue”) in new stack
– Goto (macro-dial-one,s,27)
– Executing [[email protected]:27] GotoIf(“PJSIP/192-0000013e”, “0?nodial”) in new stack
– Executing [[email protected]:28] GosubIf(“PJSIP/192-0000013e”, “1?dstring,1():dlocal,1()”) in new stack
– Executing [[email protected]:1] Set(“PJSIP/192-0000013e”, “DSTRING=”) in new stack
– Executing [[email protected]:2] Set(“PJSIP/192-0000013e”, “DEVICES=167”) in new stack
– Executing [[email protected]:3] ExecIf(“PJSIP/192-0000013e”, “0?Return()”) in new stack
– Executing [[email protected]:4] ExecIf(“PJSIP/192-0000013e”, “0?Set(DEVICES=67)”) in new stack
– Executing [[email protected]:5] Set(“PJSIP/192-0000013e”, “LOOPCNT=1”) in new stack
– Executing [[email protected]:6] Set(“PJSIP/192-0000013e”, “ITER=1”) in new stack
– Executing [[email protected]:7] Set(“PJSIP/192-0000013e”, “THISDIAL=PJSIP/167”) in new stack
– Executing [[email protected]:8] GosubIf(“PJSIP/192-0000013e”, “1?zap2dahdi,1()”) in new stack
– Executing [[email protected]:1] ExecIf(“PJSIP/192-0000013e”, “0?Return()”) in new stack
– Executing [[email protected]:2] Set(“PJSIP/192-0000013e”, “NEWDIAL=”) in new stack
– Executing [[email protected]:3] Set(“PJSIP/192-0000013e”, “LOOPCNT2=1”) in new stack
– Executing [[email protected]:4] Set(“PJSIP/192-0000013e”, “ITER2=1”) in new stack
– Executing [[email protected]:5] Set(“PJSIP/192-0000013e”, “THISPART2=PJSIP/167”) in new stack
– Executing [[email protected]:6] ExecIf(“PJSIP/192-0000013e”, “0?Set(THISPART2=DAHDIIP/167)”) in new stack
– Executing [[email protected]:7] Set(“PJSIP/192-0000013e”, “NEWDIAL=PJSIP/167&”) in new stack
– Executing [[email protected]:8] Set(“PJSIP/192-0000013e”, “ITER2=2”) in new stack
– Executing [[email protected]:9] GotoIf(“PJSIP/192-0000013e”, “0?begin2”) in new stack
– Executing [[email protected]:10] Set(“PJSIP/192-0000013e”, “THISDIAL=PJSIP/167”) in new stack
– Executing [[email protected]:11] Return(“PJSIP/192-0000013e”, “”) in new stack
– Executing [[email protected]:9] GotoIf(“PJSIP/192-0000013e”, “0?docheck”) in new stack
– Executing [[email protected]:10] NoOp(“PJSIP/192-0000013e”, “Debug: Found PJSIP Destination PJSIP/167”) in new stack
– Executing [[email protected]:11] GotoIf(“PJSIP/192-0000013e”, “0?doset”) in new stack
– Executing [[email protected]:12] NoOp(“PJSIP/192-0000013e”, “Debug: Updating PJSIP Destination with PJSIP_DIAL_CONTACTS”) in new stack
– Executing [[email protected]:13] Set(“PJSIP/192-0000013e”, “THISDIAL=PJSIP/167/sip:[email protected]:5060”) in new stack
– Executing [[email protected]:14] ExecIf(“PJSIP/192-0000013e”, “0?Set(DIALSTATUS=CHANUNAVAIL)”) in new stack
– Executing [[email protected]:15] GotoIf(“PJSIP/192-0000013e”, “0?skipset”) in new stack
– Executing [[email protected]:16] Set(“PJSIP/192-0000013e”, “DSTRING=PJSIP/167/sip:[email protected]:5060&”) in new stack
– Executing [[email protected]:17] Set(“PJSIP/192-0000013e”, “ITER=2”) in new stack
– Executing [[email protected]:18] GotoIf(“PJSIP/192-0000013e”, “0?begin”) in new stack
– Executing [[email protected]:19] ExecIf(“PJSIP/192-0000013e”, “0?Return()”) in new stack
– Executing [[email protected]:20] Set(“PJSIP/192-0000013e”, “DSTRING=PJSIP/167/sip:[email protected]:5060”) in new stack
– Executing [[email protected]:21] Return(“PJSIP/192-0000013e”, “”) in new stack
– Executing [[email protected]:29] GotoIf(“PJSIP/192-0000013e”, “0?nodial”) in new stack
– Executing [[email protected]:30] GotoIf(“PJSIP/192-0000013e”, “0?skiptrace”) in new stack
– Executing [[email protected]:31] GosubIf(“PJSIP/192-0000013e”, “1?ctset,1():ctclear,1()”) in new stack
– Executing [[email protected]:1] Set(“PJSIP/192-0000013e”, “DB(CALLTRACE/167)=192”) in new stack
– Executing [[email protected]:2] Return(“PJSIP/192-0000013e”, “”) in new stack
– Executing [[email protected]:32] Set(“PJSIP/192-0000013e”, “D_OPTIONS=HhTtr”) in new stack
– Executing [[email protected]:33] GosubIf(“PJSIP/192-0000013e”, “0?func-set-sipheader,s,1(Alert-Info,)”) in new stack
– Executing [[email protected]:34] NoOp(“PJSIP/192-0000013e”, "Blind Transfer: , Attended Transfer: , User: 192, Alert Info: ") in new stack
– Executing [[email protected]:35] ExecIf(“PJSIP/192-0000013e”, “1?Set(ALERT_INFO=)”) in new stack
– Executing [[email protected]:36] ExecIf(“PJSIP/192-0000013e”, “0?Set(ALERT_INFO=)”) in new stack
– Executing [[email protected]:37] ExecIf(“PJSIP/192-0000013e”, “0?Set(ALERT_INFO=)”) in new stack
– Executing [[email protected]:38] ExecIf(“PJSIP/192-0000013e”, “0?Set(ALERT_INFO=Normal;volume=)”) in new stack
– Executing [[email protected]:39] ExecIf(“PJSIP/192-0000013e”, “0?Set(ALERT_INFO=Normal;volume=)”) in new stack
– Executing [[email protected]:40] GosubIf(“PJSIP/192-0000013e”, “0?func-set-sipheader,s,1(Alert-Info,)”) in new stack
– Executing [[email protected]:41] ExecIf(“PJSIP/192-0000013e”, “0?Set(CHANNEL(musicclass)=)”) in new stack
– Executing [[email protected]:42] GosubIf(“PJSIP/192-0000013e”, “0?qwait,1()”) in new stack
– Executing [[email protected]:43] Set(“PJSIP/192-0000013e”, “__CWIGNORE=”) in new stack
– Executing [[email protected]:44] Set(“PJSIP/192-0000013e”, “__KEEPCID=TRUE”) in new stack
– Executing [[email protected]:45] GotoIf(“PJSIP/192-0000013e”, “0?usegoto,1”) in new stack
– Executing [[email protected]:46] GotoIf(“PJSIP/192-0000013e”, “0?godial”) in new stack
– Executing [[email protected]:47] Gosub(“PJSIP/192-0000013e”, “sub-presencestate-display,s,1(167)”) in new stack
– Executing [[email protected]display:1] Goto(“PJSIP/192-0000013e”, “state-available,1”) in new stack
– Goto (sub-presencestate-display,state-available,1)
– Executing [[email protected]:1] Set(“PJSIP/192-0000013e”, “PRESENCESTATE_DISPLAY=(Available)”) in new stack
– Executing [[email protected]:2] Return(“PJSIP/192-0000013e”, “”) in new stack
– Executing [[email protected]:48] Set(“PJSIP/192-0000013e”, “CONNECTEDLINE(name,i)=Gate 1(Available)”) in new stack
– Executing [[email protected]:49] Set(“PJSIP/192-0000013e”, “CONNECTEDLINE(num)=167”) in new stack
– Executing [[email protected]:50] Set(“PJSIP/192-0000013e”, “D_OPTIONS=HhTtrI”) in new stack
– Executing [[email protected]:51] Macro(“PJSIP/192-0000013e”, “dialout-one-predial-hook,”) in new stack
– Executing [[email protected]:1] MacroExit(“PJSIP/192-0000013e”, “”) in new stack
– Executing [[email protected]:52] ExecIf(“PJSIP/192-0000013e”, “0?Set(D_OPTIONS=HhtrII)”) in new stack
– Executing [[email protected]:53] NoOp(“PJSIP/192-0000013e”, “”) in new stack
– Executing [[email protected]:54] Dial(“PJSIP/192-0000013e”, “PJSIP/167/sip:[email protected]:5060,15,HhTtrIb(func-apply-sipheaders^s^1)”) in new stack
– PJSIP/167-0000013f Internal Gosub(func-apply-sipheaders,s,1) start
– Executing [[email protected]:1] ExecIf(“PJSIP/167-0000013f”, “0?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)”) in new stack
– Executing [[email protected]:2] NoOp(“PJSIP/167-0000013f”, “Applying SIP Headers to channel”) in new stack
– Executing [[email protected]:3] Set(“PJSIP/167-0000013f”, “SIPHEADERKEYS=”) in new stack
– Executing [[email protected]:4] ExecIf(“PJSIP/167-0000013f”, “0?Set(Rheader=1)”) in new stack
– Executing [[email protected]:5] While(“PJSIP/167-0000013f”, “0”) in new stack
– Jumping to priority 9
– Executing [[email protected]:10] ExecIf(“PJSIP/167-0000013f”, “0?SIPRemoveHeader(Alert-Info:)”) in new stack
– Executing [[email protected]:11] ExecIf(“PJSIP/167-0000013f”, “0?Set(PJSIP_HEADER(remove,Alert-Info)=)”) in new stack
– Executing [[email protected]:12] Return(“PJSIP/167-0000013f”, “”) in new stack
== Spawn extension (from-internal, 167, 1) exited non-zero on ‘PJSIP/167-0000013f’
– PJSIP/167-0000013f Internal Gosub(func-apply-sipheaders,s,1) complete GOSUB_RETVAL=
– Called PJSIP/167/sip:[email protected]:5060
== Using SIP RTP Audio TOS bits 184
== Using SIP RTP Audio TOS bits 184 in TCLASS field.
== Using SIP RTP Audio CoS mark 5
– Connected line update to PJSIP/192-0000013e prevented.
– PJSIP/167-0000013f is ringing
– PJSIP/167-0000013f is ringing
== Spawn extension (macro-dial-one, s, 54) exited non-zero on ‘PJSIP/192-0000013e’ in macro ‘dial-one’
== Spawn extension (macro-exten-vm, s, 26) exited non-zero on ‘PJSIP/192-0000013e’ in macro ‘exten-vm’
== Spawn extension (ext-local, 167, 2) exited non-zero on ‘PJSIP/192-0000013e’
– Executing [[email protected]:1] Macro(“PJSIP/192-0000013e”, “hangupcall,”) in new stack
– Executing [[email protected]:1] GotoIf(“PJSIP/192-0000013e”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [[email protected]:3] ExecIf(“PJSIP/192-0000013e”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [[email protected]:4] NoOp(“PJSIP/192-0000013e”, "PJSIP/167-0000013f monior file= ") in new stack
– Executing [[email protected]:5] AGI(“PJSIP/192-0000013e”, “attendedtransfer-rec-restart.php,PJSIP/167-0000013f,”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/attendedtransfer-rec-restart.php
– <PJSIP/192-0000013e>AGI Script attendedtransfer-rec-restart.php completed, returning 0
– Executing [[email protected]:6] Hangup(“PJSIP/192-0000013e”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 6) exited non-zero on ‘PJSIP/192-0000013e’ in macro ‘hangupcall’
== Spawn extension (ext-local, h, 1) exited non-zero on ‘PJSIP/192-0000013e’
== Setting global variable ‘SIPDOMAIN’ to ‘192.168.4.1’
== Using SIP RTP Audio TOS bits 184
== Using SIP RTP Audio TOS bits 184 in TCLASS field.
== Using SIP RTP Audio CoS mark 5

Via: SIP/2.0/UDP 172.16.80.210:5160;received=172.16.80.210;rport=29685;branch=z9hG4bK52330b18

You have a chan_sip trunk using the default Bind Port of 5160. However, your firewall is not forwarding port 5160 and it rewrote the source port to 29685. You should probably set it up to forward port 5160 same as you have for 5060. Alternatively, your firewall may have a setting called something like ‘disable source port rewriting’ or ‘enable consistent NAT’ which may eliminate the undesired rewrite.

Note that the log you posted did not actually show an outgoing call, showing only a call from ext. 192 to ext. 167. It happened to contain the reply to OPTIONS (qualify) that showed the problem.

Rather than posting a big log directly, paste it at pastebin.freepbx.org and post the link here. Also, rather than using log data from the console, get the data from /var/log/asterisk/full or in the GUI at Reports->Asterisk Logfiles. This log will contain timestamps that may be useful in understanding the trouble.

Many thanks, I have created a link at pastebin

https://pastebin.freepbx.org/view/acb41002

The paste you just made is the old log and does not show an outgoing call. If you have forwarded UDP port 5160 in your router and still have trouble, we need a paste of the log for a new failed outgoing call.

Stewart1, have done the 5160 nat and pasted the new log of the failed outgoing calls

https://pastebin.freepbx.org/view/5adc8033

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