No Outgoing calls - in advanced trunk settings fill "From user" and "From domain" fields

Hello guys.
I’m deploying Freepbx system. I do not have any issues with incoming calls. I have an issue with outgoing calls. As I understood from logfiles, My extension is unauthorized: SIP/2.0 401 Unauthorized||

It does not matter if it’s a sipphone or Openstage 15 desk phone.
As a result of outgoing call I hear the voicemail "All circuits are busy now. Please try your call again later. In the logfile there is 503 Message:503 SIP/2.0 503 Service Unavailable

Can you give me a hint where should I change the configuration. The freepbx version is 16.0.030.
I attach a logging of a test call.
Thank you.

<— Received SIP request (987 bytes) from UDP:192.168.1.137:56399 —>
INVITE sip:[email protected];transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.1.137:56399;branch=z9hG4bK-524287-1—a6ba145148695fe4;rport
Max-Forwards: 70
Contact: sip:[email protected]:56399;transport=UDP
To: sip:[email protected]
From: sip:[email protected];transport=UDP;tag=7020441c
Call-ID: 98-RVGKc_Jo4ZjA47h6HhA…
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
Supported: replaces, norefersub, extended-refer, timer, outbound, path, X-cisco-serviceuri
User-Agent: Z 5.5.14 v2.10.18.6
Allow-Events: presence, kpml, talk
Content-Length: 331

v=0
o=Z 0 517978179 IN IP4 192.168.1.137
s=Z
c=IN IP4 192.168.1.137
t=0 0
m=audio 50939 RTP/AVP 106 9 98 101 0 8 3
a=rtpmap:106 opus/48000/2
a=fmtp:106 sprop-maxcapturerate=16000; minptime=20; useinbandfec=1
a=rtpmap:98 telephone-event/48000
a=fmtp:98 0-16
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=sendrecv

<— Transmitting SIP response (509 bytes) to UDP:192.168.1.137:56399 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.137:56399;rport=56399;received=192.168.1.137;branch=z9hG4bK-524287-1—a6ba145148695fe4
Call-ID: 98-RVGKc_Jo4ZjA47h6HhA…
From: sip:[email protected];tag=7020441c
To: sip:[email protected];tag=z9hG4bK-524287-1—a6ba145148695fe4
CSeq: 1 INVITE
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1675627132/dd7cfad8c3cc1bb9a2c96ecd327e79f9”,opaque=“64161cc26d4d63df”,algorithm=MD5,qop=“auth”
Server: FPBX-16.0.30(18.16.0)
Content-Length: 0

<— Received SIP request (359 bytes) from UDP:192.168.1.137:56399 —>
ACK sip:[email protected];transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.1.137:56399;branch=z9hG4bK-524287-1—a6ba145148695fe4;rport
Max-Forwards: 70
To: sip:[email protected];tag=z9hG4bK-524287-1—a6ba145148695fe4
From: sip:[email protected];transport=UDP;tag=7020441c
Call-ID: 98-RVGKc_Jo4ZjA47h6HhA…
CSeq: 1 ACK
Content-Length: 0

<— Received SIP request (1288 bytes) from UDP:192.168.1.137:56399 —>
INVITE sip:[email protected];transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.1.137:56399;branch=z9hG4bK-524287-1—9f966d29fde56d00;rport
Max-Forwards: 70
Contact: sip:[email protected]:56399;transport=UDP
To: sip:[email protected]
From: sip:[email protected];transport=UDP;tag=7020441c
Call-ID: 98-RVGKc_Jo4ZjA47h6HhA…
CSeq: 2 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
Supported: replaces, norefersub, extended-refer, timer, outbound, path, X-cisco-serviceuri
User-Agent: Z 5.5.14 v2.10.18.6
Authorization: Digest username=“201”,realm=“asterisk”,nonce=“1675627132/dd7cfad8c3cc1bb9a2c96ecd327e79f9”,uri="sip:[email protected];transport=UDP",response=“de861ddb5948c3049ba698ed59df1bb1”,cnonce=“c30071184b1490fddc1718bd9f29ed60”,nc=00000001,qop=auth,algorithm=MD5,opaque=“64161cc26d4d63df”
Allow-Events: presence, kpml, talk
Content-Length: 331

v=0
o=Z 0 517978179 IN IP4 192.168.1.137
s=Z
c=IN IP4 192.168.1.137
t=0 0
m=audio 50939 RTP/AVP 106 9 98 101 0 8 3
a=rtpmap:106 opus/48000/2
a=fmtp:106 sprop-maxcapturerate=16000; minptime=20; useinbandfec=1
a=rtpmap:98 telephone-event/48000
a=fmtp:98 0-16
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=sendrecv

<— Transmitting SIP response (317 bytes) to UDP:192.168.1.137:56399 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.137:56399;rport=56399;received=192.168.1.137;branch=z9hG4bK-524287-1—9f966d29fde56d00
Call-ID: 98-RVGKc_Jo4ZjA47h6HhA…
From: sip:[email protected];tag=7020441c
To: sip:[email protected]
CSeq: 2 INVITE
Server: FPBX-16.0.30(18.16.0)
Content-Length: 0

== 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 [507xxxxxx@from-internal:1] Macro(“PJSIP/201-000000c7”, “user-callerid,LIMIT,EXTERNAL,”) in new stack
– Executing [s@macro-user-callerid:1] Set(“PJSIP/201-000000c7”, “TOUCH_MONITOR=1675627132.429”) in new stack
– Executing [s@macro-user-callerid:2] Set(“PJSIP/201-000000c7”, “CHANCONTEXT=”) in new stack
– Executing [s@macro-user-callerid:3] Progress(“PJSIP/201-000000c7”, “”) in new stack
– Executing [s@macro-user-callerid:4] Set(“PJSIP/201-000000c7”, “CHANCONTEXT=”) in new stack
– Executing [s@macro-user-callerid:5] Set(“PJSIP/201-000000c7”, “CHANEXTENCONTEXT=201-000000c7”) in new stack
– Executing [s@macro-user-callerid:6] Set(“PJSIP/201-000000c7”, “CHANEXTEN=201-000000c7”) in new stack
– Executing [s@macro-user-callerid:7] Set(“PJSIP/201-000000c7”, “CALLERID(number)=201”) in new stack
– Executing [s@macro-user-callerid:8] Set(“PJSIP/201-000000c7”, “AMPUSER=201”) in new stack
– Executing [s@macro-user-callerid:9] Set(“PJSIP/201-000000c7”, “HOTDESCKCHAN=201-000000c7”) in new stack
– Executing [s@macro-user-callerid:10] Set(“PJSIP/201-000000c7”, “HOTDESKEXTEN=201”) in new stack
– Executing [s@macro-user-callerid:11] Set(“PJSIP/201-000000c7”, “HOTDESKCALL=0”) in new stack
– Executing [s@macro-user-callerid:12] ExecIf(“PJSIP/201-000000c7”, “0?Set(HOTDESKCALL=1)”) in new stack
– Executing [s@macro-user-callerid:13] ExecIf(“PJSIP/201-000000c7”, “0?Set(CALLERID(name)=)”) in new stack
– Executing [s@macro-user-callerid:14] GotoIf(“PJSIP/201-000000c7”, “0?report”) in new stack
– Executing [s@macro-user-callerid:15] ExecIf(“PJSIP/201-000000c7”, “1?Set(REALCALLERIDNUM=201)”) in new stack
– Executing [s@macro-user-callerid:16] Set(“PJSIP/201-000000c7”, “AMPUSER=201”) in new stack
– Executing [s@macro-user-callerid:17] GotoIf(“PJSIP/201-000000c7”, “0?limit”) in new stack
– Executing [s@macro-user-callerid:18] Set(“PJSIP/201-000000c7”, “AMPUSERCIDNAME=Gabi Gruszewska”) in new stack
– Executing [s@macro-user-callerid:19] ExecIf(“PJSIP/201-000000c7”, “0?Set(__CIDMASQUERADING=TRUE)”) in new stack
– Executing [s@macro-user-callerid:20] GotoIf(“PJSIP/201-000000c7”, “0?report”) in new stack
– Executing [s@macro-user-callerid:21] Set(“PJSIP/201-000000c7”, “AMPUSERCID=201”) in new stack
– Executing [s@macro-user-callerid:22] Set(“PJSIP/201-000000c7”, “__DIAL_OPTIONS=HhTtr”) in new stack
– Executing [s@macro-user-callerid:23] Set(“PJSIP/201-000000c7”, “CALLERID(all)=“Gabi Gruszewska” <201>”) in new stack
– Executing [s@macro-user-callerid:24] ExecIf(“PJSIP/201-000000c7”, “0?Set(CUSDIAL=)”) in new stack
> 0x7f230837a9c0 – Strict RTP learning after remote address set to: 192.168.1.137:50939
<— Transmitting SIP response (845 bytes) to UDP:192.168.1.137:56399 —>
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 192.168.1.137:56399;rport=56399;received=192.168.1.137;branch=z9hG4bK-524287-1—9f966d29fde56d00
Call-ID: 98-RVGKc_Jo4ZjA47h6HhA…
From: sip:[email protected];tag=7020441c
To: sip:[email protected];tag=3f3010e4-b48a-47a6-8e8d-86b5d646328f
CSeq: 2 INVITE
Server: FPBX-16.0.30(18.16.0)
Contact: sip:192.168.1.71:5060
Allow: OPTIONS, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, MESSAGE, REFER
Content-Type: application/sdp
Content-Length: 298

v=0
o=- 0 517978181 IN IP4 192.168.1.71
s=Asterisk
c=IN IP4 192.168.1.71
t=0 0
m=audio 12458 RTP/AVP 0 8 3 9 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

