Incoming calls always busy

Hello,
I am a newbie member of this community and I am installing freepbx for the first time, so I apologize if my issue is trivial; nevertheless I could not find the solution in another similar posts.
I am using Freepbx 16 with Asterix 18.
I am trying to set up a basic configuration to receive calls directed to a DID number.
I have created an extension and an inbound route that forwards any call to that extension.
I registered a SIP phone to that extension.
I configured my DID number, so that the calls are forwarded to the SIP URI associated to the extension.
The calls fails in 2 different way, apparently in random way. In this post I will describe the most frequent failure. The call rings 2-3 seconds and then is dropped.
Here is the section of the “full” logfile, related to this call. I have replaced the caller id (my private mobile number) with “xxxxxxxxxxx”. Also, I remark that I have listed only the final part of the section of the logfile related to this call, because the complete section was too big for the post-
Any help will be appreciated.

[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:7] Set(“PJSIP/anonymous-00000020”, “THISDIAL=PJSIP/1”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:8] GotoIf(“PJSIP/anonymous-00000020”, “0?docheck”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:9] NoOp(“PJSIP/anonymous-00000020”, “Debug: Found PJSIP Destination PJSIP/1”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:10] GotoIf(“PJSIP/anonymous-00000020”, “0?doset”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:11] NoOp(“PJSIP/anonymous-00000020”, “Debug: Updating PJSIP Destination with PJSIP_DIAL_CONTACTS”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:12] Set(“PJSIP/anonymous-00000020”, “THISDIAL=PJSIP/1/sip:[email protected]:60538;ob;x-ast-orig-host=192.168.178.254:60538”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:13] ExecIf(“PJSIP/anonymous-00000020”, “0?Set(DIALSTATUS=CHANUNAVAIL)”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:14] GotoIf(“PJSIP/anonymous-00000020”, “0?skipset”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:15] Set(“PJSIP/anonymous-00000020”, “DSTRING=PJSIP/1/sip:[email protected]:60538;ob;x-ast-orig-host=192.168.178.254:60538&”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:16] Set(“PJSIP/anonymous-00000020”, “ITER=3”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:17] GotoIf(“PJSIP/anonymous-00000020”, “0?begin”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:18] ExecIf(“PJSIP/anonymous-00000020”, “0?Return()”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:19] Set(“PJSIP/anonymous-00000020”, “DSTRING=PJSIP/1/sip:[email protected]:60538;ob;x-ast-orig-host=192.168.178.254:60538”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:20] Return(“PJSIP/anonymous-00000020”, “”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:29] GotoIf(“PJSIP/anonymous-00000020”, “0?nodial”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:30] GotoIf(“PJSIP/anonymous-00000020”, “0?skiptrace”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:31] GosubIf(“PJSIP/anonymous-00000020”, “1?ctset,1():ctclear,1()”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:1] Set(“PJSIP/anonymous-00000020”, “DB(CALLTRACE/1)=xxxxxxxxxxx”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:2] Return(“PJSIP/anonymous-00000020”, “”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:32] Set(“PJSIP/anonymous-00000020”, “D_OPTIONS=HhTtrIM(auto-blkvm)”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:33] GosubIf(“PJSIP/anonymous-00000020”, “0?func-set-sipheader,s,1(Alert-Info,)”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:34] NoOp(“PJSIP/anonymous-00000020”, "Blind Transfer: , Attended Transfer: , User: , Alert Info: ") in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:35] ExecIf(“PJSIP/anonymous-00000020”, “0?Set(ALERT_INFO=)”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:36] ExecIf(“PJSIP/anonymous-00000020”, “0?Set(ALERT_INFO=)”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:37] ExecIf(“PJSIP/anonymous-00000020”, “0?Set(ALERT_INFO=)”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:38] ExecIf(“PJSIP/anonymous-00000020”, “0?Set(ALERT_INFO=Normal;volume=)”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:39] ExecIf(“PJSIP/anonymous-00000020”, “0?Set(ALERT_INFO=Normal;volume=)”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:40] GosubIf(“PJSIP/anonymous-00000020”, “0?func-set-sipheader,s,1(Alert-Info,)”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:41] ExecIf(“PJSIP/anonymous-00000020”, “0?Set(CHANNEL(musicclass)=)”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:42] GosubIf(“PJSIP/anonymous-00000020”, “0?qwait,1()”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:43] Set(“PJSIP/anonymous-00000020”, “__CWIGNORE=”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:44] Set(“PJSIP/anonymous-00000020”, “__KEEPCID=TRUE”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:45] GotoIf(“PJSIP/anonymous-00000020”, “0?usegoto,1”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:46] GotoIf(“PJSIP/anonymous-00000020”, “1?godial”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx_builtins.c: Goto (macro-dial-one,s,51)
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:51] Macro(“PJSIP/anonymous-00000020”, “dialout-one-predial-hook,”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:1] MacroExit(“PJSIP/anonymous-00000020”, “”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:52] ExecIf(“PJSIP/anonymous-00000020”, “1?Set(D_OPTIONS=HhtrIM(auto-blkvm)I)”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:53] ExecIf(“PJSIP/anonymous-00000020”, “0?Set(CWRING=r(callwaiting)):Set(CWRING=)”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:54] NoOp(“PJSIP/anonymous-00000020”, “”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:55] ExecIf(“PJSIP/anonymous-00000020”, “0?Set(D_OPTIONS=HhtrIM(auto-blkvm)Ig)”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:56] Dial(“PJSIP/anonymous-00000020”, “PJSIP/1/sip:[email protected]:60538;ob;x-ast-orig-host=192.168.178.254:60538,7,HhtrIM(auto-blkvm)Ib(func-apply-sipheaders^s^1)”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] app_stack.c: PJSIP/1-00000021 Internal Gosub(func-apply-sipheaders,s,1) start
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:1] ExecIf(“PJSIP/1-00000021”, “1?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:2] NoOp(“PJSIP/1-00000021”, “Applying SIP Headers to channel PJSIP/1-00000021”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:3] Set(“PJSIP/1-00000021”, “TECH=PJSIP”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:4] Set(“PJSIP/1-00000021”, “SIPHEADERKEYS=”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:5] While(“PJSIP/1-00000021”, “0”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] app_while.c: Jumping to priority 11
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:12] Return(“PJSIP/1-00000021”, “”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] app_stack.c: Spawn extension (from-internal, 1, 1) exited non-zero on ‘PJSIP/1-00000021’
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] app_stack.c: PJSIP/1-00000021 Internal Gosub(func-apply-sipheaders,s,1) complete GOSUB_RETVAL=
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] app_dial.c: Called PJSIP/1/sip:[email protected]:60538;ob;x-ast-orig-host=192.168.178.254:60538
[2022-07-10 21:24:27] VERBOSE[9039] netsock2.c: Using SIP RTP Audio TOS bits 184
[2022-07-10 21:24:27] VERBOSE[9039] netsock2.c: Using SIP RTP Audio TOS bits 184 in TCLASS field.
[2022-07-10 21:24:27] VERBOSE[9039] netsock2.c: Using SIP RTP Audio CoS mark 5
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] app_dial.c: Connected line update to PJSIP/anonymous-00000020 prevented.
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] app_stack.c: PJSIP/1-00000021 Internal Gosub(crm-hangup,s,1) start
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:1] NoOp(“PJSIP/1-00000021”, “Sending Hangup to CRM”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:2] NoOp(“PJSIP/1-00000021”, “HANGUP CAUSE: 17”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:3] ExecIf(“PJSIP/1-00000021”, “0?Set(__CRM_VOICEMAIL=)”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:4] NoOp(“PJSIP/1-00000021”, “MASTER CHANNEL: 1657488267.33 = 1657488267.32”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:5] GotoIf(“PJSIP/1-00000021”, “1?return”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx_builtins.c: Goto (crm-hangup,s,8)
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:8] Return(“PJSIP/1-00000021”, “”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] app_stack.c: Spawn extension (from-internal, 1, 1) exited non-zero on ‘PJSIP/1-00000021’
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] app_stack.c: PJSIP/1-00000021 Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] app_dial.c: Everyone is busy/congested at this time (1:1/0/0)
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:57] ExecIf(“PJSIP/anonymous-00000020”, “0?MacroExit()”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:58] ExecIf(“PJSIP/anonymous-00000020”, “0?Set(DIALSTATUS=)”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:59] GosubIf(“PJSIP/anonymous-00000020”, “0?s-BUSY,1()”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:60] MacroExit(“PJSIP/anonymous-00000020”, “”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:7] Set(“PJSIP/anonymous-00000020”, “__CWIGNORE=”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:8] Set(“PJSIP/anonymous-00000020”, “PR_DIALSTATUS=BUSY”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:9] GosubIf(“PJSIP/anonymous-00000020”, “0?docfu,1()”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:10] GosubIf(“PJSIP/anonymous-00000020”, “0?docfb,1()”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:11] Set(“PJSIP/anonymous-00000020”, “DIALSTATUS=BUSY”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:12] Goto(“PJSIP/anonymous-00000020”, “s-BUSY,1”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx_builtins.c: Goto (macro-simple-dial,s-BUSY,1)
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:1] NoOp(“PJSIP/anonymous-00000020”, “Extension is reporting s-BUSY”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:29] Set(“PJSIP/anonymous-00000020”, “RingGroupMethod=ringall”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:30] Set(“PJSIP/anonymous-00000020”, “_FMGRP=1”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:31] GotoIf(“PJSIP/anonymous-00000020”, “1?DIALGRP”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx_builtins.c: Goto (followme-sub,1,35)
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:35] ExecIf(“PJSIP/anonymous-00000020”, “1?Set(DOPTS=HhTtrI):Set(DOPTS=m(Ring)HhTtI)”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:36] Set(“PJSIP/anonymous-00000020”, “__ALT_CONFIRM_MSG=”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:37] GotoIf(“PJSIP/anonymous-00000020”, “0?doconfirm”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:38] GotoIf(“PJSIP/anonymous-00000020”, “0?ringallv21”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:39] Macro(“PJSIP/anonymous-00000020”, “dial,20,HhTtrI,1”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:1] NoOp(“PJSIP/anonymous-00000020”, "Blind Transfer: , Attended Transfer: , User: , Alert Info: ") in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:2] Set(“PJSIP/anonymous-00000020”, “__CRM_SOURCE=xxxxxxxxxxx”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:3] ExecIf(“PJSIP/anonymous-00000020”, “0?Set(ALERT_INFO=)”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:4] ExecIf(“PJSIP/anonymous-00000020”, “0?Set(ALERT_INFO=)”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:5] ExecIf(“PJSIP/anonymous-00000020”, “0?Set(ALERT_INFO=)”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:6] ExecIf(“PJSIP/anonymous-00000020”, “0?Set(CHANNEL(musicclass)=)”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:7] AGI(“PJSIP/anonymous-00000020”, “agi://127.0.0.1/dialparties.agi”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] res_agi.c: agi://127.0.0.1/dialparties.agi: Starting New Dialparties.agi
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] res_agi.c: agi://127.0.0.1/dialparties.agi: Caller ID name is ‘xxxxxxxxxxx’ number is ‘xxxxxxxxxxx’
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] res_agi.c: agi://127.0.0.1/dialparties.agi: CW Ignore is:
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] res_agi.c: agi://127.0.0.1/dialparties.agi: CF Ignore is:
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] res_agi.c: agi://127.0.0.1/dialparties.agi: CW IN_USE/BUSY is: 1
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] res_agi.c: agi://127.0.0.1/dialparties.agi: Ringgroup confirm is :
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] res_agi.c: agi://127.0.0.1/dialparties.agi: Methodology of ring is ‘ringall’
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] res_agi.c: agi://127.0.0.1/dialparties.agi: Added extension 1 to extension map
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] res_agi.c: agi://127.0.0.1/dialparties.agi: Extension 1 cf is disabled
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] res_agi.c: agi://127.0.0.1/dialparties.agi: Extension 1 do not disturb is disabled
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] res_agi.c: agi://127.0.0.1/dialparties.agi: Discovered PJSIP Endpoint PJSIP/991
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] res_agi.c: agi://127.0.0.1/dialparties.agi: Ended up with no PJSIP contacts
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] res_agi.c: agi://127.0.0.1/dialparties.agi: Discovered PJSIP Endpoint PJSIP/1
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] res_agi.c: agi://127.0.0.1/dialparties.agi: Ended up with real PJSIP Dial string PJSIP/1/sip:[email protected]:60538;ob;x-ast-orig-host=192.168.178.254:60538
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] res_agi.c: agi://127.0.0.1/dialparties.agi: dbset CALLTRACE/1 to xxxxxxxxxxx
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] res_agi.c: agi://127.0.0.1/dialparties.agi: Filtered ARG3: 1
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] res_agi.c: agi://127.0.0.1/dialparties.agi: RVOL_MODE ‘’
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] res_agi.c: agi://127.0.0.1/dialparties.agi: RVOL is:
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] res_agi.c: agi://127.0.0.1/dialparties.agi: RVOLPARENT is:
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] res_agi.c: <PJSIP/anonymous-00000020>AGI Script agi://127.0.0.1/dialparties.agi completed, returning 0
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:8] GotoIf(“PJSIP/anonymous-00000020”, “1?normdial”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx_builtins.c: Goto (macro-dial,s,11)
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:11] NoOp(“PJSIP/anonymous-00000020”, “Returned from dialparties with groups to dial”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:12] NoOp(“PJSIP/anonymous-00000020”, "ringall array ") in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:13] NoOp(“PJSIP/anonymous-00000020”, "ds= PJSIP/1/sip:[email protected]:60538;ob;x-ast-orig-host=192.168.178.254:60538,20,HhtrIM(auto-blkvm) ") in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:14] NoOp(“PJSIP/anonymous-00000020”, "dsextra= ") in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:15] Set(“PJSIP/anonymous-00000020”, “ds=PJSIP/1/sip:[email protected]:60538;ob;x-ast-orig-host=192.168.178.254:60538,20,HhtrIM(auto-blkvm)”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:16] NoOp(“PJSIP/anonymous-00000020”, “ds= PJSIP/1/sip:[email protected]:60538;ob;x-ast-orig-host=192.168.178.254:60538,20,HhtrIM(auto-blkvm)”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:17] Set(“PJSIP/anonymous-00000020”, “__FMGL_DIAL=”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:18] Set(“PJSIP/anonymous-00000020”, “LOOPCNT=1”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:19] Set(“PJSIP/anonymous-00000020”, “ITER=1”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:20] Set(“PJSIP/anonymous-00000020”, “__EXTTOCALL=1”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:21] NoOp(“PJSIP/anonymous-00000020”, “Working with 1”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [s[email protected]:22] ExecIf(“PJSIP/anonymous-00000020”, “0?Set(HASH(__SIPHEADERS,Alert-Info)=Normal;volume=)”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:23] ExecIf(“PJSIP/anonymous-00000020”, “0?Set(HASH(__SIPHEADERS,Alert-Info)=Normal;volume=)”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:24] Set(“PJSIP/anonymous-00000020”, “ITER=2”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:25] GotoIf(“PJSIP/anonymous-00000020”, “0?ndloopbegin”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:26] Macro(“PJSIP/anonymous-00000020”, “dial-ringall-predial-hook,”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:1] MacroExit(“PJSIP/anonymous-00000020”, “”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:27] ExecIf(“PJSIP/anonymous-00000020”, “0?Set(CWRING=r(callwaiting)):Set(CWRING=)”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:28] ExecIf(“PJSIP/anonymous-00000020”, “0?Set(ds=PJSIP/1/sip:[email protected]:60538;ob;x-ast-orig-host=192.168.178.254:60538,20,HhtrIM(auto-blkvm)g)”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:29] Dial(“PJSIP/anonymous-00000020”, “PJSIP/1/sip:[email protected]:60538;ob;x-ast-orig-host=192.168.178.254:60538,20,HhtrIM(auto-blkvm)b(func-apply-sipheaders^s^1),”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] app_stack.c: PJSIP/1-00000022 Internal Gosub(func-apply-sipheaders,s,1) start
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:1] ExecIf(“PJSIP/1-00000022”, “1?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:2] NoOp(“PJSIP/1-00000022”, “Applying SIP Headers to channel PJSIP/1-00000022”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:3] Set(“PJSIP/1-00000022”, “TECH=PJSIP”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:4] Set(“PJSIP/1-00000022”, “SIPHEADERKEYS=”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:5] While(“PJSIP/1-00000022”, “0”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] app_while.c: Jumping to priority 11
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:12] Return(“PJSIP/1-00000022”, “”) in new stack
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] app_stack.c: Spawn extension (from-internal, 1, 1) exited non-zero on ‘PJSIP/1-00000022’
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] app_stack.c: PJSIP/1-00000022 Internal Gosub(func-apply-sipheaders,s,1) complete GOSUB_RETVAL=
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] app_dial.c: Called PJSIP/1/sip:[email protected]:60538;ob;x-ast-orig-host=192.168.178.254:60538
[2022-07-10 21:24:27] VERBOSE[9039] netsock2.c: Using SIP RTP Audio TOS bits 184
[2022-07-10 21:24:27] VERBOSE[9039] netsock2.c: Using SIP RTP Audio TOS bits 184 in TCLASS field.
[2022-07-10 21:24:27] VERBOSE[9039] netsock2.c: Using SIP RTP Audio CoS mark 5
[2022-07-10 21:24:27] VERBOSE[13324][C-00000010] app_dial.c: Connected line update to PJSIP/anonymous-00000020 prevented.
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] app_stack.c: PJSIP/1-00000022 Internal Gosub(crm-hangup,s,1) start
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:1] NoOp(“PJSIP/1-00000022”, “Sending Hangup to CRM”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:2] NoOp(“PJSIP/1-00000022”, “HANGUP CAUSE: 17”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:3] ExecIf(“PJSIP/1-00000022”, “0?Set(__CRM_VOICEMAIL=)”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:4] NoOp(“PJSIP/1-00000022”, “MASTER CHANNEL: 1657488267.34 = 1657488267.32”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:5] GotoIf(“PJSIP/1-00000022”, “1?return”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx_builtins.c: Goto (crm-hangup,s,8)
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:8] Return(“PJSIP/1-00000022”, “”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] app_stack.c: Spawn extension (from-internal, 1, 1) exited non-zero on ‘PJSIP/1-00000022’
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] app_stack.c: PJSIP/1-00000022 Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] app_dial.c: Everyone is busy/congested at this time (1:1/0/0)
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:30] Set(“PJSIP/anonymous-00000020”, “DIALSTATUS=BUSY”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:31] GosubIf(“PJSIP/anonymous-00000020”, “0?BUSY,1()”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:32] NoOp(“PJSIP/anonymous-00000020”, “Returning since nobody answered”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:33] MacroExit(“PJSIP/anonymous-00000020”, “”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:40] Goto(“PJSIP/anonymous-00000020”, “nextstep”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx_builtins.c: Goto (followme-sub,1,47)
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:47] Set(“PJSIP/anonymous-00000020”, “RingGroupMethod=”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:48] GotoIf(“PJSIP/anonymous-00000020”, “0?nodest”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:49] Set(“PJSIP/anonymous-00000020”, “__NODEST=”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:50] Set(“PJSIP/anonymous-00000020”, “__PICKUPMARK=”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:51] Macro(“PJSIP/anonymous-00000020”, “blkvm-clr,”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:1] Set(“PJSIP/anonymous-00000020”, “SHARED(BLKVM,PJSIP/anonymous-00000020)=”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:2] Set(“PJSIP/anonymous-00000020”, “GOSUB_RETVAL=”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:3] MacroExit(“PJSIP/anonymous-00000020”, “”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:52] Set(“PJSIP/anonymous-00000020”, “DIALSTATUS=NOANSWER”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:53] GotoIf(“PJSIP/anonymous-00000020”, “0?dohangup”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:54] Goto(“PJSIP/anonymous-00000020”, “ext-local,1,dest”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx_builtins.c: Goto (ext-local,1,4)
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:4] Set(“PJSIP/anonymous-00000020”, “__PICKUPMARK=”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:5] GotoIf(“PJSIP/anonymous-00000020”, “0?,return,1”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Auto fallthrough, channel ‘PJSIP/anonymous-00000020’ status is ‘NOANSWER’
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:1] Macro(“PJSIP/anonymous-00000020”, “hangupcall,”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:1] GotoIf(“PJSIP/anonymous-00000020”, “1?theend”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx_builtins.c: Goto (macro-hangupcall,s,3)
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:3] ExecIf(“PJSIP/anonymous-00000020”, “0?Set(CDR(recordingfile)=)”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:4] Hangup(“PJSIP/anonymous-00000020”, “”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] app_macro.c: Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘PJSIP/anonymous-00000020’ in macro ‘hangupcall’
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Spawn extension (ext-local, h, 1) exited non-zero on ‘PJSIP/anonymous-00000020’
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] app_stack.c: PJSIP/anonymous-00000020 Internal Gosub(crm-hangup,s,1) start
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:1] NoOp(“PJSIP/anonymous-00000020”, “Sending Hangup to CRM”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:2] NoOp(“PJSIP/anonymous-00000020”, “HANGUP CAUSE: 17”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:3] ExecIf(“PJSIP/anonymous-00000020”, “0?Set(__CRM_VOICEMAIL=)”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:4] NoOp(“PJSIP/anonymous-00000020”, “MASTER CHANNEL: 1657488267.32 = 1657488267.32”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:5] GotoIf(“PJSIP/anonymous-00000020”, “0?return”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:6] Set(“PJSIP/anonymous-00000020”, “__CRM_HANGUP=1”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:7] AGI(“PJSIP/anonymous-00000020”, “agi://127.0.0.1/sangomacrm.agi”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] res_agi.c: <PJSIP/anonymous-00000020>AGI Script agi://127.0.0.1/sangomacrm.agi completed, returning 0
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] pbx.c: Executing [[email protected]:8] Return(“PJSIP/anonymous-00000020”, “”) in new stack
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] app_stack.c: Spawn extension (ext-local, h, 1) exited non-zero on ‘PJSIP/anonymous-00000020’
[2022-07-10 21:24:28] VERBOSE[13324][C-00000010] app_stack.c: PJSIP/anonymous-00000020 Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=

