How to make dialplan for webphone, cell phone?

current my pjsip extension 1000—context is from-internal.

with extension.conf, extension_additional.conf, [macro-dial-one] works for this extension 1000.
do you know the macro-dial-one ?
if from 1000 , calling to 147563, then I can see the macro-dial-one context lines in CLI.

i.is.cc/5vw2BWg.png

I gonna add some features after answered.
for example: play music , dtmf, and whisper etc…
but I can not find answer part…

One of the supported way to adding dialplan is with a dialplan hook Hooking for fun and income

thanks.
I read this post.
that is very great.
I have one question.
the hook point are all caller side.
I want to add some actions after connected call.
in this case, what I have to do ?
where should I have to add my custom plan?

I know my qustion is preposterous…
but I want to know correctly…

already I added some lines in the hook point.
and I tested many times…
but after answered, then context doesnt work.

[macro-dialout-trunk-predial-hook]
exten => s,1,Noop(Get DTMF function. I am testing DTMF fun)
exten => s,n,Wait(2)
exten => s,n,Read(dtmfno,20,10,10)
exten => s,n,NoOp(${dtmfno})
exten => s,n,AGI(cx_agi/dtmf.py,${CALLERID(number)},${ARG2},${dtmfno},${ARG2})
exten => s,n,Return()

[macro-dialout-one-predial-hook]
exten => s,1,Noop(Get DTMF function. I am testing DTMF fun)
exten => s,n,Wait(2)
exten => s,n,Read(dtmfno,20,10,10)
exten => s,n,NoOp(${dtmfno})
exten => s,n,AGI(cx_agi/dtmf.py,${CALLERID(number)},${ARG2},${dtmfno},${ARG2})
exten => s,n,Return()

Performing actions post answer using dialplan alone in FreePBX is hard to impossible. It would be easier to use pure asterisk.

if I try to use asterisk, how can i solve the problem?
already I tried to solve this problem in asterisk. and posted in the asterisk forum.
but they told me it can not do this in asterisk…

current I am using freepbx.
so I have to solve this problem in freepbx.

If you can’t do it in Asterisk, then neither can you do it in FreePBX (which uses Asterisk at it’s core)

as your think, my idea is impossible?

I can’t answer that, we don’t yet know what exactly you are trying to achieve.

hmm why?
did you check my post?
I want to add some features after connected call-- answered.
but although I added some lines, it doesnt work after answered…
I dont know the reason and I have to solve this problem.

adding ‘some features’ is not explicit enough.

correctly DTMF feature

[GETDTMF]
include => GETDTMF-custom
exten => s,1,Noop(Get DTMF function)
exten => s,n,Wait(2)
exten => s,n,Read(dtmfno,20,10,10)
exten => s,n,NoOp(${dtmfno})
exten => s,n,AGI(cx_agi/dtmf.py,${CALLERID(number)},${ARG2},${dtmfno},${ARG2})
exten => s,n,Read(dtmfno,20,10,10)
exten => s,n,NoOp(${dtmfno})
exten => s,n,AGI(cx_agi/dtmf.py,${CALLERID(number)},${ARG2},${dtmfno},${ARG2})
;–== end of [GETDTMF] ==–;

I already created dtmf.py for agi.
current only remained adding line to correct location.
so after answered, it should be work.

Post your dtmf.py script and a log of a call traversing it.

I think dont need post dtmf.py.
and then I already told you.
can not see the part log in CLI.
Because it doesnt work yet due to I dont know correct location of the dtmf context.
our aim is to find correct location to run the dtmf context.

Sorry but absent any appropriate logs , you will need to wait for a mind-reader to come along.

anyway I will share current log…