-- Executing [s@macro-user-callerid:25] ExecIf("PJSIP/201-000000c7", "0?Set(CALLERID(all)="Gabi Gruszewska" <201>)") in new stack
-- Executing [s@macro-user-callerid:26] GotoIf("PJSIP/201-000000c7", "0?limit") in new stack
-- Executing [s@macro-user-callerid:27] ExecIf("PJSIP/201-000000c7", "1?Set(GROUP(concurrency_limit)=201)") in new stack
-- Executing [s@macro-user-callerid:28] ExecIf("PJSIP/201-000000c7", "0?Set(CHANNEL(language)=)") in new stack
-- Executing [s@macro-user-callerid:29] NoOp("PJSIP/201-000000c7", "Macro Depth is 1") in new stack
-- Executing [s@macro-user-callerid:30] GotoIf("PJSIP/201-000000c7", "1?report2:macroerror") in new stack
-- Goto (macro-user-callerid,s,31)
-- Executing [s@macro-user-callerid:31] GotoIf("PJSIP/201-000000c7", "1?continue") in new stack
-- Goto (macro-user-callerid,s,50)
-- Executing [s@macro-user-callerid:50] Set("PJSIP/201-000000c7", "CALLERID(number)=201") in new stack
-- Executing [s@macro-user-callerid:51] Set("PJSIP/201-000000c7", "CALLERID(name)=Gabi Gruszewska") in new stack
-- Executing [s@macro-user-callerid:52] GotoIf("PJSIP/201-000000c7", "0?cnum") in new stack
-- Executing [s@macro-user-callerid:53] Set("PJSIP/201-000000c7", "CDR(cnam)=Gabi Gruszewska") in new stack
-- Executing [s@macro-user-callerid:54] Set("PJSIP/201-000000c7", "CDR(cnum)=201") in new stack
-- Executing [s@macro-user-callerid:55] Set("PJSIP/201-000000c7", "CHANNEL(language)=en") in new stack
-- Executing [507xxxxxx@from-internal:2] Gosub("PJSIP/201-000000c7", "sub-record-check,s,1(out,507xxxxxx,dontcare)") in new stack
-- Executing [s@sub-record-check:1] GotoIf("PJSIP/201-000000c7", "0?initialized") in new stack
-- Executing [s@sub-record-check:2] Set("PJSIP/201-000000c7", "__REC_STATUS=INITIALIZED") in new stack
-- Executing [s@sub-record-check:3] Set("PJSIP/201-000000c7", "NOW=1675627132") in new stack
-- Executing [s@sub-record-check:4] Set("PJSIP/201-000000c7", "__DAY=05") in new stack
-- Executing [s@sub-record-check:5] Set("PJSIP/201-000000c7", "__MONTH=02") in new stack
-- Executing [s@sub-record-check:6] Set("PJSIP/201-000000c7", "__YEAR=2023") in new stack
-- Executing [s@sub-record-check:7] Set("PJSIP/201-000000c7", "__TIMESTR=20230205-205852") in new stack
-- Executing [s@sub-record-check:8] Set("PJSIP/201-000000c7", "__FROMEXTEN=201") in new stack
-- Executing [s@sub-record-check:9] Set("PJSIP/201-000000c7", "__MON_FMT=wav") in new stack
-- Executing [s@sub-record-check:10] NoOp("PJSIP/201-000000c7", "Recordings initialized") in new stack
-- Executing [s@sub-record-check:11] ExecIf("PJSIP/201-000000c7", "0?Set(ARG3=dontcare)") in new stack
-- Executing [s@sub-record-check:12] Set("PJSIP/201-000000c7", "REC_POLICY_MODE_SAVE=") in new stack
-- Executing [s@sub-record-check:13] ExecIf("PJSIP/201-000000c7", "0?Set(REC_STATUS=NO)") in new stack
-- Executing [s@sub-record-check:14] GotoIf("PJSIP/201-000000c7", "3?checkaction") in new stack
-- Goto (sub-record-check,s,17)
-- Executing [s@sub-record-check:17] GotoIf("PJSIP/201-000000c7", "1?sub-record-check,out,1") in new stack
-- Goto (sub-record-check,out,1)
-- Executing [out@sub-record-check:1] NoOp("PJSIP/201-000000c7", "Outbound Recording Check from 201 to 507xxxxxx") in new stack
-- Executing [out@sub-record-check:2] Set("PJSIP/201-000000c7", "RECMODE=dontcare") in new stack
-- Executing [out@sub-record-check:3] ExecIf("PJSIP/201-000000c7", "1?Goto(routewins)") in new stack
-- Goto (sub-record-check,out,7)
-- Executing [out@sub-record-check:7] Gosub("PJSIP/201-000000c7", "recordcheck,1(dontcare,out,507xxxxxx)") in new stack
-- Executing [recordcheck@sub-record-check:1] NoOp("PJSIP/201-000000c7", "Starting recording check against dontcare") in new stack
-- Executing [recordcheck@sub-record-check:2] Goto("PJSIP/201-000000c7", "dontcare") in new stack
-- Goto (sub-record-check,recordcheck,3)
-- Executing [recordcheck@sub-record-check:3] Return("PJSIP/201-000000c7", "") in new stack
-- Executing [out@sub-record-check:8] Return("PJSIP/201-000000c7", "") in new stack
-- Executing [507xxxxxx@from-internal:3] ExecIf("PJSIP/201-000000c7", "0 ?Set(CDR(accountcode)=)") in new stack
-- Executing [507xxxxxx@from-internal:4] Set("PJSIP/201-000000c7", "_ROUTEID=3") in new stack
-- Executing [507xxxxxx@from-internal:5] Set("PJSIP/201-000000c7", "_ROUTENAME=fcn_out") in new stack
-- Executing [507xxxxxx@from-internal:6] Set("PJSIP/201-000000c7", "MOHCLASS=default") in new stack
-- Executing [507xxxxxx@from-internal:7] ExecIf("PJSIP/201-000000c7", "1?Set(TRUNKCIDOVERRIDE=585xxxxxx)") in new stack
-- Executing [507xxxxxx@from-internal:8] Set("PJSIP/201-000000c7", "_CALLERIDNAMEINTERNAL=Gabi Gruszewska") in new stack
-- Executing [507xxxxxx@from-internal:9] Set("PJSIP/201-000000c7", "_CALLERIDNUMINTERNAL=201") in new stack
-- Executing [507xxxxxx@from-internal:10] Set("PJSIP/201-000000c7", "_EMAILNOTIFICATION=FALSE") in new stack
-- Executing [507xxxxxx@from-internal:11] Set("PJSIP/201-000000c7", "_NODEST=") in new stack
-- Executing [507xxxxxx@from-internal:12] Macro("PJSIP/201-000000c7", "dialout-trunk,1,507xxxxxx,,off") in new stack
-- Executing [s@macro-dialout-trunk:1] Set("PJSIP/201-000000c7", "DIAL_TRUNK=1") in new stack
-- Executing [s@macro-dialout-trunk:2] ExecIf("PJSIP/201-000000c7", "0?Set(DIAL_OPTIONS=Hhtr)") in new stack
-- Executing [s@macro-dialout-trunk:3] GosubIf("PJSIP/201-000000c7", "0?sub-pincheck,s,1()") in new stack
-- Executing [s@macro-dialout-trunk:4] ExecIf("PJSIP/201-000000c7", "0?Set(CALLERID(num)=201)") in new stack
-- Executing [s@macro-dialout-trunk:5] GotoIf("PJSIP/201-000000c7", "0?disabletrunk,1") in new stack
-- Executing [s@macro-dialout-trunk:6] Set("PJSIP/201-000000c7", "DIAL_NUMBER=507xxxxxx") in new stack
-- Executing [s@macro-dialout-trunk:7] Set("PJSIP/201-000000c7", "DIAL_TRUNK_OPTIONS=HhTtr") in new stack
-- Executing [s@macro-dialout-trunk:8] Set("PJSIP/201-000000c7", "OUTBOUND_GROUP=OUT_1") in new stack
-- Executing [s@macro-dialout-trunk:9] Set("PJSIP/201-000000c7", "DIAL_TRUNK_OPTIONS=T") in new stack
-- Executing [s@macro-dialout-trunk:10] GotoIf("PJSIP/201-000000c7", "0?nomax") in new stack
-- Executing [s@macro-dialout-trunk:11] GotoIf("PJSIP/201-000000c7", "0?chanfull") in new stack
-- Executing [s@macro-dialout-trunk:12] GotoIf("PJSIP/201-000000c7", "0?skipoutcid") in new stack
-- Executing [s@macro-dialout-trunk:13] Macro("PJSIP/201-000000c7", "outbound-callerid,1") in new stack
-- Executing [s@macro-outbound-callerid:1] NoOp("PJSIP/201-000000c7", "201") in new stack
-- Executing [s@macro-outbound-callerid:2] NoOp("PJSIP/201-000000c7", "") in new stack
-- Executing [s@macro-outbound-callerid:3] NoOp("PJSIP/201-000000c7", "off") in new stack
-- Executing [s@macro-outbound-callerid:4] ExecIf("PJSIP/201-000000c7", "0?Set(CALLERID(name-pres)=)") in new stack
-- Executing [s@macro-outbound-callerid:5] ExecIf("PJSIP/201-000000c7", "0?Set(CALLERID(num-pres)=)") in new stack
-- Executing [s@macro-outbound-callerid:6] Set("PJSIP/201-000000c7", "HOTDESCKCHAN=201-000000c7") in new stack
-- Executing [s@macro-outbound-callerid:7] Set("PJSIP/201-000000c7", "HOTDESKEXTEN=201") in new stack
-- Executing [s@macro-outbound-callerid:8] Set("PJSIP/201-000000c7", "HOTDESKCALL=0") in new stack
-- Executing [s@macro-outbound-callerid:9] ExecIf("PJSIP/201-000000c7", "0?Set(HOTDESKCALL=1)") in new stack
-- Executing [s@macro-outbound-callerid:10] ExecIf("PJSIP/201-000000c7", "0?Set(CALLERID(name)=)") in new stack
-- Executing [s@macro-outbound-callerid:11] Set("PJSIP/201-000000c7", "ALLOWTHISROUTE=NO") in new stack
-- Executing [s@macro-outbound-callerid:12] ExecIf("PJSIP/201-000000c7", "0?Set(ALLOWTHISROUTE=YES)") in new stack
-- Executing [s@macro-outbound-callerid:13] ExecIf("PJSIP/201-000000c7", "0?Hangup()") in new stack
-- Executing [s@macro-outbound-callerid:14] ExecIf("PJSIP/201-000000c7", "0?Set(REALCALLERIDNUM=201)") in new stack
-- Executing [s@macro-outbound-callerid:15] ExecIf("PJSIP/201-000000c7", "0?Set(AMPUSER=201)") in new stack
-- Executing [s@macro-outbound-callerid:16] GotoIf("PJSIP/201-000000c7", "1?normcid") in new stack
-- Goto (macro-outbound-callerid,s,20)
-- Executing [s@macro-outbound-callerid:20] Set("PJSIP/201-000000c7", "USEROUTCID=") in new stack
-- Executing [s@macro-outbound-callerid:21] Set("PJSIP/201-000000c7", "EMERGENCYCID=") in new stack
-- Executing [s@macro-outbound-callerid:22] ExecIf("PJSIP/201-000000c7", "0?Set(SCDEXT=YES)") in new stack
-- Executing [s@macro-outbound-callerid:23] ExecIf("PJSIP/201-000000c7", "0?Set(EMERGENCYCID=)") in new stack
-- Executing [s@macro-outbound-callerid:24] ExecIf("PJSIP/201-000000c7", "0?Set(CALLERID(name)=)") in new stack
-- Executing [s@macro-outbound-callerid:25] ExecIf("PJSIP/201-000000c7", "0?Set(EMERGENCYCID=)") in new stack
-- Executing [s@macro-outbound-callerid:26] Set("PJSIP/201-000000c7", "TRUNKOUTCID=+48585xxxxxx") in new stack
-- Executing [s@macro-outbound-callerid:27] GotoIf("PJSIP/201-000000c7", "1?trunkcid") in new stack
-- Goto (macro-outbound-callerid,s,33)
-- Executing [s@macro-outbound-callerid:33] ExecIf("PJSIP/201-000000c7", "1?Set(CALLERID(all)=+48585xxxxxx)") in new stack
-- Executing [s@macro-outbound-callerid:34] ExecIf("PJSIP/201-000000c7", "0?Set(CALLERID(all)=)") in new stack
-- Executing [s@macro-outbound-callerid:35] ExecIf("PJSIP/201-000000c7", "1?Set(CALLERID(all)=585xxxxxx)") in new stack
-- Executing [s@macro-outbound-callerid:36] ExecIf("PJSIP/201-000000c7", "0?Set(CALLERID(all)=201)") in new stack
-- Executing [s@macro-outbound-callerid:37] ExecIf("PJSIP/201-000000c7", "0?Set(CALLERID(all)=201)") in new stack
-- Executing [s@macro-outbound-callerid:38] Set("PJSIP/201-000000c7", "TIOHIDE=no") in new stack
-- Executing [s@macro-outbound-callerid:39] ExecIf("PJSIP/201-000000c7", "0?Set(CALLERID(name-pres)=prohib_passed_screen)") in new stack
-- Executing [s@macro-outbound-callerid:40] ExecIf("PJSIP/201-000000c7", "0?Set(CALLERID(num-pres)=prohib_passed_screen)") in new stack
-- Executing [s@macro-outbound-callerid:41] ExecIf("PJSIP/201-000000c7", "0?Set(CALLERID(name-pres)=prohib_passed_screen)") in new stack
-- Executing [s@macro-outbound-callerid:42] ExecIf("PJSIP/201-000000c7", "0?Set(CALLERID(num-pres)=prohib_passed_screen)") in new stack
-- Executing [s@macro-outbound-callerid:43] Set("PJSIP/201-000000c7", "CDR(outbound_cnum)=585xxxxxx") in new stack
-- Executing [s@macro-outbound-callerid:44] Set("PJSIP/201-000000c7", "CDR(outbound_cnam)=") in new stack
-- Executing [s@macro-dialout-trunk:14] GosubIf("PJSIP/201-000000c7", "0?sub-flp-1,s,1()") in new stack
-- Executing [s@macro-dialout-trunk:15] Set("PJSIP/201-000000c7", "OUTNUM=507xxxxxx") in new stack
-- Executing [s@macro-dialout-trunk:16] Set("PJSIP/201-000000c7", "custom=PJSIP") in new stack
-- Executing [s@macro-dialout-trunk:17] ExecIf("PJSIP/201-000000c7", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)") in new stack
-- Executing [s@macro-dialout-trunk:18] ExecIf("PJSIP/201-000000c7", "0?Set(DIAL_TRUNK_OPTIONS=TM(confirm))") in new stack
-- Executing [s@macro-dialout-trunk:19] GotoIf("PJSIP/201-000000c7", "1?gocall") in new stack
-- Goto (macro-dialout-trunk,s,21)
-- Executing [s@macro-dialout-trunk:21] Macro("PJSIP/201-000000c7", "dialout-trunk-predial-hook,") in new stack
-- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("PJSIP/201-000000c7", "") in new stack
-- Executing [s@macro-dialout-trunk:22] GotoIf("PJSIP/201-000000c7", "0?skipcrm") in new stack
-- Executing [s@macro-dialout-trunk:23] Set("PJSIP/201-000000c7", "__CRM_DIRECTION=OUTBOUND") in new stack
-- Executing [s@macro-dialout-trunk:24] Set("PJSIP/201-000000c7", "__CRM_DESTINATION=507xxxxxx") in new stack
-- Executing [s@macro-dialout-trunk:25] Set("PJSIP/201-000000c7", "__CRM_SOURCE=201") in new stack
-- Executing [s@macro-dialout-trunk:26] AGI("PJSIP/201-000000c7", "agi://127.0.0.1/sangomacrm.agi") in new stack
   > 0x7f230837a9c0 -- Strict RTP switching to RTP target address 192.168.1.137:50939 as source