It appears that extension 1 returned a 486 (busy) or 600 (declined) status. Check that you don’t have ‘do not disturb’ or a similar setting turned on, or any filtering based on calling or called number. Also, it appears that this is an external extension behind a NAT router/firewall. Possibly, there is a SIP ALG in the path (especially if it’s a modem/router supplied by Sunrise) that is causing trouble.

If you can’t quickly find something obvious, at the Asterisk command prompt (not a shell prompt) type
pjsip set logger on
make a failing incoming call, paste the Asterisk log for the call (which will now include a SIP trace) at pastebin.freepbx.org and post the link here. If you are too new to post links, just post the last eight hex characters of the URL.

The do-not-disturb option is not enabled in the user panel (but I don’t know if it can be set in some admin menu). However, after some investigation I solved this problem by selecting the extension 1 in the droplist in => UCP => Miscellaneous => Allowed Extension Settings.

Now the call rings, however the calls still fails: when the softphone answers, the call is hung up immediately. Looking at the Asterisk log it seems that there is a problem of CODEC conversion, but I don’t know how to fix it. In fact the problem remains even after enabling all the possible CODECS in the Asterisk SIP settings.

“Unable to find a codec translation path: (ulaw) → (g723)”

Do I have to install some extra-codec?

Here is the number of the URL of the section of the Asterisk log: 8998239b