Using SIP RTP Audio TOS bits 184
== Using SIP RTP Audio TOS bits 184 in TCLASS field.
== Using SIP RTP Audio CoS mark 5
== DTLS ECDH initialized (automatic), faster PFS enabled
– Executing [[email protected]:1] GotoIf(“PJSIP/377161-000000d1”, “0?ext-local,*147563,1”) in new stack
– Executing [[email protected]:2] GotoIf(“PJSIP/377161-000000d1”, “1?ext-local,147563,1:followme-check,147563,1”) in new stack
– Goto (ext-local,147563,1)
– Executing [[email protected]:1] Set(“PJSIP/377161-000000d1”, “__RINGTIMER=15”) in new stack
– Executing [14[email protected]:2] ExecIf(“PJSIP/377161-000000d1”, “0?Set(__CWIGNORE=)”) in new stack
– Executing [[email protected]:3] Macro(“PJSIP/377161-000000d1”, “exten-vm,147563,147563,0,0,0”) in new stack
– Executing [[email protected]:1] Macro(“PJSIP/377161-000000d1”, “user-callerid,”) in new stack
– Executing [[email protected]:1] Set(“PJSIP/377161-000000d1”, “TOUCH_MONITOR=1660406105.248”) in new stack
– Executing [[email protected]:2] Set(“PJSIP/377161-000000d1”, “CHANCONTEXT=”) in new stack
– Executing [[email protected]:3] Set(“PJSIP/377161-000000d1”, “CHANCONTEXT=”) in new stack
– Executing [[email protected]:4] Set(“PJSIP/377161-000000d1”, “CHANEXTENCONTEXT=377161-000000d1”) in new stack
– Executing [[email protected]:5] Set(“PJSIP/377161-000000d1”, “CHANEXTEN=377161-000000d1”) in new stack
– Executing [[email protected]:6] Set(“PJSIP/377161-000000d1”, “CALLERID(number)=377161”) in new stack
– Executing [[email protected]:7] Set(“PJSIP/377161-000000d1”, “AMPUSER=377161”) in new stack
– Executing [[email protected]:8] Set(“PJSIP/377161-000000d1”, “HOTDESCKCHAN=377161-000000d1”) in new stack
– Executing [[email protected]:9] Set(“PJSIP/377161-000000d1”, “HOTDESKEXTEN=377161”) in new stack
– Executing [[email protected]:10] Set(“PJSIP/377161-000000d1”, “HOTDESKCALL=0”) in new stack
– Executing [[email protected]:11] ExecIf(“PJSIP/377161-000000d1”, “0?Set(HOTDESKCALL=1)”) in new stack
– Executing [[email protected]:12] ExecIf(“PJSIP/377161-000000d1”, “0?Set(CALLERID(name)=)”) in new stack
– Executing [[email protected]:13] GotoIf(“PJSIP/377161-000000d1”, “0?report”) in new stack
– Executing [[email protected]:14] ExecIf(“PJSIP/377161-000000d1”, “1?Set(REALCALLERIDNUM=377161)”) in new stack
– Executing [[email protected]:15] Set(“PJSIP/377161-000000d1”, “AMPUSER=377161”) in new stack
– Executing [[email protected]:16] GotoIf(“PJSIP/377161-000000d1”, “0?limit”) in new stack
– Executing [[email protected]:17] Set(“PJSIP/377161-000000d1”, “AMPUSERCIDNAME=377161”) in new stack
– Executing [[email protected]:18] ExecIf(“PJSIP/377161-000000d1”, “0?Set(__CIDMASQUERADING=TRUE)”) in new stack
– Executing [[email protected]:19] GotoIf(“PJSIP/377161-000000d1”, “0?report”) in new stack
– Executing [[email protected]:20] Set(“PJSIP/377161-000000d1”, “AMPUSERCID=377161”) in new stack
– Executing [[email protected]:21] Set(“PJSIP/377161-000000d1”, “__DIAL_OPTIONS=HhTtr”) in new stack
– Executing [[email protected]:22] Set(“PJSIP/377161-000000d1”, “CALLERID(all)=“377161” <377161>”) in new stack
– Executing [[email protected]:23] ExecIf(“PJSIP/377161-000000d1”, “0?Set(CUSDIAL=147563)”) in new stack
– Executing [[email protected]:24] ExecIf(“PJSIP/377161-000000d1”, “0?Set(CALLERID(all)=443458888811)”) in new stack
– Executing [[email protected]:25] GotoIf(“PJSIP/377161-000000d1”, “0?limit”) in new stack
– Executing [[email protected]:26] ExecIf(“PJSIP/377161-000000d1”, “0?Set(GROUP(concurrency_limit)=377161)”) in new stack
– Executing [[email protected]:27] ExecIf(“PJSIP/377161-000000d1”, “0?Set(CHANNEL(language)=)”) in new stack
– Executing [[email protected]:28] NoOp(“PJSIP/377161-000000d1”, “Macro Depth is 2”) in new stack
– Executing [[email protected]:29] GotoIf(“PJSIP/377161-000000d1”, “1?report2:macroerror”) in new stack
– Goto (macro-user-callerid,s,30)
– Executing [[email protected]:30] GotoIf(“PJSIP/377161-000000d1”, “0?continue”) in new stack
– Executing [[email protected]:31] ExecIf(“PJSIP/377161-000000d1”, “1?Set(__CALLEE_ACCOUNCODE=)”) in new stack
– Executing [[email protected]:32] Set(“PJSIP/377161-000000d1”, “__TTL=64”) in new stack
– Executing [[email protected]:33] GotoIf(“PJSIP/377161-000000d1”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,49)
– Executing [[email protected]:49] Set(“PJSIP/377161-000000d1”, “CALLERID(number)=377161”) in new stack
– Executing [[email protected]:50] Set(“PJSIP/377161-000000d1”, “CALLERID(name)=377161”) in new stack
– Executing [[email protected]:51] GotoIf(“PJSIP/377161-000000d1”, “0?cnum”) in new stack
– Executing [[email protected]:52] Set(“PJSIP/377161-000000d1”, “CDR(cnam)=377161”) in new stack
– Executing [[email protected]:53] Set(“PJSIP/377161-000000d1”, “CDR(cnum)=377161”) in new stack
– Executing [[email protected]:54] Set(“PJSIP/377161-000000d1”, “CHANNEL(language)=en”) in new stack
– Executing [[email protected]:2] Set(“PJSIP/377161-000000d1”, “RingGroupMethod=none”) in new stack
– Executing [[email protected]:3] Set(“PJSIP/377161-000000d1”, “__EXTTOCALL=147563”) in new stack
– Executing [[email protected]:4] Set(“PJSIP/377161-000000d1”, “__PICKUPMARK=147563”) in new stack
– Executing [[email protected]:5] Set(“PJSIP/377161-000000d1”, “RT=15”) in new stack
[2022-08-13 15:55:05] WARNING[24831][C-00006489]: chan_sip.c:23279 func_header_read: This function can only be used on SIP channels.
– Executing [[email protected]:6] ExecIf(“PJSIP/377161-000000d1”, “0?Macro(vm,147563,DIRECTDIAL,)”) in new stack
[2022-08-13 15:55:05] WARNING[24831][C-00006489]: chan_sip.c:23279 func_header_read: This function can only be used on SIP channels.
[2022-08-13 15:55:05] WARNING[24831][C-00006489]: chan_sip.c:23279 func_header_read: This function can only be used on SIP channels.
– Executing [[email protected]:7] ExecIf(“PJSIP/377161-000000d1”, “0?MacroExit()”) in new stack
[2022-08-13 15:55:05] WARNING[24831][C-00006489]: chan_sip.c:23279 func_header_read: This function can only be used on SIP channels.
– Executing [[email protected]:8] ExecIf(“PJSIP/377161-000000d1”, “0?Macro(vm,147563,DIRECTDIAL,)”) in new stack
– Executing [[email protected]:9] ExecIf(“PJSIP/377161-000000d1”, “0?MacroExit()”) in new stack
– Executing [[email protected]:10] ExecIf(“PJSIP/377161-000000d1”, “0?ChanSpy(PJSIP/147563,q)”) in new stack
– Executing [[email protected]:11] ExecIf(“PJSIP/377161-000000d1”, “0?MacroExit()”) in new stack
[2022-08-13 15:55:05] WARNING[24831][C-00006489]: chan_sip.c:23279 func_header_read: This function can only be used on SIP channels.
– Executing [[email protected]:12] ExecIf(“PJSIP/377161-000000d1”, “0?ChanSpy(PJSIP/147563,q)”) in new stack
[2022-08-13 15:55:05] WARNING[24831][C-00006489]: chan_sip.c:23279 func_header_read: This function can only be used on SIP channels.
[2022-08-13 15:55:05] WARNING[24831][C-00006489]: chan_sip.c:23279 func_header_read: This function can only be used on SIP channels.
– Executing [[email protected]:13] ExecIf(“PJSIP/377161-000000d1”, “0?MacroExit()”) in new stack
[2022-08-13 15:55:05] WARNING[24831][C-00006489]: chan_sip.c:23279 func_header_read: This function can only be used on SIP channels.
– Executing [[email protected]:14] ExecIf(“PJSIP/377161-000000d1”, “0?Gosub(ext-intercom,*80147563,1())”) in new stack
– Executing [[email protected]:15] ExecIf(“PJSIP/377161-000000d1”, “0?MacroExit()”) in new stack
[2022-08-13 15:55:05] WARNING[24831][C-00006489]: chan_sip.c:23279 func_header_read: This function can only be used on SIP channels.
– Executing [[email protected]:16] ExecIf(“PJSIP/377161-000000d1”, “0?Gosub(ext-intercom,*80147563,1())”) in new stack
[2022-08-13 15:55:05] WARNING[24831][C-00006489]: chan_sip.c:23279 func_header_read: This function can only be used on SIP channels.
[2022-08-13 15:55:05] WARNING[24831][C-00006489]: chan_sip.c:23279 func_header_read: This function can only be used on SIP channels.
– Executing [[email protected]:17] ExecIf(“PJSIP/377161-000000d1”, “0?MacroExit()”) in new stack
[2022-08-13 15:55:05] WARNING[24831][C-00006489]: chan_sip.c:23279 func_header_read: This function can only be used on SIP channels.
– Executing [[email protected]:18] Gosub(“PJSIP/377161-000000d1”, “sub-record-check,s,1(exten,147563,dontcare)”) in new stack
– Executing [[email protected]:1] GotoIf(“PJSIP/377161-000000d1”, “0?initialized”) in new stack
– Executing [[email protected]:2] Set(“PJSIP/377161-000000d1”, “__REC_STATUS=INITIALIZED”) in new stack
– Executing [[email protected]:3] Set(“PJSIP/377161-000000d1”, “NOW=1660406105”) in new stack
– Executing [[email protected]:4] Set(“PJSIP/377161-000000d1”, “__DAY=13”) in new stack
– Executing [[email protected]:5] Set(“PJSIP/377161-000000d1”, “__MONTH=08”) in new stack
– Executing [[email protected]:6] Set(“PJSIP/377161-000000d1”, “__YEAR=2022”) in new stack
– Executing [[email protected]:7] Set(“PJSIP/377161-000000d1”, “__TIMESTR=20220813-155505”) in new stack
– Executing [[email protected]:8] Set(“PJSIP/377161-000000d1”, “__FROMEXTEN=377161”) in new stack
– Executing [[email protected]:9] Set(“PJSIP/377161-000000d1”, “__MON_FMT=wav”) in new stack
– Executing [[email protected]:10] NoOp(“PJSIP/377161-000000d1”, “Recordings initialized”) in new stack
– Executing [[email protected]:11] ExecIf(“PJSIP/377161-000000d1”, “0?Set(ARG3=dontcare)”) in new stack
– Executing [[email protected]:12] Set(“PJSIP/377161-000000d1”, “REC_POLICY_MODE_SAVE=”) in new stack
– Executing [[email protected]:13] ExecIf(“PJSIP/377161-000000d1”, “0?Set(REC_STATUS=NO)”) in new stack
– Executing [[email protected]:14] GotoIf(“PJSIP/377161-000000d1”, “5?checkaction”) in new stack
– Goto (sub-record-check,s,17)
– Executing [[email protected]:17] GotoIf(“PJSIP/377161-000000d1”, “1?sub-record-check,exten,1”) in new stack
– Goto (sub-record-check,exten,1)
– Executing [[email protected]:1] NoOp(“PJSIP/377161-000000d1”, “Exten Recording Check between 377161 and 147563”) in new stack
– Executing [[email protected]:2] Set(“PJSIP/377161-000000d1”, “CALLTYPE=internal”) in new stack
– Executing [[email protected]:3] ExecIf(“PJSIP/377161-000000d1”, “0?Set(CALLTYPE=)”) in new stack
– Executing [[email protected]:4] Set(“PJSIP/377161-000000d1”, “CALLEE=dontcare”) in new stack
– Executing [[email protected]:5] ExecIf(“PJSIP/377161-000000d1”, “0?Set(CALLEE=dontcare)”) in new stack
– Executing [[email protected]:6] GotoIf(“PJSIP/377161-000000d1”, “0?callee”) in new stack
– Executing [[email protected]:7] GotoIf(“PJSIP/377161-000000d1”, “1?caller”) in new stack
– Goto (sub-record-check,exten,13)
– Executing [[email protected]:13] Set(“PJSIP/377161-000000d1”, “RECMODE=dontcare”) in new stack
– Executing [[email protected]:14] Set(“PJSIP/377161-000000d1”, “CALLERRECMODE=dontcare”) in new stack
– Executing [[email protected]:15] Set(“PJSIP/377161-000000d1”, “CALEERECMODE=dontcare”) in new stack
– Executing [[email protected]:16] GotoIf(“PJSIP/377161-000000d1”, “0?processnormal”) in new stack
– Executing [[email protected]:17] ExecIf(“PJSIP/377161-000000d1”, “0?Set(RECMODE=dontcare)”) in new stack
– Executing [[email protected]:18] ExecIf(“PJSIP/377161-000000d1”, “0?Set(RECMODE=dontcare)”) in new stack
– Executing [[email protected]:19] ExecIf(“PJSIP/377161-000000d1”, “0?Set(RECMODE=dontcare)”) in new stack
– Executing [[email protected]:20] ExecIf(“PJSIP/377161-000000d1”, “0?Set(RECMODE=dontcare)”) in new stack
– Executing [[email protected]:21] ExecIf(“PJSIP/377161-000000d1”, “0?Set(RECMODE=dontcare)”) in new stack
– Executing [[email protected]:22] ExecIf(“PJSIP/377161-000000d1”, “1?Set(RECMODE=dontcare)”) in new stack
– Executing [[email protected]:23] Gosub(“PJSIP/377161-000000d1”, “recordcheck,1(dontcare,internal,147563)”) in new stack
– Executing [[email protected]:1] NoOp(“PJSIP/377161-000000d1”, “Starting recording check against dontcare”) in new stack
– Executing [[email protected]:2] Goto(“PJSIP/377161-000000d1”, “dontcare”) in new stack
– Goto (sub-record-check,recordcheck,3)
– Executing [[email protected]:3] Return(“PJSIP/377161-000000d1”, “”) in new stack
– Executing [[email protected]:24] Return(“PJSIP/377161-000000d1”, “”) in new stack
– Executing [[email protected]:19] GotoIf(“PJSIP/377161-000000d1”, “1?macrodial”) in new stack
– Goto (macro-exten-vm,s,25)
– Executing [[email protected]:25] GosubIf(“PJSIP/377161-000000d1”, “0?clrheader,1()”) in new stack
– Executing [[email protected]:26] Macro(“PJSIP/377161-000000d1”, “dial-one,15,HhTtr,147563”) in new stack
– Executing [[email protected]:1] Set(“PJSIP/377161-000000d1”, “DEXTEN=147563”) in new stack
– Executing [[email protected]:2] Set(“PJSIP/377161-000000d1”, “__CRM_SOURCE=377161”) in new stack
– Executing [[email protected]:3] ExecIf(“PJSIP/377161-000000d1”, “0?Set(__EXTTOCALL=147563)”) in new stack
– Executing [[email protected]:4] Set(“PJSIP/377161-000000d1”, “DIALSTATUS_CW=”) in new stack
– Executing [[email protected]:5] GosubIf(“PJSIP/377161-000000d1”, “0?screen,1()”) in new stack
– Executing [[email protected]:6] GosubIf(“PJSIP/377161-000000d1”, “0?cf,1()”) in new stack
– Executing [[email protected]:7] GotoIf(“PJSIP/377161-000000d1”, “1?skip1”) in new stack
– Goto (macro-dial-one,s,10)
– Executing [[email protected]:10] GotoIf(“PJSIP/377161-000000d1”, “0?nodial”) in new stack
– Executing [[email protected]:11] GotoIf(“PJSIP/377161-000000d1”, “0?continue”) in new stack
– Executing [[email protected]:12] Set(“PJSIP/377161-000000d1”, “EXTHASCW=ENABLED”) in new stack
– Executing [[email protected]:13] GotoIf(“PJSIP/377161-000000d1”, “0?next1:cwinusebusy”) in new stack
– Goto (macro-dial-one,s,25)
– Executing [[email protected]:25] GotoIf(“PJSIP/377161-000000d1”, “0?next3:continue”) in new stack
– Goto (macro-dial-one,s,27)
– Executing [[email protected]:27] GotoIf(“PJSIP/377161-000000d1”, “0?nodial”) in new stack
– Executing [[email protected]:28] GosubIf(“PJSIP/377161-000000d1”, “1?dstring,1():dlocal,1()”) in new stack
– Executing [[email protected]:1] Set(“PJSIP/377161-000000d1”, “DSTRING=”) in new stack
– Executing [[email protected]:2] Set(“PJSIP/377161-000000d1”, “DEVICES=147563”) in new stack
– Executing [[email protected]:3] ExecIf(“PJSIP/377161-000000d1”, “0?Return()”) in new stack
– Executing [[email protected]:4] ExecIf(“PJSIP/377161-000000d1”, “0?Set(DEVICES=47563)”) in new stack
– Executing [[email protected]:5] Set(“PJSIP/377161-000000d1”, “LOOPCNT=1”) in new stack
– Executing [[email protected]:6] Set(“PJSIP/377161-000000d1”, “ITER=1”) in new stack
– Executing [[email protected]:7] Set(“PJSIP/377161-000000d1”, “THISDIAL=PJSIP/147563”) in new stack
– Executing [[email protected]:8] GotoIf(“PJSIP/377161-000000d1”, “0?docheck”) in new stack
– Executing [[email protected]:9] NoOp(“PJSIP/377161-000000d1”, “Debug: Found PJSIP Destination PJSIP/147563”) in new stack
– Executing [[email protected]:10] GotoIf(“PJSIP/377161-000000d1”, “0?doset”) in new stack
– Executing [[email protected]:11] NoOp(“PJSIP/377161-000000d1”, “Debug: Updating PJSIP Destination with PJSIP_DIAL_CONTACTS”) in new stack
– Executing [[email protected]:12] Set(“PJSIP/377161-000000d1”, “THISDIAL=PJSIP/147563/sip:[email protected]:51398;transport=ws”) in new stack
– Executing [[email protected]:13] ExecIf(“PJSIP/377161-000000d1”, “0?Set(DIALSTATUS=CHANUNAVAIL)”) in new stack
– Executing [[email protected]:14] GotoIf(“PJSIP/377161-000000d1”, “0?skipset”) in new stack
– Executing [[email protected]:15] Set(“PJSIP/377161-000000d1”, “DSTRING=PJSIP/147563/sip:[email protected]:51398;transport=ws&”) in new stack
– Executing [[email protected]:16] Set(“PJSIP/377161-000000d1”, “ITER=2”) in new stack
– Executing [[email protected]:17] GotoIf(“PJSIP/377161-000000d1”, “0?begin”) in new stack
– Executing [[email protected]:18] ExecIf(“PJSIP/377161-000000d1”, “0?Return()”) in new stack
– Executing [[email protected]:19] Set(“PJSIP/377161-000000d1”, “DSTRING=PJSIP/147563/sip:[email protected]:51398;transport=ws”) in new stack
– Executing [[email protected]:20] Return(“PJSIP/377161-000000d1”, “”) in new stack
– Executing [[email protected]:29] GotoIf(“PJSIP/377161-000000d1”, “0?nodial”) in new stack
– Executing [[email protected]:30] GotoIf(“PJSIP/377161-000000d1”, “0?skiptrace”) in new stack
– Executing [[email protected]:31] GosubIf(“PJSIP/377161-000000d1”, “1?ctset,1():ctclear,1()”) in new stack
– Executing [[email protected]:1] Set(“PJSIP/377161-000000d1”, “DB(CALLTRACE/147563)=377161”) in new stack
– Executing [[email protected]:2] Return(“PJSIP/377161-000000d1”, “”) in new stack
– Executing [[email protected]:32] Set(“PJSIP/377161-000000d1”, “D_OPTIONS=HhTtr”) in new stack
– Executing [[email protected]:33] GosubIf(“PJSIP/377161-000000d1”, “0?func-set-sipheader,s,1(Alert-Info,)”) in new stack
– Executing [[email protected]:34] NoOp(“PJSIP/377161-000000d1”, "Blind Transfer: , Attended Transfer: , User: 377161, Alert Info: ") in new stack
– Executing [[email protected]:35] ExecIf(“PJSIP/377161-000000d1”, “1?Set(ALERT_INFO=)”) in new stack
– Executing [[email protected]:36] ExecIf(“PJSIP/377161-000000d1”, “0?Set(ALERT_INFO=)”) in new stack
– Executing [[email protected]:37] ExecIf(“PJSIP/377161-000000d1”, “0?Set(ALERT_INFO=)”) in new stack
– Executing [[email protected]:38] ExecIf(“PJSIP/377161-000000d1”, “0?Set(ALERT_INFO=Normal;volume=)”) in new stack
– Executing [[email protected]:39] ExecIf(“PJSIP/377161-000000d1”, “0?Set(ALERT_INFO=Normal;volume=)”) in new stack
– Executing [[email protected]:40] GosubIf(“PJSIP/377161-000000d1”, “0?func-set-sipheader,s,1(Alert-Info,)”) in new stack
– Executing [[email protected]:41] ExecIf(“PJSIP/377161-000000d1”, “0?Set(CHANNEL(musicclass)=)”) in new stack
– Executing [[email protected]:42] GosubIf(“PJSIP/377161-000000d1”, “0?qwait,1()”) in new stack
– Executing [[email protected]:43] Set(“PJSIP/377161-000000d1”, “__CWIGNORE=”) in new stack
– Executing [[email protected]:44] Set(“PJSIP/377161-000000d1”, “__KEEPCID=TRUE”) in new stack
– Executing [[email protected]:45] GotoIf(“PJSIP/377161-000000d1”, “0?usegoto,1”) in new stack
– Executing [[email protected]:46] GotoIf(“PJSIP/377161-000000d1”, “0?godial”) in new stack
– Executing [[email protected]:47] Gosub(“PJSIP/377161-000000d1”, “sub-presencestate-display,s,1(147563)”) in new stack
– Executing [[email protected]:1] Goto(“PJSIP/377161-000000d1”, “state-not_set,1”) in new stack
– Goto (sub-presencestate-display,state-not_set,1)
– Executing [[email protected]isplay:1] Set(“PJSIP/377161-000000d1”, “PRESENCESTATE_DISPLAY=”) in new stack
– Executing [[email protected]:2] Return(“PJSIP/377161-000000d1”, “”) in new stack
– Executing [[email protected]:48] Set(“PJSIP/377161-000000d1”, "CONNECTEDLINE(name,i)=147563 ") in new stack
– Executing [[email protected]:49] Set(“PJSIP/377161-000000d1”, “CONNECTEDLINE(num)=147563”) in new stack
– Executing [[email protected]:50] Set(“PJSIP/377161-000000d1”, “D_OPTIONS=HhTtr”) in new stack
– Executing [[email protected]:51] Macro(“PJSIP/377161-000000d1”, “dialout-one-predial-hook,”) in new stack
– Executing [[email protected]:1] MacroExit(“PJSIP/377161-000000d1”, “”) in new stack
– Executing [[email protected]:52] ExecIf(“PJSIP/377161-000000d1”, “0?Set(D_OPTIONS=HhtrI)”) in new stack
– Executing [[email protected]:53] ExecIf(“PJSIP/377161-000000d1”, “0?Set(CWRING=r(callwaiting)):Set(CWRING=)”) in new stack
– Executing [[email protected]:54] NoOp(“PJSIP/377161-000000d1”, “”) in new stack
– Executing [[email protected]:55] ExecIf(“PJSIP/377161-000000d1”, “0?Set(D_OPTIONS=HhTtrg)”) in new stack
– Executing [[email protected]:56] Dial(“PJSIP/377161-000000d1”, “PJSIP/147563/sip:[email protected]:51398;transport=ws,15,HhTtrb(func-apply-sipheaders^s^1)U(GETDTMF^377161^377161)a)”) in new stack
[2022-08-13 15:55:05] WARNING[24831][C-00006489]: app.c:3114 parse_options: Unrecognized option: ‘)’
– PJSIP/147563-000000d2 Internal Gosub(func-apply-sipheaders,s,1) start
– Executing [[email protected]:1] ExecIf(“PJSIP/147563-000000d2”, “0?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)”) in new stack
– Executing [[email protected]:2] NoOp(“PJSIP/147563-000000d2”, “Applying SIP Headers to channel PJSIP/147563-000000d2”) in new stack
– Executing [[email protected]:3] Set(“PJSIP/147563-000000d2”, “TECH=PJSIP”) in new stack
– Executing [[email protected]:4] Set(“PJSIP/147563-000000d2”, “SIPHEADERKEYS=”) in new stack
– Executing [[email protected]:5] While(“PJSIP/147563-000000d2”, “0”) in new stack
– Jumping to priority 13
– Executing [[email protected]:14] Return(“PJSIP/147563-000000d2”, “”) in new stack
== Spawn extension (from-internal, 147563, 1) exited non-zero on ‘PJSIP/147563-000000d2’
– PJSIP/147563-000000d2 Internal Gosub(func-apply-sipheaders,s,1) complete GOSUB_RETVAL=
– Called PJSIP/147563/sip:[email protected]:51398;transport=ws
== Using SIP RTP Audio TOS bits 184
== Using SIP RTP Audio TOS bits 184 in TCLASS field.
== Using SIP RTP Audio CoS mark 5
== DTLS ECDH initialized (automatic), faster PFS enabled
– PJSIP/147563-000000d2 is ringing

   > 0x7f0f0407e6b0 -- Strict RTP learning after remote address set to: 58.245.102.244:63477
-- PJSIP/147563-000000d2 answered PJSIP/377161-000000d1
   > 0x7f0f6005c710 -- Strict RTP learning after remote address set to: 58.245.102.244:65444
   > 0x7f0f6005c710 -- Strict RTP learning after ICE completion
   > 0x7f0f6005c710 -- Strict RTP learning after remote address set to: 58.245.102.244:65444

could you check the CLI log?

Double check your macro and ensure you reload the dialplan before executing it, it only executes priority 1

– Executing [[email protected]:1] MacroExit(“PJSIP/377161-000000d1”, “”) in new stack

As an aside I have never ‘returned’ from a macro, generally a macro will finish when it runs out of things to do or an explicit call to MacroExit() is