-- <PJSIP/201-000000c7>AGI Script agi://127.0.0.1/sangomacrm.agi completed, returning 0
-- Executing [s@macro-dialout-trunk:27] Set("PJSIP/201-000000c7", "CHANNEL(hangup_handler_push)=crm-hangup,s,1") in new stack
-- Executing [s@macro-dialout-trunk:28] NoOp("PJSIP/201-000000c7", "CRM Finished") in new stack
-- Executing [s@macro-dialout-trunk:29] GotoIf("PJSIP/201-000000c7", "0?bypass,1") in new stack
-- Executing [s@macro-dialout-trunk:30] ExecIf("PJSIP/201-000000c7", "1?Set(CONNECTEDLINE(num,i)=507xxxxxx)") in new stack
-- Executing [s@macro-dialout-trunk:31] ExecIf("PJSIP/201-000000c7", "1?Set(CONNECTEDLINE(name,i)=CID:585xxxxxx)") in new stack
-- Executing [s@macro-dialout-trunk:32] ExecIf("PJSIP/201-000000c7", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)585xxxxxx)") in new stack
-- Executing [s@macro-dialout-trunk:33] GotoIf("PJSIP/201-000000c7", "0?customtrunk") in new stack
-- Executing [s@macro-dialout-trunk:34] ExecIf("PJSIP/201-000000c7", "0?Set(DIAL_TRUNK_OPTIONS=)") in new stack
-- Executing [s@macro-dialout-trunk:35] Set("PJSIP/201-000000c7", "HASH(__SIPHEADERS,Alert-Info)=unset") in new stack
-- Executing [s@macro-dialout-trunk:36] Dial("PJSIP/201-000000c7", "PJSIP/507xxxxxx@fcn,300,Tb(func-apply-sipheaders^s^1,(1))U(sub-send-obroute-email^507xxxxxx^507xxxxxx^1^1675627132^^585xxxxxx)") in new stack
-- PJSIP/fcn-000000c8 Internal Gosub(func-apply-sipheaders,s,1(1)) start
-- Executing [s@func-apply-sipheaders:1] ExecIf("PJSIP/fcn-000000c8", "0?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)") in new stack
-- Executing [s@func-apply-sipheaders:2] NoOp("PJSIP/fcn-000000c8", "Applying SIP Headers to channel PJSIP/fcn-000000c8") in new stack
-- Executing [s@func-apply-sipheaders:3] Set("PJSIP/fcn-000000c8", "TECH=PJSIP") in new stack
-- Executing [s@func-apply-sipheaders:4] Set("PJSIP/fcn-000000c8", "SIPHEADERKEYS=Alert-Info") in new stack
-- Executing [s@func-apply-sipheaders:5] While("PJSIP/fcn-000000c8", "1") in new stack
-- Executing [s@func-apply-sipheaders:6] Set("PJSIP/fcn-000000c8", "sipheader=unset") in new stack
-- Executing [s@func-apply-sipheaders:7] ExecIf("PJSIP/fcn-000000c8", "1?Set(PJSIP_HEADER(remove,Alert-Info)=)") in new stack