I take this chance to ask one question: why do I need to set both options “Allow Anonymous Inbound SIP Calls” and “Allow SIP Guests” in the Asterisk SIP settings, in order that the phone rings? The call I am doing is definitely not Anonymous as one can see in the log (I hid my phone number with “xxxxx” in the log). Why is it detected as anonymous?

For extension 1, set:
Disallowed Codecs: all
Allowed Codecs: ulaw&alaw
(You may adjust this later to include a compression codec, if you will be using the Android app over mobile data with weak coverage.)

In Asterisk SIP Settings → General tab, you can select the codecs that will be used for newly created extensions and trunks, if you don’t specify otherwise.

I’m not a DIDWW customer, so just guessing on the Anonymous issue: The trunk is sending ‘1’ (without the quotes) in the user field of the incoming INVITE URI. I assume that you either set Contact User for the trunk, or something on the DIDWW portal to 1, causing this value to be sent. And it also appears that the call was sent to an IP address that PJSIP didn’t recognize as belonging to DIDWW.

Set Match (Permit) for the trunk to the (comma separated) list of IP addresses from which DIDWW can send calls:

Then, either set up an Inbound Route with DID Number set to 1, or change settings so the incoming INVITE has the actual called number in the URI, then set an Inbound Route with that number.

I set the disallowed / allowed codecs in the extension as suggested, but the behavior is the same:

[2022-07-12 21:10:36] WARNING[5356] channel.c: Unable to find a codec translation path: (g723) → (ulaw)
[2022-07-12 21:10:36] WARNING[5356] channel.c: Unable to find a codec translation path: (ulaw) → (g723)

See Again wrong codec - FreePBX Pastebin

In the new log you will see that I have deleted the extension ‘1’ and created the ‘200’, just to allow an easier text search in the logfile.

I have the impression that I am doing something completely wrong as you suggested to indicate the list of allowed IP in the trunk. When doing so, in the trunk settings I noticed this message:

“WARNING: This trunk is not used by any routes! This trunk will not be able to be used for outbound calls until a route is setup that uses it. Click on Outbound Routes to setup routing.”

I am unsure how should I configure the trunk, if I just want to receive calls.

This is only a problem if you actually want to make outgoing calls.

Your problem is that the match/permit settings are wrong, so the call isn’t being matched against your trunk definition.

Sorry if asked other questions that have diverted the focus of this post. The goal of my post is to finalize a call successfully so I would like to pick up the thread of the interrupted analysis.

We had come to this point:

So I applied the following suggestion…

…but unfortunately it doesn’t solve the issue: the call rings but its is dropped when answering. Here is the new full log:
https://pastebin.freepbx.org/view/3e48633d


