PJSIP extension issue

Hi guys,
I have a problem with 1 of my extensions.
When calling in to that ext (2067), everything works good.
But, When calling out from that ext, the call disconnects after 31 sec, like when it can’t connect to RTP port - but I have audio both ways…

# asterisk -vvvvvvvvvvvr | grep 2067
– Executing [[email protected]:1] GotoIf(“PJSIP/2067-000008c0”, “1?ext-local,2033,1:followme-check,2033,1”) in new stack
– Executing [[email protected]:1] Set(“PJSIP/2067-000008c0”, “__RINGTIMER=25”) in new stack
– Executing [[email protected]:2] ExecIf(“PJSIP/2067-000008c0”, “0?Set(__CWIGNORE=)”) in new stack
– Executing [[email protected]:3] Macro(“PJSIP/2067-000008c0”, “exten-vm,2033,2033,0,0,0”) in new stack
– Executing [[email protected]:1] Macro(“PJSIP/2067-000008c0”, “user-callerid,”) in new stack
– Executing [[email protected]:1] Set(“PJSIP/2067-000008c0”, “TOUCH_MONITOR=1598472689.31647”) in new stack
– Executing [[email protected]:2] Set(“PJSIP/2067-000008c0”, “AMPUSER=2067”) in new stack
– Executing [[email protected]:3] Set(“PJSIP/2067-000008c0”, “HOTDESCKCHAN=2067-000008c0”) in new stack
– Executing [[email protected]:4] Set(“PJSIP/2067-000008c0”, “HOTDESKEXTEN=2067”) in new stack
– Executing [[email protected]:5] Set(“PJSIP/2067-000008c0”, “HOTDESKCALL=0”) in new stack
– Executing [[email protected]:6] ExecIf(“PJSIP/2067-000008c0”, “0?Set(HOTDESKCALL=1)”) in new stack
– Executing [[email protected]:7] ExecIf(“PJSIP/2067-000008c0”, “0?Set(CALLERID(name)=)”) in new stack
– Executing [[email protected]:8] GotoIf(“PJSIP/2067-000008c0”, “0?report”) in new stack
– Executing [[email protected]:9] ExecIf(“PJSIP/2067-000008c0”, “1?Set(REALCALLERIDNUM=2067)”) in new stack
– Executing [[email protected]:10] Set(“PJSIP/2067-000008c0”, “AMPUSER=2067”) in new stack
– Executing [[email protected]:11] GotoIf(“PJSIP/2067-000008c0”, “0?limit”) in new stack
– Executing [[email protected]:12] Set(“PJSIP/2067-000008c0”, “AMPUSERCIDNAME=Rivka Stein”) in new stack
– Executing [[email protected]:13] ExecIf(“PJSIP/2067-000008c0”, “0?Set(__CIDMASQUERADING=TRUE)”) in new stack
– Executing [[email protected]:14] GotoIf(“PJSIP/2067-000008c0”, “0?report”) in new stack
– Executing [[email protected]:15] Set(“PJSIP/2067-000008c0”, “AMPUSERCID=2067”) in new stack
– Executing [[email protected]:16] Set(“PJSIP/2067-000008c0”, “__DIAL_OPTIONS=Ttr”) in new stack
– Executing [[email protected]:17] Set(“PJSIP/2067-000008c0”, “CALLERID(all)=“Rivka Stein” <2067>”) in new stack
– Executing [[email protected]:18] Set(“PJSIP/2067-000008c0”, “HOTDESCKCHAN=2067-000008c0”) in new stack
– Executing [[email protected]:19] Set(“PJSIP/2067-000008c0”, “HOTDESKEXTEN=2067”) in new stack
– Executing [[email protected]:20] Set(“PJSIP/2067-000008c0”, “HOTDESKCALL=0”) in new stack
– Executing [[email protected]:21] ExecIf(“PJSIP/2067-000008c0”, “0?Set(HOTDESKCALL=1)”) in new stack
– Executing [[email protected]:22] ExecIf(“PJSIP/2067-000008c0”, “0?Set(CALLERID(name)=)”) in new stack
– Executing [[email protected]:23] ExecIf(“PJSIP/2067-000008c0”, “0?Set(CALLERID(all)=”" < >)") in new stack
– Executing [[email protected]:24] ExecIf(“PJSIP/2067-000008c0”, “0?Set(CALLERID(all)=2033)”) in new stack
– Executing [[email protected]:25] GotoIf(“PJSIP/2067-000008c0”, “0?limit”) in new stack
– Executing [[email protected]:26] ExecIf(“PJSIP/2067-000008c0”, “0?Set(GROUP(concurrency_limit)=2067)”) in new stack
– Executing [[email protected]:27] ExecIf(“PJSIP/2067-000008c0”, “0?Set(CHANNEL(language)=)”) in new stack
– Executing [[email protected]:28] NoOp(“PJSIP/2067-000008c0”, “Macro Depth is 2”) in new stack
– Executing [[email protected]:29] GotoIf(“PJSIP/2067-000008c0”, “1?report2:macroerror”) in new stack
– Executing [[email protected]:30] GotoIf(“PJSIP/2067-000008c0”, “0?continue”) in new stack
– Executing [[email protected]:31] ExecIf(“PJSIP/2067-000008c0”, “1?Set(__CALLEE_ACCOUNCODE=)”) in new stack
– Executing [[email protected]:32] Set(“PJSIP/2067-000008c0”, “__TTL=64”) in new stack
– Executing [[email protected]:33] GotoIf(“PJSIP/2067-000008c0”, “1?continue”) in new stack
– Executing [[email protected]:49] Set(“PJSIP/2067-000008c0”, “CALLERID(number)=2067”) in new stack
– Executing [[email protected]:50] Set(“PJSIP/2067-000008c0”, “CALLERID(name)=Rivka Stein”) in new stack
– Executing [[email protected]:51] GotoIf(“PJSIP/2067-000008c0”, “0?cnum”) in new stack
– Executing [[email protected]:52] Set(“PJSIP/2067-000008c0”, “CDR(cnam)=Rivka Stein”) in new stack
– Executing [[email protected]:53] Set(“PJSIP/2067-000008c0”, “CDR(cnum)=2067”) in new stack
– Executing [[email protected]:54] Set(“PJSIP/2067-000008c0”, “CHANNEL(language)=en”) in new stack
– Executing [[email protected]:55] GosubIf(“PJSIP/2067-000008c0”, “0?app-check-classofservce,s,1()”) in new stack
– Executing [[email protected]:2] Set(“PJSIP/2067-000008c0”, “RingGroupMethod=none”) in new stack
– Executing [[email protected]:3] Set(“PJSIP/2067-000008c0”, “__EXTTOCALL=2033”) in new stack
– Executing [[email protected]:4] Set(“PJSIP/2067-000008c0”, “__PICKUPMARK=2033”) in new stack
– Executing [[email protected]:5] Set(“PJSIP/2067-000008c0”, “RT=25”) in new stack
– Executing [[email protected]:6] ExecIf(“PJSIP/2067-000008c0”, “0?Macro(vm,2033,DIRECTDIAL,)”) in new stack
– Executing [[email protected]:7] ExecIf(“PJSIP/2067-000008c0”, “0?MacroExit()”) in new stack
– Executing [[email protected]:8] ExecIf(“PJSIP/2067-000008c0”, “0?Gosub(ext-intercom,*802033,1())”) in new stack
– Executing [[email protected]:9] ExecIf(“PJSIP/2067-000008c0”, “0?MacroExit()”) in new stack
– Executing [[email protected]:10] ExecIf(“PJSIP/2067-000008c0”, “0?ChanSpy(SIP/2033,q)”) in new stack
– Executing [[email protected]:11] ExecIf(“PJSIP/2067-000008c0”, “0?MacroExit()”) in new stack
– Executing [[email protected]:12] ExecIf(“PJSIP/2067-000008c0”, “0?Macro(vm,2033,DIRECTDIAL,)”) in new stack
– Executing [[email protected]:13] ExecIf(“PJSIP/2067-000008c0”, “0?MacroExit()”) in new stack
– Executing [[email protected]:14] ExecIf(“PJSIP/2067-000008c0”, “0?Gosub(ext-intercom,*802033,1())”) in new stack
– Executing [[email protected]:15] ExecIf(“PJSIP/2067-000008c0”, “0?MacroExit()”) in new stack
– Executing [[email protected]:16] ExecIf(“PJSIP/2067-000008c0”, “0?ChanSpy(SIP/2033,q)”) in new stack
– Executing [[email protected]:17] ExecIf(“PJSIP/2067-000008c0”, “0?MacroExit()”) in new stack
– Executing [[email protected]:18] Gosub(“PJSIP/2067-000008c0”, “sub-record-check,s,1(exten,2033,dontcare)”) in new stack
– Executing [[email protected]:1] GotoIf(“PJSIP/2067-000008c0”, “0?initialized”) in new stack
– Executing [[email protected]:2] Set(“PJSIP/2067-000008c0”, “__REC_STATUS=INITIALIZED”) in new stack
– Executing [[email protected]:3] Set(“PJSIP/2067-000008c0”, “NOW=1598472689”) in new stack
– Executing [[email protected]:4] Set(“PJSIP/2067-000008c0”, “__DAY=26”) in new stack
– Executing [[email protected]:5] Set(“PJSIP/2067-000008c0”, “__MONTH=08”) in new stack
– Executing [[email protected]:6] Set(“PJSIP/2067-000008c0”, “__YEAR=2020”) in new stack
– Executing [[email protected]:7] Set(“PJSIP/2067-000008c0”, “__TIMESTR=20200826-161129”) in new stack
– Executing [[email protected]:8] Set(“PJSIP/2067-000008c0”, “__FROMEXTEN=2067”) in new stack
– Executing [[email protected]:9] Set(“PJSIP/2067-000008c0”, “__MON_FMT=wav”) in new stack
– Executing [[email protected]:10] NoOp(“PJSIP/2067-000008c0”, “Recordings initialized”) in new stack
– Executing [[email protected]:11] ExecIf(“PJSIP/2067-000008c0”, “0?Set(ARG3=dontcare)”) in new stack
– Executing [[email protected]:12] Set(“PJSIP/2067-000008c0”, “REC_POLICY_MODE_SAVE=”) in new stack
– Executing [[email protected]:13] ExecIf(“PJSIP/2067-000008c0”, “0?Set(REC_STATUS=NO)”) in new stack
– Executing [[email protected]:14] GotoIf(“PJSIP/2067-000008c0”, “5?checkaction”) in new stack
– Executing [[email protected]:17] GotoIf(“PJSIP/2067-000008c0”, “1?sub-record-check,exten,1”) in new stack
– Executing [[email protected]:1] NoOp(“PJSIP/2067-000008c0”, “Exten Recording Check between 2067 and 2033”) in new stack
– Executing [[email protected]:2] Set(“PJSIP/2067-000008c0”, “CALLTYPE=internal”) in new stack
– Executing [[email protected]:3] ExecIf(“PJSIP/2067-000008c0”, “0?Set(CALLTYPE=)”) in new stack
– Executing [[email protected]:4] Set(“PJSIP/2067-000008c0”, “CALLEE=dontcare”) in new stack
– Executing [[email protected]:5] ExecIf(“PJSIP/2067-000008c0”, “0?Set(CALLEE=dontcare)”) in new stack
– Executing [[email protected]:6] GotoIf(“PJSIP/2067-000008c0”, “0?callee”) in new stack
– Executing [[email protected]:7] GotoIf(“PJSIP/2067-000008c0”, “1?caller”) in new stack
– Executing [[email protected]:13] Set(“PJSIP/2067-000008c0”, “RECMODE=dontcare”) in new stack
– Executing [[email protected]:14] ExecIf(“PJSIP/2067-000008c0”, “0?Set(RECMODE=dontcare)”) in new stack
– Executing [[email protected]:15] ExecIf(“PJSIP/2067-000008c0”, “1?Set(RECMODE=dontcare)”) in new stack
– Executing [[email protected]:16] Gosub(“PJSIP/2067-000008c0”, “recordcheck,1(dontcare,internal,2033)”) in new stack
– Executing [[email protected]:1] NoOp(“PJSIP/2067-000008c0”, “Starting recording check against dontcare”) in new stack
– Executing [[email protected]:2] Goto(“PJSIP/2067-000008c0”, “dontcare”) in new stack
– Executing [[email protected]:3] Return(“PJSIP/2067-000008c0”, “”) in new stack
– Executing [[email protected]:17] Return(“PJSIP/2067-000008c0”, “”) in new stack
– Executing [[email protected]:19] GotoIf(“PJSIP/2067-000008c0”, “1?macrodial”) in new stack
– Executing [[email protected]:25] GosubIf(“PJSIP/2067-000008c0”, “0?clrheader,1()”) in new stack
– Executing [[email protected]:26] Macro(“PJSIP/2067-000008c0”, “dial-one,25,Ttr,2033”) in new stack
– Executing [[email protected]:1] Set(“PJSIP/2067-000008c0”, “DEXTEN=2033”) in new stack
– Executing [[email protected]:2] ExecIf(“PJSIP/2067-000008c0”, “0?Set(__EXTTOCALL=2033)”) in new stack
– Executing [[email protected]:3] Set(“PJSIP/2067-000008c0”, “DIALSTATUS_CW=”) in new stack
– Executing [[email protected]:4] GosubIf(“PJSIP/2067-000008c0”, “0?screen,1()”) in new stack
– Executing [[email protected]:5] GosubIf(“PJSIP/2067-000008c0”, “0?cf,1()”) in new stack
– Executing [[email protected]:6] GotoIf(“PJSIP/2067-000008c0”, “1?skip1”) in new stack
– Executing [[email protected]:9] GotoIf(“PJSIP/2067-000008c0”, “0?nodial”) in new stack
– Executing [[email protected]:10] GotoIf(“PJSIP/2067-000008c0”, “0?continue”) in new stack
– Executing [[email protected]:11] Set(“PJSIP/2067-000008c0”, “EXTHASCW=ENABLED”) in new stack
– Executing [[email protected]:12] GotoIf(“PJSIP/2067-000008c0”, “0?next1:cwinusebusy”) in new stack
– Executing [[email protected]:24] GotoIf(“PJSIP/2067-000008c0”, “0?next3:continue”) in new stack
– Executing [[email protected]:26] GotoIf(“PJSIP/2067-000008c0”, “0?nodial”) in new stack
– Executing [[email protected]:27] GosubIf(“PJSIP/2067-000008c0”, “1?dstring,1():dlocal,1()”) in new stack
– Executing [[email protected]:1] Set(“PJSIP/2067-000008c0”, “DSTRING=”) in new stack
– Executing [[email protected]:2] Set(“PJSIP/2067-000008c0”, “DEVICES=2033”) in new stack
– Executing [[email protected]:3] ExecIf(“PJSIP/2067-000008c0”, “0?Return()”) in new stack
– Executing [[email protected]:4] ExecIf(“PJSIP/2067-000008c0”, “0?Set(DEVICES=033)”) in new stack
– Executing [[email protected]:5] Set(“PJSIP/2067-000008c0”, “LOOPCNT=1”) in new stack
– Executing [[email protected]:6] Set(“PJSIP/2067-000008c0”, “ITER=1”) in new stack
– Executing [[email protected]:7] Set(“PJSIP/2067-000008c0”, “THISDIAL=SIP/2033”) in new stack
– Executing [[email protected]:8] GosubIf(“PJSIP/2067-000008c0”, “1?zap2dahdi,1()”) in new stack
– Executing [[email protected]:1] ExecIf(“PJSIP/2067-000008c0”, “0?Return()”) in new stack
– Executing [[email protected]:2] Set(“PJSIP/2067-000008c0”, “NEWDIAL=”) in new stack
– Executing [[email protected]:3] Set(“PJSIP/2067-000008c0”, “LOOPCNT2=1”) in new stack
– Executing [[email protected]:4] Set(“PJSIP/2067-000008c0”, “ITER2=1”) in new stack
– Executing [[email protected]:5] Set(“PJSIP/2067-000008c0”, “THISPART2=SIP/2033”) in new stack
– Executing [[email protected]:6] ExecIf(“PJSIP/2067-000008c0”, “0?Set(THISPART2=DAHDI/2033)”) in new stack
– Executing [[email protected]:7] Set(“PJSIP/2067-000008c0”, “NEWDIAL=SIP/2033&”) in new stack
– Executing [[email protected]:8] Set(“PJSIP/2067-000008c0”, “ITER2=2”) in new stack
– Executing [[email protected]:9] GotoIf(“PJSIP/2067-000008c0”, “0?begin2”) in new stack
– Executing [[email protected]:10] Set(“PJSIP/2067-000008c0”, “THISDIAL=SIP/2033”) in new stack
– Executing [[email protected]:11] Return(“PJSIP/2067-000008c0”, “”) in new stack
– Executing [[email protected]:9] GotoIf(“PJSIP/2067-000008c0”, “1?docheck”) in new stack
– Executing [[email protected]:15] GotoIf(“PJSIP/2067-000008c0”, “0?skipset”) in new stack
– Executing [[email protected]:16] Set(“PJSIP/2067-000008c0”, “DSTRING=SIP/2033&”) in new stack
– Executing [[email protected]:17] Set(“PJSIP/2067-000008c0”, “ITER=2”) in new stack
– Executing [[email protected]:18] GotoIf(“PJSIP/2067-000008c0”, “0?begin”) in new stack
– Executing [[email protected]:19] ExecIf(“PJSIP/2067-000008c0”, “0?Return()”) in new stack
– Executing [[email protected]:20] Set(“PJSIP/2067-000008c0”, “DSTRING=SIP/2033”) in new stack
– Executing [[email protected]:21] Return(“PJSIP/2067-000008c0”, “”) in new stack
– Executing [[email protected]:28] GotoIf(“PJSIP/2067-000008c0”, “0?nodial”) in new stack
– Executing [[email protected]:29] GotoIf(“PJSIP/2067-000008c0”, “0?skiptrace”) in new stack
– Executing [[email protected]:30] GosubIf(“PJSIP/2067-000008c0”, “1?ctset,1():ctclear,1()”) in new stack
– Executing [[email protected]:1] Set(“PJSIP/2067-000008c0”, “DB(CALLTRACE/2033)=2067”) in new stack
– Executing [[email protected]:2] Return(“PJSIP/2067-000008c0”, “”) in new stack
– Executing [[email protected]:31] Set(“PJSIP/2067-000008c0”, “D_OPTIONS=Ttr”) in new stack
– Executing [[email protected]:32] GosubIf(“PJSIP/2067-000008c0”, “0?func-set-sipheader,s,1(Alert-Info,)”) in new stack
– Executing [[email protected]:33] NoOp(“PJSIP/2067-000008c0”, "Blind Transfer: , Attended Transfer: , User: 2067, Alert Info: ") in new stack
– Executing [[email protected]:34] ExecIf(“PJSIP/2067-000008c0”, “1?Set(ALERT_INFO=)”) in new stack
– Executing [[email protected]:35] ExecIf(“PJSIP/2067-000008c0”, “0?Set(ALERT_INFO=)”) in new stack
– Executing [[email protected]:36] ExecIf(“PJSIP/2067-000008c0”, “0?Set(ALERT_INFO=)”) in new stack
– Executing [[email protected]:37] ExecIf(“PJSIP/2067-000008c0”, “0?Set(ALERT_INFO=Normal;volume=)”) in new stack
– Executing [[email protected]:38] ExecIf(“PJSIP/2067-000008c0”, “0?Set(ALERT_INFO=Normal;volume=)”) in new stack
– Executing [[email protected]:39] GosubIf(“PJSIP/2067-000008c0”, “0?func-set-sipheader,s,1(Alert-Info,)”) in new stack
– Executing [[email protected]:40] ExecIf(“PJSIP/2067-000008c0”, “0?Set(CHANNEL(musicclass)=)”) in new stack
– Executing [[email protected]:41] GosubIf(“PJSIP/2067-000008c0”, “0?qwait,1()”) in new stack
– Executing [[email protected]:42] Set(“PJSIP/2067-000008c0”, “__CWIGNORE=”) in new stack
– Executing [[email protected]:43] Set(“PJSIP/2067-000008c0”, “__KEEPCID=TRUE”) in new stack
– Executing [[email protected]:44] GotoIf(“PJSIP/2067-000008c0”, “0?usegoto,1”) in new stack
– Executing [[email protected]:45] GotoIf(“PJSIP/2067-000008c0”, “0?godial”) in new stack
– Executing [[email protected]:46] Gosub(“PJSIP/2067-000008c0”, “sub-presencestate-display,s,1(2033)”) in new stack
– Executing [[email protected]:1] Goto(“PJSIP/2067-000008c0”, “state-not_set,1”) in new stack
– Executing [[email protected]:1] Set(“PJSIP/2067-000008c0”, “PRESENCESTATE_DISPLAY=”) in new stack
– Executing [[email protected]:2] Return(“PJSIP/2067-000008c0”, “”) in new stack
– Executing [[email protected]:47] Set(“PJSIP/2067-000008c0”, “CONNECTEDLINE(name,i)=Sholem Kleinman”) in new stack
– Executing [[email protected]:48] Set(“PJSIP/2067-000008c0”, “CONNECTEDLINE(num)=2033”) in new stack
– Executing [[email protected]:49] Set(“PJSIP/2067-000008c0”, “D_OPTIONS=Ttr”) in new stack
– Executing [[email protected]:50] Macro(“PJSIP/2067-000008c0”, “dialout-one-predial-hook,”) in new stack
– Executing [[email protected]:1] MacroExit(“PJSIP/2067-000008c0”, “”) in new stack
– Executing [[email protected]:51] ExecIf(“PJSIP/2067-000008c0”, “0?Set(D_OPTIONS=trI)”) in new stack
– Executing [[email protected]:52] NoOp(“PJSIP/2067-000008c0”, “”) in new stack
– Executing [[email protected]:53] ExecIf(“PJSIP/2067-000008c0”, “0?Set(D_OPTIONS=Ttrg)”) in new stack
– Executing [[email protected]:54] Dial(“PJSIP/2067-000008c0”, “SIP/2033,25,Ttrb(func-apply-sipheaders^s^1)”) in new stack
– SIP/2033-00004a61 answered PJSIP/2067-000008c0
– Channel PJSIP/2067-000008c0 joined ‘simple_bridge’ basic-bridge <16636199-b783-42c3-8548-150952474544>
– Channel PJSIP/2067-000008c0 left ‘simple_bridge’ basic-bridge <16636199-b783-42c3-8548-150952474544>
== Spawn extension (macro-dial-one, s, 54) exited non-zero on ‘PJSIP/2067-000008c0’ in macro ‘dial-one’
== Spawn extension (macro-exten-vm, s, 26) exited non-zero on ‘PJSIP/2067-000008c0’ in macro ‘exten-vm’
== Spawn extension (ext-local, 2033, 3) exited non-zero on ‘PJSIP/2067-000008c0’
– Executing [[email protected]:1] Macro(“PJSIP/2067-000008c0”, “hangupcall,”) in new stack
– Executing [[email protected]:1] GotoIf(“PJSIP/2067-000008c0”, “1?theend”) in new stack
– Executing [[email protected]:3] ExecIf(“PJSIP/2067-000008c0”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [[email protected]:4] NoOp(“PJSIP/2067-000008c0”, "SIP/2033-00004a61 montior file= ") in new stack
– Executing [[email protected]:5] GotoIf(“PJSIP/2067-000008c0”, “1?skipagi”) in new stack
– Executing [[email protected]:7] Hangup(“PJSIP/2067-000008c0”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 7) exited non-zero on ‘PJSIP/2067-000008c0’ in macro ‘hangupcall’
== Spawn extension (ext-local, h, 1) exited non-zero on ‘PJSIP/2067-000008c0’

If ext. 2067 is not on the same LAN subnet as the PBX, please describe the network setup. If there is a SIP ALG enabled on any router/firewall in the path, try turning that off.

In Asterisk SIP settings, confirm that Local Networks and External Address are correctly set. If you change these, restart (not just reload) Asterisk.

If you still have trouble, at the Asterisk command prompt type
pjsip set logger on
and make another failing call. Paste the relevant section of the Asterisk log at pastebin.freepbx.org and post the link here.

NVM, I found the problem…
It was the Fail2ban
I added my subnet to the whitelist, removed the IPs from the Banned list, restarted the Fail2ban
Everything is good now…

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