[2023-02-05 20:58:52] ERROR[18551]: res_pjsip_header_funcs.c:717 remove_header: No headers had been previously added to this session.
– Executing [s@func-apply-sipheaders:8] ExecIf(“PJSIP/fcn-000000c8”, “0?Set(sipheader=http://127.0.0.1;info=unset)”) in new stack
– Executing [s@func-apply-sipheaders:9] ExecIf(“PJSIP/fcn-000000c8”, “0?Set(sipheader=http://127.0.0.1unset)”) in new stack
– Executing [s@func-apply-sipheaders:10] ExecIf(“PJSIP/fcn-000000c8”, “0?Set(PJSIP_HEADER(add,Alert-Info)=unset)”) in new stack
– Executing [s@func-apply-sipheaders:11] EndWhile(“PJSIP/fcn-000000c8”, “”) in new stack
– Executing [s@func-apply-sipheaders:5] While(“PJSIP/fcn-000000c8”, “0”) in new stack
– Executing [s@func-apply-sipheaders:12] Return(“PJSIP/fcn-000000c8”, “”) in new stack
== Spawn extension (func-apply-sipheaders, s, 12) exited non-zero on ‘PJSIP/fcn-000000c8’
– PJSIP/fcn-000000c8 Internal Gosub(func-apply-sipheaders,s,1(1)) complete GOSUB_RETVAL=
– Called PJSIP/507xxxxxx@fcn
<— Transmitting SIP request (976 bytes) to UDP:213.218.116.66:5060 —>
INVITE sip:sip.freeconet.pl SIP/2.0
Via: SIP/2.0/UDP 192.168.1.71:5060;rport;branch=z9hG4bKPj9766ccbc-8b48-4a2e-88c2-23c12a1fd153
From: sip:[email protected];tag=6c39c89e-8b83-4e58-b2cc-3ed055412416
To: sip:[email protected]
Contact: sip:[email protected]:5060
Call-ID: 18d245e9-a62e-4825-8a61-76aeda1613ec
CSeq: 19527 INVITE
Allow: OPTIONS, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Route: sip:[email protected]:5060
Max-Forwards: 70
User-Agent: FPBX-16.0.30(18.16.0)
Content-Type: application/sdp
Content-Length: 260

v=0
o=- 1755944627 1755944627 IN IP4 192.168.1.71
s=Asterisk
c=IN IP4 192.168.1.71
t=0 0
m=audio 18144 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:230
a=sendrecv

<— Received SIP response (395 bytes) from UDP:213.218.116.66:5060 —>
SIP/2.0 403 Forbidden
Via: SIP/2.0/UDP 192.168.1.71:5060;rport=46916;branch=z9hG4bKPj9766ccbc-8b48-4a2e-88c2-23c12a1fd153
From: sip:[email protected];tag=6c39c89e-8b83-4e58-b2cc-3ed055412416
To: sip:[email protected];tag=021dcb287e58103b8769536f43974d88.f196
Call-ID: 18d245e9-a62e-4825-8a61-76aeda1613ec
CSeq: 19527 INVITE
Server: Carrier-eX v.0.9
Content-Length: 0

<— Transmitting SIP request (471 bytes) to UDP:213.218.116.66:5060 —>
ACK sip:sip.freeconet.pl SIP/2.0
Via: SIP/2.0/UDP 192.168.1.71:5060;rport;branch=z9hG4bKPj9766ccbc-8b48-4a2e-88c2-23c12a1fd153
From: sip:[email protected];tag=6c39c89e-8b83-4e58-b2cc-3ed055412416
To: sip:[email protected];tag=021dcb287e58103b8769536f43974d88.f196
Call-ID: 18d245e9-a62e-4825-8a61-76aeda1613ec
CSeq: 19527 ACK
Route: sip:[email protected]:5060
Max-Forwards: 70
User-Agent: FPBX-16.0.30(18.16.0)
Content-Length: 0

== Everyone is busy/congested at this time (1:0/0/1)
– Executing [s@macro-dialout-trunk:37] NoOp(“PJSIP/201-000000c7”, “Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 21”) in new stack
– Executing [s@macro-dialout-trunk:38] GotoIf(“PJSIP/201-000000c7”, “0?continue,1:s-CHANUNAVAIL,1”) in new stack
– Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
– Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] Set(“PJSIP/201-000000c7”, “RC=21”) in new stack
– Executing [s-CHANUNAVAIL@macro-dialout-trunk:2] Goto(“PJSIP/201-000000c7”, “21,1”) in new stack
– Goto (macro-dialout-trunk,21,1)
– Executing [21@macro-dialout-trunk:1] Goto(“PJSIP/201-000000c7”, “continue,1”) in new stack
– Goto (macro-dialout-trunk,continue,1)
– Executing [continue@macro-dialout-trunk:1] NoOp(“PJSIP/201-000000c7”, “TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 21 - failing through to other trunks”) in new stack
– Executing [continue@macro-dialout-trunk:2] ExecIf(“PJSIP/201-000000c7”, “1?Set(CALLERID(number)=201)”) in new stack
– Executing [507xxxxxx@from-internal:13] Macro(“PJSIP/201-000000c7”, “outisbusy,”) in new stack
– Executing [s@macro-outisbusy:1] Progress(“PJSIP/201-000000c7”, “”) in new stack
– Executing [s@macro-outisbusy:2] GotoIf(“PJSIP/201-000000c7”, “0?emergency,1”) in new stack
– Executing [s@macro-outisbusy:3] GotoIf(“PJSIP/201-000000c7”, “0?intracompany,1”) in new stack
– Executing [s@macro-outisbusy:4] Playback(“PJSIP/201-000000c7”, “all-circuits-busy-now&please-try-call-later, noanswer”) in new stack
<— Transmitting SIP response (912 bytes) to UDP:192.168.1.137:56399 —>
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 192.168.1.137:56399;rport=56399;received=192.168.1.137;branch=z9hG4bK-524287-1—9f966d29fde56d00
Call-ID: 98-RVGKc_Jo4ZjA47h6HhA…
From: sip:[email protected];tag=7020441c
To: sip:[email protected];tag=3f3010e4-b48a-47a6-8e8d-86b5d646328f
CSeq: 2 INVITE
Server: FPBX-16.0.30(18.16.0)
Allow: OPTIONS, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, MESSAGE, REFER
Contact: sip:192.168.1.71:5060
P-Asserted-Identity: “CID:585xxxxxx” sip:[email protected]
Content-Type: application/sdp
Content-Length: 298

v=0
o=- 0 517978181 IN IP4 192.168.1.71
s=Asterisk
c=IN IP4 192.168.1.71
t=0 0
m=audio 12458 RTP/AVP 0 8 3 9 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

-- <PJSIP/201-000000c7> Playing 'all-circuits-busy-now.ulaw' (language 'en')
-- <PJSIP/201-000000c7> Playing 'please-try-call-later.ulaw' (language 'en')

The unauthorised is not an error, and is not relevant to your problem.

Your problem is that your ITSP is unwilling to talk to you. They haven’t even challenged you for authentication, they have simply replied forbidden, so the lowest level visible error is 403.

You will need to ask them why. It could be a malformed From user.

Although I think it would be a little unusual to reject because of that, you should configure your external signalling and media addresses, in order to generate a compliant SIP request.

Specifying G.729 as the only codec may cause problems, as it is much more likely that, if they support one codec, they will support A-law. The only reason for using G.729 with a provider is that network bandwidth reduction is much higher priority than speech quality. Nowadays most people are trying to request better speech quality than A-law gives, i.e the trend is in the opposite direction. However, this would normally result in Not Acceptable Here, rather than Forbidden.

Your phones are not using G.729, so you will need a licence for the codec, if you use it with the provider. That will give you problems after call setup. The phone is actually only offering a high audio bandwidth codec, which will be wasted on G.729.

(503 is a catch all error; it is one that is used when there is no more specific code. As such, it is of very little diagnostic value on its own.)

Thank you for quick reply.
I’ve changed the list of available codecs in freepbx gui
image

In my deskphone the Sip provider prefered codec (g729a) is also checked as available
image

I’m still waiting for the response from Sip Provider.
Hope to solve the issue. :slight_smile:

Unless you have G.729 transcoder licences, you really don’t want that enabled at either side.

Even with pass through (both side forced to G.729), without licences, a lot of things in FreePBX, e.g. call recording, will break.

Used over RTP, the RTP overheads mean you don’t get a very large bandwidth saving with G.729, and it is always at the cost of voice quality. Generally what you want to the provider, is the G.711 variant used in national phone network, which is A-law for most of the world, except the US and Japan.

G.729 may have some advantages if you use IAX trunking and you are operating a low wage country call centre, but outside of that environment the general attitude is that internet bandwidh is so cheap that G.711 is the minimum acceptable standard.

The call is being rejected by freeconet because there is no number in the SIP URI.

I suspect that you may have set an Outbound Proxy incorrectly, as it seems to be the same as SIP Server. Try removing it (leave the Outbound Proxy field blank). If that doesn’t help, try setting Outbound Proxy to
sip:sip.freeconet.pl\;lr\;hide
Note use of \ and ; characters.

Also, as @david55 said, confirm that the trunk has alaw and ulaw as the top (or only) codecs.

If you still have trouble, post a screenshot of the fcn trunk settings, as well as a new SIP trace for the outbound attempt.

There are two common areas of confusion here. Firstly people seem to feel they have enter something into the proxy field every time, when, in most cases they shouldn’t enter anything, and secondly that chan_pjsip requires the proxy to be entered as it would be received in a Record-Route header, not just the identity of the proxy. The phone number is being sent, in the Route header, because the lr (loose routing) parameter wasn’t included, which means that Asterisk follows the old rules for source routed requests, and puts the proxy address in the INVITE and the final destination in a Route header.

I suspect documentation could be improved in both these areas.

Thank You for your voice.
I’ve changed the outbound proxy. to ;lr;hide. → doesn’t make change.
I got a reply from my sip provider, that they do not see my attempts to make an outgoing call.
They suggested, that I should make a change in from From field: sip:[email protected];transport=UDP;

Where 200 (in voip provider oppinion) should be a voip user account (voipuser).
200 is my extension numer.
192.168.1.71 - IP of freepbx server
192.168.1.72 - IP of extension no 200 sip phone.

My INVITE section of outgoing call:

INVITE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.71:5060;rport;branch=z9hG4bKPj840a8457-a3bb-4324-842d-fb0e7bc264ea
From: <sip:[email protected]>;tag=177cb58d-a5a8-4877-907c-f3e50c2a18a1
To: <sip:[email protected]>
Contact: <sip:[email protected]:5060>
Call-ID: cb3dfc0a-f0fe-42f9-a2c7-bda080243177
CSeq: 25500 INVITE
Allow: OPTIONS, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: FPBX-16.0.30(18.16.0)
Content-Type: application/sdp
Content-Length:   374

Freeconet provider suggestion is

I made a change in codecs. Only alaw is enabled in the trunk settings.

Should I make a change in trunk / extensions settings.

I attach a log file of the current call with codecs changed.

<--- Received SIP request (955 bytes) from UDP:192.168.1.72:5060 --->
INVITE sip:[email protected]:5060;transport=udp SIP/2.0
Via: SIP/2.0/UDP 192.168.1.72;branch=z9hG4bK4dd2f2021fd85cdf8
Max-Forwards: 70
From: <sip:[email protected]:5060>;tag=93280a0ea9;epid=SC639301
To: <sip:[email protected]:5060>
Call-ID: 9a007b7e74603266
CSeq: 1566422784 INVITE
Allow: INVITE, ACK, CANCEL, BYE, REFER, NOTIFY, UPDATE, INFO
Allow-Events: hold
Contact: <sip:[email protected]:5060;transport=udp>
Supported: replaces, 100rel
User-Agent: OpenStage_15_V3 R5.3.0       SIP  170316
X-Siemens-Call-Type: ST-insecure
Content-Type: application/sdp
Content-Length: 352

v=0
o=OpenStage-Line_0 38781823 2144014244 IN IP4 192.168.1.72
s=SIP Call
c=IN IP4 192.168.1.72
t=0 0
m=audio 5012 RTP/AVP 18 8 0 101
a=rtpmap:18 G729/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=silenceSupp:off - - - -
a=fmtp:18 annexb=no
a=fmtp:101 0-15
a=rtcp:5013 IN IP4 192.168.1.72
a=sendrecv

<--- Transmitting SIP response (495 bytes) to UDP:192.168.1.72:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.72;rport=5060;received=192.168.1.72;branch=z9hG4bK4dd2f2021fd85cdf8
Call-ID: 9a007b7e74603266
From: <sip:[email protected]>;tag=93280a0ea9;epid=SC639301
To: <sip:[email protected]>;tag=z9hG4bK4dd2f2021fd85cdf8
CSeq: 1566422784 INVITE
WWW-Authenticate: Digest realm="asterisk",nonce="1675675338/fde3e07155a6548b6fa8d0d8b1a30423",opaque="461aced96aab4b3f",algorithm=MD5,qop="auth"
Server: FPBX-16.0.30(18.16.0)
Content-Length:  0


<--- Received SIP request (391 bytes) from UDP:192.168.1.72:5060 --->
ACK sip:[email protected]:5060;transport=udp SIP/2.0
Via: SIP/2.0/UDP 192.168.1.72;branch=z9hG4bK4dd2f2021fd85cdf8
Max-Forwards: 70
From: <sip:[email protected]:5060>;tag=93280a0ea9;epid=SC639301
To: <sip:[email protected]>;tag=z9hG4bK4dd2f2021fd85cdf8
Call-ID: 9a007b7e74603266
CSeq: 1566422784 ACK
User-Agent: OpenStage_15_V3 R5.3.0       SIP  170316
Content-Length: 0


<--- Received SIP request (1237 bytes) from UDP:192.168.1.72:5060 --->
INVITE sip:[email protected]:5060;transport=udp SIP/2.0
Via: SIP/2.0/UDP 192.168.1.72;branch=z9hG4bKbbdcdd2afa736777b
Max-Forwards: 70
From: <sip:[email protected]:5060>;tag=93280a0ea9;epid=SC639301
To: <sip:[email protected]:5060>
Call-ID: 9a007b7e74603266
CSeq: 1566422785 INVITE
Allow: INVITE, ACK, CANCEL, BYE, REFER, NOTIFY, UPDATE, INFO
Allow-Events: hold
Authorization: Digest username="200",realm="asterisk",nonce="1675675338/fde3e07155a6548b6fa8d0d8b1a30423",uri="sip:[email protected]:5060;transport=udp",response="023f78990bb1d1e97cecc647aa6d93b4",algorithm=MD5,opaque="461aced96aab4b3f",qop=auth,cnonce="bf8a396c",nc=00000001
Contact: <sip:[email protected]:5060;transport=udp>
Supported: replaces, 100rel
User-Agent: OpenStage_15_V3 R5.3.0       SIP  170316
X-Siemens-Call-Type: ST-insecure
Content-Type: application/sdp
Content-Length: 352

v=0
o=OpenStage-Line_0 38781823 2144014244 IN IP4 192.168.1.72
s=SIP Call
c=IN IP4 192.168.1.72
t=0 0
m=audio 5012 RTP/AVP 18 8 0 101
a=rtpmap:18 G729/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=silenceSupp:off - - - -
a=fmtp:18 annexb=no
a=fmtp:101 0-15
a=rtcp:5013 IN IP4 192.168.1.72
a=sendrecv

<--- Transmitting SIP response (314 bytes) to UDP:192.168.1.72:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.72;rport=5060;received=192.168.1.72;branch=z9hG4bKbbdcdd2afa736777b
Call-ID: 9a007b7e74603266
From: <sip:[email protected]>;tag=93280a0ea9;epid=SC639301
To: <sip:[email protected]>
CSeq: 1566422785 INVITE
Server: FPBX-16.0.30(18.16.0)
Content-Length:  0


  == 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 [519XXXXXX@from-internal:1] Macro("PJSIP/200-0000014b", "user-callerid,LIMIT,EXTERNAL,") in new stack
    -- Executing [s@macro-user-callerid:1] Set("PJSIP/200-0000014b", "TOUCH_MONITOR=1675675338.577") in new stack
    -- Executing [s@macro-user-callerid:2] Set("PJSIP/200-0000014b", "CHANCONTEXT=") in new stack
    -- Executing [s@macro-user-callerid:3] Progress("PJSIP/200-0000014b", "") in new stack
    -- Executing [s@macro-user-callerid:4] Set("PJSIP/200-0000014b", "CHANCONTEXT=") in new stack
    -- Executing [s@macro-user-callerid:5] Set("PJSIP/200-0000014b", "CHANEXTENCONTEXT=200-0000014b") in new stack
    -- Executing [s@macro-user-callerid:6] Set("PJSIP/200-0000014b", "CHANEXTEN=200-0000014b") in new stack
    -- Executing [s@macro-user-callerid:7] Set("PJSIP/200-0000014b", "CALLERID(number)=200") in new stack
    -- Executing [s@macro-user-callerid:8] Set("PJSIP/200-0000014b", "AMPUSER=200") in new stack
    -- Executing [s@macro-user-callerid:9] Set("PJSIP/200-0000014b", "HOTDESCKCHAN=200-0000014b") in new stack
    -- Executing [s@macro-user-callerid:10] Set("PJSIP/200-0000014b", "HOTDESKEXTEN=200") in new stack
    -- Executing [s@macro-user-callerid:11] Set("PJSIP/200-0000014b", "HOTDESKCALL=0") in new stack
    -- Executing [s@macro-user-callerid:12] ExecIf("PJSIP/200-0000014b", "0?Set(HOTDESKCALL=1)") in new stack
    -- Executing [s@macro-user-callerid:13] ExecIf("PJSIP/200-0000014b", "0?Set(CALLERID(name)=)") in new stack
    -- Executing [s@macro-user-callerid:14] GotoIf("PJSIP/200-0000014b", "0?report") in new stack
    -- Executing [s@macro-user-callerid:15] ExecIf("PJSIP/200-0000014b", "1?Set(REALCALLERIDNUM=200)") in new stack
    -- Executing [s@macro-user-callerid:16] Set("PJSIP/200-0000014b", "AMPUSER=200") in new stack
    -- Executing [s@macro-user-callerid:17] GotoIf("PJSIP/200-0000014b", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:18] Set("PJSIP/200-0000014b", "AMPUSERCIDNAME=First Name Surname") in new stack
    -- Executing [s@macro-user-callerid:19] ExecIf("PJSIP/200-0000014b", "0?Set(__CIDMASQUERADING=TRUE)") in new stack
    -- Executing [s@macro-user-callerid:20] GotoIf("PJSIP/200-0000014b", "0?report") in new stack
    -- Executing [s@macro-user-callerid:21] Set("PJSIP/200-0000014b", "AMPUSERCID=200") in new stack
    -- Executing [s@macro-user-callerid:22] Set("PJSIP/200-0000014b", "__DIAL_OPTIONS=HhTtr") in new stack
    -- Executing [s@macro-user-callerid:23] Set("PJSIP/200-0000014b", "CALLERID(all)="First Name Surname" <200>") in new stack
    -- Executing [s@macro-user-callerid:24] ExecIf("PJSIP/200-0000014b", "0?Set(CUSDIAL=)") in new stack
    -- Executing [s@macro-user-callerid:25] ExecIf("PJSIP/200-0000014b", "0?Set(CALLERID(all)="First Name Surname" <200>)") in new stack
    -- Executing [s@macro-user-callerid:26] GotoIf("PJSIP/200-0000014b", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:27] ExecIf("PJSIP/200-0000014b", "1?Set(GROUP(concurrency_limit)=200)") in new stack
    -- Executing [s@macro-user-callerid:28] ExecIf("PJSIP/200-0000014b", "0?Set(CHANNEL(language)=)") in new stack
    -- Executing [s@macro-user-callerid:29] NoOp("PJSIP/200-0000014b", "Macro Depth is 1") in new stack
    -- Executing [s@macro-user-callerid:30] GotoIf("PJSIP/200-0000014b", "1?report2:macroerror") in new stack
    -- Goto (macro-user-callerid,s,31)
    -- Executing [s@macro-user-callerid:31] GotoIf("PJSIP/200-0000014b", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,50)
    -- Executing [s@macro-user-callerid:50] Set("PJSIP/200-0000014b", "CALLERID(number)=200") in new stack
    -- Executing [s@macro-user-callerid:51] Set("PJSIP/200-0000014b", "CALLERID(name)=First Name Surname") in new stack
    -- Executing [s@macro-user-callerid:52] GotoIf("PJSIP/200-0000014b", "0?cnum") in new stack
    -- Executing [s@macro-user-callerid:53] Set("PJSIP/200-0000014b", "CDR(cnam)=First Name Surname") in new stack
       > 0x7f2314071970 -- Strict RTP learning after remote address set to: 192.168.1.72:5012
<--- Transmitting SIP response (826 bytes) to UDP:192.168.1.72:5060 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 192.168.1.72;rport=5060;received=192.168.1.72;branch=z9hG4bKbbdcdd2afa736777b
Call-ID: 9a007b7e74603266
From: <sip:[email protected]>;tag=93280a0ea9;epid=SC639301
To: <sip:[email protected]>;tag=a303e724-e7dd-4029-9f02-3ddf926a65a8
CSeq: 1566422785 INVITE
Server: FPBX-16.0.30(18.16.0)
Contact: <sip:192.168.1.71:5060>
Allow: OPTIONS, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, MESSAGE, REFER
Content-Type: application/sdp
Content-Length:   282

v=0
o=- 38781823 2144014246 IN IP4 192.168.1.71
s=Asterisk
c=IN IP4 192.168.1.71
t=0 0
m=audio 16164 RTP/AVP 18 8 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

    -- Executing [s@macro-user-callerid:54] Set("PJSIP/200-0000014b", "CDR(cnum)=200") in new stack
    -- Executing [s@macro-user-callerid:55] Set("PJSIP/200-0000014b", "CHANNEL(language)=en") in new stack
    -- Executing [519XXXXXX@from-internal:2] Gosub("PJSIP/200-0000014b", "sub-record-check,s,1(out,519XXXXXX,dontcare)") in new stack
    -- Executing [s@sub-record-check:1] GotoIf("PJSIP/200-0000014b", "0?initialized") in new stack
    -- Executing [s@sub-record-check:2] Set("PJSIP/200-0000014b", "__REC_STATUS=INITIALIZED") in new stack
    -- Executing [s@sub-record-check:3] Set("PJSIP/200-0000014b", "NOW=1675675338") in new stack
    -- Executing [s@sub-record-check:4] Set("PJSIP/200-0000014b", "__DAY=06") in new stack
    -- Executing [s@sub-record-check:5] Set("PJSIP/200-0000014b", "__MONTH=02") in new stack
    -- Executing [s@sub-record-check:6] Set("PJSIP/200-0000014b", "__YEAR=2023") in new stack
    -- Executing [s@sub-record-check:7] Set("PJSIP/200-0000014b", "__TIMESTR=20230206-102218") in new stack
    -- Executing [s@sub-record-check:8] Set("PJSIP/200-0000014b", "__FROMEXTEN=200") in new stack
    -- Executing [s@sub-record-check:9] Set("PJSIP/200-0000014b", "__MON_FMT=wav") in new stack
    -- Executing [s@sub-record-check:10] NoOp("PJSIP/200-0000014b", "Recordings initialized") in new stack
    -- Executing [s@sub-record-check:11] ExecIf("PJSIP/200-0000014b", "0?Set(ARG3=dontcare)") in new stack
    -- Executing [s@sub-record-check:12] Set("PJSIP/200-0000014b", "REC_POLICY_MODE_SAVE=") in new stack
    -- Executing [s@sub-record-check:13] ExecIf("PJSIP/200-0000014b", "0?Set(REC_STATUS=NO)") in new stack
    -- Executing [s@sub-record-check:14] GotoIf("PJSIP/200-0000014b", "3?checkaction") in new stack
    -- Goto (sub-record-check,s,17)
    -- Executing [s@sub-record-check:17] GotoIf("PJSIP/200-0000014b", "1?sub-record-check,out,1") in new stack
    -- Goto (sub-record-check,out,1)
    -- Executing [out@sub-record-check:1] NoOp("PJSIP/200-0000014b", "Outbound Recording Check from 200 to 519XXXXXX") in new stack
    -- Executing [out@sub-record-check:2] Set("PJSIP/200-0000014b", "RECMODE=dontcare") in new stack
    -- Executing [out@sub-record-check:3] ExecIf("PJSIP/200-0000014b", "1?Goto(routewins)") in new stack
    -- Goto (sub-record-check,out,7)
    -- Executing [out@sub-record-check:7] Gosub("PJSIP/200-0000014b", "recordcheck,1(dontcare,out,519XXXXXX)") in new stack
    -- Executing [recordcheck@sub-record-check:1] NoOp("PJSIP/200-0000014b", "Starting recording check against dontcare") in new stack
    -- Executing [recordcheck@sub-record-check:2] Goto("PJSIP/200-0000014b", "dontcare") in new stack
    -- Goto (sub-record-check,recordcheck,3)
    -- Executing [recordcheck@sub-record-check:3] Return("PJSIP/200-0000014b", "") in new stack
    -- Executing [out@sub-record-check:8] Return("PJSIP/200-0000014b", "") in new stack
    -- Executing [519XXXXXX@from-internal:3] ExecIf("PJSIP/200-0000014b", "0 ?Set(CDR(accountcode)=)") in new stack
    -- Executing [519XXXXXX@from-internal:4] Set("PJSIP/200-0000014b", "_ROUTEID=3") in new stack
    -- Executing [519XXXXXX@from-internal:5] Set("PJSIP/200-0000014b", "_ROUTENAME=fcn_out") in new stack
    -- Executing [519XXXXXX@from-internal:6] Set("PJSIP/200-0000014b", "MOHCLASS=default") in new stack
    -- Executing [519XXXXXX@from-internal:7] ExecIf("PJSIP/200-0000014b", "1?Set(TRUNKCIDOVERRIDE=585XXXXXX)") in new stack
    -- Executing [519XXXXXX@from-internal:8] Set("PJSIP/200-0000014b", "_CALLERIDNAMEINTERNAL=First Name Surname") in new stack
    -- Executing [519XXXXXX@from-internal:9] Set("PJSIP/200-0000014b", "_CALLERIDNUMINTERNAL=200") in new stack
    -- Executing [519XXXXXX@from-internal:10] Set("PJSIP/200-0000014b", "_EMAILNOTIFICATION=FALSE") in new stack
    -- Executing [519XXXXXX@from-internal:11] Set("PJSIP/200-0000014b", "_NODEST=") in new stack
    -- Executing [519XXXXXX@from-internal:12] Macro("PJSIP/200-0000014b", "dialout-trunk,1,519XXXXXX,,off") in new stack
    -- Executing [s@macro-dialout-trunk:1] Set("PJSIP/200-0000014b", "DIAL_TRUNK=1") in new stack
    -- Executing [s@macro-dialout-trunk:2] ExecIf("PJSIP/200-0000014b", "0?Set(DIAL_OPTIONS=Hhtr)") in new stack
    -- Executing [s@macro-dialout-trunk:3] GosubIf("PJSIP/200-0000014b", "0?sub-pincheck,s,1()") in new stack
    -- Executing [s@macro-dialout-trunk:4] ExecIf("PJSIP/200-0000014b", "0?Set(CALLERID(num)=200)") in new stack
    -- Executing [s@macro-dialout-trunk:5] GotoIf("PJSIP/200-0000014b", "0?disabletrunk,1") in new stack
    -- Executing [s@macro-dialout-trunk:6] Set("PJSIP/200-0000014b", "DIAL_NUMBER=519XXXXXX") in new stack
    -- Executing [s@macro-dialout-trunk:7] Set("PJSIP/200-0000014b", "DIAL_TRUNK_OPTIONS=HhTtr") in new stack
    -- Executing [s@macro-dialout-trunk:8] Set("PJSIP/200-0000014b", "OUTBOUND_GROUP=OUT_1") in new stack
    -- Executing [s@macro-dialout-trunk:9] Set("PJSIP/200-0000014b", "DIAL_TRUNK_OPTIONS=T") in new stack
    -- Executing [s@macro-dialout-trunk:10] GotoIf("PJSIP/200-0000014b", "0?nomax") in new stack
    -- Executing [s@macro-dialout-trunk:11] GotoIf("PJSIP/200-0000014b", "0?chanfull") in new stack
    -- Executing [s@macro-dialout-trunk:12] GotoIf("PJSIP/200-0000014b", "0?skipoutcid") in new stack
    -- Executing [s@macro-dialout-trunk:13] Macro("PJSIP/200-0000014b", "outbound-callerid,1") in new stack
    -- Executing [s@macro-outbound-callerid:1] NoOp("PJSIP/200-0000014b", "200") in new stack
    -- Executing [s@macro-outbound-callerid:2] NoOp("PJSIP/200-0000014b", "") in new stack
    -- Executing [s@macro-outbound-callerid:3] NoOp("PJSIP/200-0000014b", "all") in new stack
    -- Executing [s@macro-outbound-callerid:4] ExecIf("PJSIP/200-0000014b", "0?Set(CALLERID(name-pres)=)") in new stack
    -- Executing [s@macro-outbound-callerid:5] ExecIf("PJSIP/200-0000014b", "0?Set(CALLERID(num-pres)=)") in new stack
    -- Executing [s@macro-outbound-callerid:6] Set("PJSIP/200-0000014b", "HOTDESCKCHAN=200-0000014b") in new stack
    -- Executing [s@macro-outbound-callerid:7] Set("PJSIP/200-0000014b", "HOTDESKEXTEN=200") in new stack
    -- Executing [s@macro-outbound-callerid:8] Set("PJSIP/200-0000014b", "HOTDESKCALL=0") in new stack
    -- Executing [s@macro-outbound-callerid:9] ExecIf("PJSIP/200-0000014b", "0?Set(HOTDESKCALL=1)") in new stack
    -- Executing [s@macro-outbound-callerid:10] ExecIf("PJSIP/200-0000014b", "0?Set(CALLERID(name)=)") in new stack
    -- Executing [s@macro-outbound-callerid:11] Set("PJSIP/200-0000014b", "ALLOWTHISROUTE=NO") in new stack
    -- Executing [s@macro-outbound-callerid:12] ExecIf("PJSIP/200-0000014b", "0?Set(ALLOWTHISROUTE=YES)") in new stack
    -- Executing [s@macro-outbound-callerid:13] ExecIf("PJSIP/200-0000014b", "0?Hangup()") in new stack
    -- Executing [s@macro-outbound-callerid:14] ExecIf("PJSIP/200-0000014b", "0?Set(REALCALLERIDNUM=200)") in new stack
    -- Executing [s@macro-outbound-callerid:15] ExecIf("PJSIP/200-0000014b", "0?Set(AMPUSER=200)") in new stack
    -- Executing [s@macro-outbound-callerid:16] GotoIf("PJSIP/200-0000014b", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,20)
    -- Executing [s@macro-outbound-callerid:20] Set("PJSIP/200-0000014b", "USEROUTCID=") in new stack
    -- Executing [s@macro-outbound-callerid:21] Set("PJSIP/200-0000014b", "EMERGENCYCID=") in new stack
    -- Executing [s@macro-outbound-callerid:22] ExecIf("PJSIP/200-0000014b", "0?Set(SCDEXT=YES)") in new stack
    -- Executing [s@macro-outbound-callerid:23] ExecIf("PJSIP/200-0000014b", "0?Set(EMERGENCYCID=)") in new stack
    -- Executing [s@macro-outbound-callerid:24] ExecIf("PJSIP/200-0000014b", "0?Set(CALLERID(name)=)") in new stack
    -- Executing [s@macro-outbound-callerid:25] ExecIf("PJSIP/200-0000014b", "0?Set(EMERGENCYCID=)") in new stack
    -- Executing [s@macro-outbound-callerid:26] Set("PJSIP/200-0000014b", "TRUNKOUTCID=585XXXXXX") in new stack
    -- Executing [s@macro-outbound-callerid:27] GotoIf("PJSIP/200-0000014b", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,33)
    -- Executing [s@macro-outbound-callerid:33] ExecIf("PJSIP/200-0000014b", "1?Set(CALLERID(all)=585XXXXXX)") in new stack
    -- Executing [s@macro-outbound-callerid:34] ExecIf("PJSIP/200-0000014b", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:35] ExecIf("PJSIP/200-0000014b", "1?Set(CALLERID(all)=585XXXXXX)") in new stack
    -- Executing [s@macro-outbound-callerid:36] ExecIf("PJSIP/200-0000014b", "0?Set(CALLERID(all)=200)") in new stack
    -- Executing [s@macro-outbound-callerid:37] ExecIf("PJSIP/200-0000014b", "0?Set(CALLERID(all)=200)") in new stack
    -- Executing [s@macro-outbound-callerid:38] Set("PJSIP/200-0000014b", "TIOHIDE=no") in new stack
    -- Executing [s@macro-outbound-callerid:39] ExecIf("PJSIP/200-0000014b", "0?Set(CALLERID(name-pres)=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:40] ExecIf("PJSIP/200-0000014b", "0?Set(CALLERID(num-pres)=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:41] ExecIf("PJSIP/200-0000014b", "0?Set(CALLERID(name-pres)=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:42] ExecIf("PJSIP/200-0000014b", "0?Set(CALLERID(num-pres)=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:43] Set("PJSIP/200-0000014b", "CDR(outbound_cnum)=585XXXXXX") in new stack
    -- Executing [s@macro-outbound-callerid:44] Set("PJSIP/200-0000014b", "CDR(outbound_cnam)=") in new stack
    -- Executing [s@macro-dialout-trunk:14] GosubIf("PJSIP/200-0000014b", "0?sub-flp-1,s,1()") in new stack
    -- Executing [s@macro-dialout-trunk:15] Set("PJSIP/200-0000014b", "OUTNUM=519XXXXXX") in new stack
    -- Executing [s@macro-dialout-trunk:16] Set("PJSIP/200-0000014b", "custom=PJSIP") in new stack
    -- Executing [s@macro-dialout-trunk:17] ExecIf("PJSIP/200-0000014b", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)") in new stack
    -- Executing [s@macro-dialout-trunk:18] ExecIf("PJSIP/200-0000014b", "0?Set(DIAL_TRUNK_OPTIONS=TM(confirm))") in new stack
    -- Executing [s@macro-dialout-trunk:19] GotoIf("PJSIP/200-0000014b", "1?gocall") in new stack
    -- Goto (macro-dialout-trunk,s,21)
    -- Executing [s@macro-dialout-trunk:21] Macro("PJSIP/200-0000014b", "dialout-trunk-predial-hook,") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("PJSIP/200-0000014b", "") in new stack
    -- Executing [s@macro-dialout-trunk:22] GotoIf("PJSIP/200-0000014b", "0?skipcrm") in new stack
    -- Executing [s@macro-dialout-trunk:23] Set("PJSIP/200-0000014b", "__CRM_DIRECTION=OUTBOUND") in new stack
    -- Executing [s@macro-dialout-trunk:24] Set("PJSIP/200-0000014b", "__CRM_DESTINATION=519XXXXXX") in new stack
    -- Executing [s@macro-dialout-trunk:25] Set("PJSIP/200-0000014b", "__CRM_SOURCE=200") in new stack
    -- Executing [s@macro-dialout-trunk:26] AGI("PJSIP/200-0000014b", "agi://127.0.0.1/sangomacrm.agi") in new stack
    -- <PJSIP/200-0000014b>AGI Script agi://127.0.0.1/sangomacrm.agi completed, returning 0
    -- Executing [s@macro-dialout-trunk:27] Set("PJSIP/200-0000014b", "CHANNEL(hangup_handler_push)=crm-hangup,s,1") in new stack
    -- Executing [s@macro-dialout-trunk:28] NoOp("PJSIP/200-0000014b", "CRM Finished") in new stack
    -- Executing [s@macro-dialout-trunk:29] GotoIf("PJSIP/200-0000014b", "0?bypass,1") in new stack
    -- Executing [s@macro-dialout-trunk:30] ExecIf("PJSIP/200-0000014b", "1?Set(CONNECTEDLINE(num,i)=519XXXXXX)") in new stack
    -- Executing [s@macro-dialout-trunk:31] ExecIf("PJSIP/200-0000014b", "1?Set(CONNECTEDLINE(name,i)=CID:585XXXXXX)") in new stack
    -- Executing [s@macro-dialout-trunk:32] ExecIf("PJSIP/200-0000014b", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)585XXXXXX)") in new stack
    -- Executing [s@macro-dialout-trunk:33] GotoIf("PJSIP/200-0000014b", "0?customtrunk") in new stack
    -- Executing [s@macro-dialout-trunk:34] ExecIf("PJSIP/200-0000014b", "0?Set(DIAL_TRUNK_OPTIONS=)") in new stack
    -- Executing [s@macro-dialout-trunk:35] Set("PJSIP/200-0000014b", "HASH(__SIPHEADERS,Alert-Info)=unset") in new stack
    -- Executing [s@macro-dialout-trunk:36] Dial("PJSIP/200-0000014b", "PJSIP/519XXXXXX@fcn,300,Tb(func-apply-sipheaders^s^1,(1))U(sub-send-obroute-email^519XXXXXX^519XXXXXX^1^1675675338^^585XXXXXX)") in new stack
    -- PJSIP/fcn-0000014c Internal Gosub(func-apply-sipheaders,s,1(1)) start
    -- Executing [s@func-apply-sipheaders:1] ExecIf("PJSIP/fcn-0000014c", "0?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)") in new stack
    -- Executing [s@func-apply-sipheaders:2] NoOp("PJSIP/fcn-0000014c", "Applying SIP Headers to channel PJSIP/fcn-0000014c") in new stack
    -- Executing [s@func-apply-sipheaders:3] Set("PJSIP/fcn-0000014c", "TECH=PJSIP") in new stack
    -- Executing [s@func-apply-sipheaders:4] Set("PJSIP/fcn-0000014c", "SIPHEADERKEYS=Alert-Info") in new stack
    -- Executing [s@func-apply-sipheaders:5] While("PJSIP/fcn-0000014c", "1") in new stack
    -- Executing [s@func-apply-sipheaders:6] Set("PJSIP/fcn-0000014c", "sipheader=unset") in new stack
    -- Executing [s@func-apply-sipheaders:7] ExecIf("PJSIP/fcn-0000014c", "1?Set(PJSIP_HEADER(remove,Alert-Info)=)") in new stack
[2023-02-06 10:22:18] ERROR[25402]: res_pjsip_header_funcs.c:717 remove_header: No headers had been previously added to this session.
    -- Executing [s@func-apply-sipheaders:8] ExecIf("PJSIP/fcn-0000014c", "0?Set(sipheader=<http://127.0.0.1>;info=unset)") in new stack
    -- Executing [s@func-apply-sipheaders:9] ExecIf("PJSIP/fcn-0000014c", "0?Set(sipheader=<http://127.0.0.1>unset)") in new stack
    -- Executing [s@func-apply-sipheaders:10] ExecIf("PJSIP/fcn-0000014c", "0?Set(PJSIP_HEADER(add,Alert-Info)=unset)") in new stack
    -- Executing [s@func-apply-sipheaders:11] EndWhile("PJSIP/fcn-0000014c", "") in new stack
    -- Executing [s@func-apply-sipheaders:5] While("PJSIP/fcn-0000014c", "0") in new stack
    -- Executing [s@func-apply-sipheaders:12] Return("PJSIP/fcn-0000014c", "") in new stack
  == Spawn extension (func-apply-sipheaders, s, 12) exited non-zero on 'PJSIP/fcn-0000014c'
    -- PJSIP/fcn-0000014c Internal Gosub(func-apply-sipheaders,s,1(1)) complete GOSUB_RETVAL=
    -- Called PJSIP/519XXXXXX@fcn
<--- Transmitting SIP request (1059 bytes) to UDP:213.218.116.66:5060 --->
INVITE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.71:5060;rport;branch=z9hG4bKPj840a8457-a3bb-4324-842d-fb0e7bc264ea
From: <sip:[email protected]>;tag=177cb58d-a5a8-4877-907c-f3e50c2a18a1
To: <sip:[email protected]>
Contact: <sip:[email protected]:5060>
Call-ID: cb3dfc0a-f0fe-42f9-a2c7-bda080243177
CSeq: 25500 INVITE
Allow: OPTIONS, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: FPBX-16.0.30(18.16.0)
Content-Type: application/sdp
Content-Length:   374

v=0
o=- 1988930938 1988930938 IN IP4 192.168.1.71
s=Asterisk
c=IN IP4 192.168.1.71
t=0 0
m=audio 19448 RTP/AVP 18 8 111 3 112 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:8 PCMA/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:3 GSM/8000
a=rtpmap:112 AAL2-G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<--- Received SIP response (395 bytes) from UDP:213.218.116.66:5060 --->
SIP/2.0 403 Forbidden
Via: SIP/2.0/UDP 192.168.1.71:5060;rport=46916;branch=z9hG4bKPj840a8457-a3bb-4324-842d-fb0e7bc264ea
From: <sip:[email protected]>;tag=177cb58d-a5a8-4877-907c-f3e50c2a18a1
To: <sip:[email protected]>;tag=021dcb287e58103b8769536f43974d88.0431
Call-ID: cb3dfc0a-f0fe-42f9-a2c7-bda080243177
CSeq: 25500 INVITE
Server: Carrier-eX v.0.9
Content-Length: 0


<--- Transmitting SIP request (440 bytes) to UDP:213.218.116.66:5060 --->
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.71:5060;rport;branch=z9hG4bKPj840a8457-a3bb-4324-842d-fb0e7bc264ea
From: <sip:[email protected]>;tag=177cb58d-a5a8-4877-907c-f3e50c2a18a1
To: <sip:[email protected]>;tag=021dcb287e58103b8769536f43974d88.0431
Call-ID: cb3dfc0a-f0fe-42f9-a2c7-bda080243177
CSeq: 25500 ACK
Max-Forwards: 70
User-Agent: FPBX-16.0.30(18.16.0)
Content-Length:  0


  == Everyone is busy/congested at this time (1:0/0/1)
    -- Executing [s@macro-dialout-trunk:37] NoOp("PJSIP/200-0000014b", "Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 21") in new stack
    -- Executing [s@macro-dialout-trunk:38] GotoIf("PJSIP/200-0000014b", "0?continue,1:s-CHANUNAVAIL,1") in new stack
    -- Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
    -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] Set("PJSIP/200-0000014b", "RC=21") in new stack
    -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:2] Goto("PJSIP/200-0000014b", "21,1") in new stack
    -- Goto (macro-dialout-trunk,21,1)
    -- Executing ..... new stack



<--- Transmitting SIP response (893 bytes) to UDP:192.168.1.72:5060 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 192.168.1.72;rport=5060;received=192.168.1.72;branch=z9hG4bKbbdcdd2afa736777b
Call-ID: 9a007b7e74603266
From: <sip:[email protected]>;tag=93280a0ea9;epid=SC639301
To: <sip:[email protected]>;tag=a303e724-e7dd-4029-9f02-3ddf926a65a8
CSeq: 1566422785 INVITE
Server: FPBX-16.0.30(18.16.0)
Allow: OPTIONS, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, MESSAGE, REFER
Contact: <sip:192.168.1.71:5060>
P-Asserted-Identity: "CID:585XXXXXX" <sip:[email protected]>
Content-Type: application/sdp
Content-Length:   282

v=0
o=- 38781823 2144014246 IN IP4 192.168.1.71
s=Asterisk
c=IN IP4 192.168.1.71
t=0 0
m=audio 16164 RTP/AVP 18 8 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

    -- <PJSIP/200-0000014b> Playing 'all-circuits-busy-now.slin16' (language 'en')
       > 0x7f2314071970 -- Strict RTP switching to RTP target address 192.168.1.72:5012 as source
    -- <PJSIP/200-0000014b> Playing 'please-try-call-later.slin16' (language 'en')
<--- Received SIP request (481 bytes) from UDP:192.168.1.72:5060 --->
CANCEL sip:[email protected]:5060;transport=udp SIP/2.0
Via: SIP/2.0/UDP 192.168.1.72;branch=z9hG4bKbbdcdd2afa736777b
Max-Forwards: 70
From: <sip:[email protected]:5060>;tag=93280a0ea9;epid=SC639301
To: <sip:[email protected]:5060>
Call-ID: 9a007b7e74603266
CSeq: 1566422785 CANCEL
User-Agent: OpenStage_15_V3 R5.3.0       SIP  170316
X-Siemens-RTP-stats-list: MT=0;PS=149;OS=2980;PR=149;OR=2980;PL=0;JI=1;LA=0;SS=0;EN=18;DE=18;IE=11;TCLW=53
Content-Length: 0


<--- Transmitting SIP response (351 bytes) to UDP:192.168.1.72:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.72;rport=5060;received=192.168.1.72;branch=z9hG4bKbbdcdd2afa736777b
Call-ID: 9a007b7e74603266
From: <sip:[email protected]>;tag=93280a0ea9;epid=SC639301
To: <sip:[email protected]>;tag=a303e724-e7dd-4029-9f02-3ddf926a65a8
CSeq: 1566422785 CANCEL
Server: FPBX-16.0.30(18.16.0)
Content-Length:  0


<--- Transmitting SIP response (545 bytes) to UDP:192.168.1.72:5060 --->
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 192.168.1.72;rport=5060;received=192.168.1.72;branch=z9hG4bKbbdcdd2afa736777b
Call-ID: 9a007b7e74603266
From: <sip:[email protected]>;tag=93280a0ea9;epid=SC639301
To: <sip:[email protected]>;tag=a303e724-e7dd-4029-9f02-3ddf926a65a8
CSeq: 1566422785 INVITE
Server: FPBX-16.0.30(18.16.0)
Allow: OPTIONS, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, MESSAGE, REFER
P-Asserted-Identity: "CID:585XXXXXX" <sip:[email protected]>
Content-Length:  0


    -- Executing.....


<--- Received SIP request (403 bytes) from UDP:192.168.1.72:5060 --->
ACK sip:[email protected]:5060;transport=udp SIP/2.0
Via: SIP/2.0/UDP 192.168.1.72;branch=z9hG4bKbbdcdd2afa736777b
Max-Forwards: 70
From: <sip:[email protected]:5060>;tag=93280a0ea9;epid=SC639301
To: <sip:[email protected]>;tag=a303e724-e7dd-4029-9f02-3ddf926a65a8
Call-ID: 9a007b7e74603266
CSeq: 1566422785 ACK
User-Agent: OpenStage_15_V3 R5.3.0       SIP  170316
Content-Length: 0


    -- <PJSIP/200-0000014b>AGI Script agi://127.0.0.1/sangomacrm.agi completed, returning 0
    -- Executing [s@crm-hangup:8] Return("PJSIP/200-0000014b", "") in new stack
  == Spawn extension (from-internal, h, 1) exited non-zero on 'PJSIP/200-0000014b'
    -- PJSIP/200-0000014b Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=
<--- Transmitting SIP request (587 bytes) to UDP:213.218.116.65:5060 --->
REGISTER sip:sip.freeconet.pl:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.71:5060;rport;branch=z9hG4bKPje53f68bf-50df-4378-abc4-64157e6faeb3
From: <sip:[email protected]>;tag=186d3bf0-5ff5-4a43-a77e-1b94f7f113d5
To: <sip:[email protected]>
Call-ID: 62514921-3865-4ece-b272-4fa340d01a52
CSeq: 25514 REGISTER
Contact: <sip:[email protected]:5060;line=vseywkm>
Expires: 60
Allow: OPTIONS, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, MESSAGE, REFER
Max-Forwards: 70
User-Agent: FPBX-16.0.30(18.16.0)
Content-Length:  0

You haven’t fixed the external address.

I thought the provide said use the account name, but you have used the caller ID.

In the trunk settings, set From User to the same value as you have in Username. Set From Domain to sip.freeconet.pl

Also, on the Codecs tab, only alaw and ulaw should be checked.

If you still have trouble, post a new log.

We made it !!! :slightly_smiling_face:

I needed to put voip user name in FROM USER, and sip provider domain name in From Domain. All in TRUNK \ PJSETTINGS \ ADVANCED tab

Thank you verry much for your help.

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