Note: I have made the hypothesis that the call is dropped because of this issue:

[2022-07-20 00:13:16] WARNING[5763] channel.c: Unable to find a codec translation path: (ulaw) -> (g723)
[2022-07-20 00:13:16] WARNING[5763] channel.c: Unable to find a codec translation path: (g723) -> (ulaw)

However this is just my assumption of a newbie. I focused on this message because it is marked as warning. Possibly the root cause is different, but in this case I hope that the full logfile that I have posted now will help to clarify it.

You are correct; your Asterisk is not set up to transcode G.723, which is one of the codecs DIDWW is offering, see line 1116. However, that would not normally be an issue, because Asterisk shouldn’t accept the offer. Line 1132 shows that Asterisk did not recognize the call came from the DIDWW trunk. Please double check that Match (Permit) for the trunk is correctly set. I think it should look like this:
46.19.209.14,46.19.210.14,46.19.212.14,46.19.213.14,46.19.214.14

If you are sure that this is correct, please post the contents of /etc/asterisk/pjsip.identify.conf

Next, on the Codecs tab for the trunk, confirm that only ulaw and alaw are checked.

Also, confirm that you have an Inbound route with DID number set to 1, with destination of your desired extension.

Then make a test call and if it fails, paste a new log.

Here is how I set the match permit of the trunk:

After setting the match-permit field of the trunk (and applying the configuration), I checked the pjsip.identify.conf and I found that it only includes the pjsip.identify_custom.conf, which on its turn is empty.

I did it and applied the configuration.

I did it. See

Now the call doesn’t even ring on the called phone and fails immediately after dialing. A recorded message is played at the caller phone, saying that the number is not active.

Here is the logfile: Bumber is not active - FreePBX Pastebin
I noticed this at row 146:
[2022-07-20 20:52:23] VERBOSE[19686][C-00000009] pbx.c: Executing [[email protected]:1] NoOp("PJSIP/anonymous-0000000c", "No DID or CID Match") in new stack

The PBX doesn’t find a match between the expected DID number and the received one.

The provider is not sending the DID in the INVITE. You can get around this for testing purposes by creating a generic ANY/ANY inbound route.

The point is that if I send the same invite to any SIP server / ITSP the call works fine, so I would like to fix it in my freepbx, not at the DID provider side.

Yes, I confirm that if I don’t set any DID in the inbound route the call rings, however as mentioned the call fails after answering because of the missing codec translation.
So my priority is to fix the codec translation issue and have the call working in a way or another. Then I will fix the other issues one by one.
Any other idea om how to fix the CODEC translation error?

You will need both a mutually agreed SDP connection and a forwarding of that agreed port from the outside to the inside for audio to be bidirectional

How can do that in the GUI of Freepbx?

You can choose a codec ore list id codecs for your trunk that is congruent with that of the VSP.

Routing past specifying your ‘external IP’ can for the most part only be done on the router.

Sorry, I missed that. That is very wrong, though I don’t know why. It should be automatically built when you configure the trunk, Submit and Apply Config. Try
fwconsole restart
and/or rebooting the whole server. If no luck, try deleting the trunk and setting it up again. If still no luck, I suspect that the software is somehow incorrectly built or corrupted. Was this installed from the Distro ISO? If not, explain how you built it. Or, you might try setting up a new instance, creating a trunk and seeing whether the settings propagate to pjsip.identify.conf. For this purpose, you don’t have to set up extensions or attempt any calls.

I did it and the conf file is still empty.

I downloaded the ISO image SNG7-PBX16-64bit-2204-1.iso from Download | FreePBX - Let Freedom Ring
When I installed it, the installer prompt asked do choose among some versions and I chose the Freepbx 16 with Asterix 18, which was presented as the newest LTS version.

What should I expect to find in the pjsip.identify_custom.conf?

Off topic: I am a beginner I was just traying to set up the most basic configuration as possible, just register a softphone and to receive one inbound call: one inbound route, one trunk, one extension and one user. I didn’t imagine it was so hard to do it. Does it exist a simple guide for dummies to do it?

All /etc/asterisk/*_custom.conf files are empty by default.

Instead of looking at conf files, query asterisk directly after the apply config. Use <tab> to autocomplete if you don’t know what you’re looking for:

uc-33435257*CLI> pjsip show identify fpbx-1-8CeeToemYCth

 Identify:  <Identify/Endpoint...........................................................>
      Match:  <criteria...........................>
==========================================================================================

 Identify:  fpbx-1-8CeeToemYCth/fpbx-1-8CeeToemYCth
      Match: 192.159.66.3/32


 ParameterName : ParameterValue
 ============================================
 endpoint      : fpbx-1-8CeeToemYCth
 match         : 192.159.66.3/255.255.255.255
 match_header  :
 srv_lookups   : true

I don’t know for which endpoint I can send the command “pjsip show identify”, so I sent the commands pjsip list endpoints and pjsip show endpoints. Here is the result.

freepbx*CLI> pjsip list endpoints

 Endpoint:  <Endpoint/CID.....................................>  <State.....>  <Channels.>
==========================================================================================

 Endpoint:  1/1                                                  Ringing       3 of inf
 Endpoint:  99001/99001                                          Unavailable   0 of inf
 Endpoint:  991/991                                              Unavailable   0 of inf
 Endpoint:  albertotrunk                                         Unavailable   0 of inf
 Endpoint:  anonymous                                            In use        3 of inf

Objects found: 5

freepbx*CLI> pjsip show endpoints

 Endpoint:  <Endpoint/CID.....................................>  <State.....>  <Channels.>
    I/OAuth:  <AuthId/UserName...........................................................>
        Aor:  <Aor............................................>  <MaxContact>
      Contact:  <Aor/ContactUri..........................> <Hash....> <Status> <RTT(ms)..>
  Transport:  <TransportId........>  <Type>  <cos>  <tos>  <BindAddress..................>
   Identify:  <Identify/Endpoint.........................................................>
        Match:  <criteria.........................>
    Channel:  <ChannelId......................................>  <State.....>  <Time.....>
        Exten: <DialedExten...........>  CLCID: <ConnectedLineCID.......>
==========================================================================================

 Endpoint:  1/1                                                  Unavailable   0 of inf
     InAuth:  1-auth/1
        Aor:  1                                                  1

 Endpoint:  99001/99001                                          Unavailable   0 of inf
     InAuth:  99001-auth/99001
        Aor:  99001                                              1

 Endpoint:  991/991                                              Unavailable   0 of inf
     InAuth:  991-auth/991
        Aor:  991                                                1

 Endpoint:  albertotrunk                                         Unavailable   0 of inf
    OutAuth:  albertotrunk/albertotrunk
        Aor:  albertotrunk                                       1
  Transport:  0.0.0.0-tls               tls      3     96  0.0.0.0:5061

 Endpoint:  anonymous                                            Unavailable   1 of inf
    Channel: PJSIP/anonymous-00002389/AGI                        Ring          00:00:00
        Exten: s                         CLCID: "" <>

What looks strange is that the trunk I have created “albertotrunk” is unavailable

Update: I asked to the support team of DIDWW (the provider of the DID number) to review my freepbx configuration and I applied their recommendations in trunk settings and in Asterisk settings. About the CODEC translation error they suggested to block the G723 codec in the trunk settings.

Unfortunately the codec translation error is still there. It always causes the call to be dropped as soon as the SIP phone answer.

See new log:
https://pastebin.freepbx.org/view/9812d544

In this log, I have created an extension has is equal to the DID number itself: 14073371999
The events related to the hangup of the call are in lines 575-626.

I have forbidden the G723 everywhere: in the trunk, in the Asterisk SIP settings and in the extension, but in spite of that freepbx continues trying to use this codec. This is really frustrating and I have run out of ideas. If some expert of freepbx is so kind as to check my settings, I will give the freepbx admin credentials in a private message. If you find the solution I will post it here for the benefit of everybody.

You’ve accepted G.723, and as first choice, on the incoming side. I don’t think you have disabled it on that side. Asterisk does not feed back B side restrictions to the A side. One of the pjsip show subcommands, on the CLI, ought to show the configured codecs, and you might get details if you turn up the debugging level,