GotoIf Not Working in Queues

This is what I have in queues_additional.conf, after creating Sales Queue from GUI in freepbx:

[707]
announce-frequency=120
announce-holdtime=once
announce-position=yes
autofill=yes
autopause=no
autopausebusy=no
autopausedelay=0
autopauseunavail=no
joinempty=yes
leavewhenempty=no
maxlen=10
memberdelay=0
min-announce-frequency=60
penaltymemberslimit=0
periodic-announce-frequency=0
queue-callswaiting=queue-callswaiting
queue-thankyou=queue-thankyou
queue-thereare=queue-thereare
queue-youarenext=queue-youarenext
reportholdtime=yes
retry=2
ringinuse=yes
servicelevel=60
setinterfacevar=yes
strategy=rrmemory
timeout=15
timeoutpriority=app
timeoutrestart=no
weight=0
wrapuptime=45
context=
member=Local/[email protected]/n,0,“XXX”,hint:[email protected]
member=Local/[email protected]/n,0,“DM”,hint:[email protected]

So my GotoIf in extensions_custom.conf isn’t working and here is what I have in that file:

[ext-local]
include => from-queue

[from-queue]
exten => 705,1,NoOp(Call from Sales queue)
exten => 705,n,Dial(SIP/705,15,t)
exten => 705,n,GotoIf($["${DIALSTATUS}"=“ANSWER”]?answered)
exten => 705,n,GotoIf($["${DIALSTATUS}"=“NOANSWER”]?dial2)
exten => 705,n(answered),AGI(test.php)
exten => 705,n(dial2),Dial(SIP/708,15,t)

exten => 708,1,NoOp(Call from Sales queue)
exten => 708,n,Dial(SIP/708,15,t)
exten => 708,n,GotoIf($["${DIALSTATUS}"=“ANSWER”]?answered)
exten => 708,n,GotoIf($["${DIALSTATUS}"=“NOANSWER”]?dial3)
exten => 708,n(answered),AGI(test.php)
exten => 708,n(dial3),Dial(SIP/705,15,t)

And these are the CLI logs when I dial 707 from a softphone with extension say 704 in this case:
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
> 0x7f82c800b5b0 – Strict RTP learning after remote address set to: 197.232.55.88:8024
– Executing [[email protected]:1] Macro(“SIP/704-00000000”, “user-callerid,”) in new stack
[2022-01-14 15:09:39] WARNING[883][C-00000001]: app_macro.c:274 _macro_exec: Macro() is deprecated and will be removed from a future version of Asterisk.
[2022-01-14 15:09:39] WARNING[883][C-00000001]: app_macro.c:275 _macro_exec: Dialplan should be updated to use Gosub instead.
– Executing [[email protected]:1] Set(“SIP/704-00000000”, “TOUCH_MONITOR=1642162179.0”) in new stack
– Executing [[email protected]:2] Set(“SIP/704-00000000”, “CHANCONTEXT=”) in new stack
– Executing [[email protected]:3] Set(“SIP/704-00000000”, “CHANCONTEXT=”) in new stack
– Executing [[email protected]:4] Set(“SIP/704-00000000”, “CHANEXTENCONTEXT=704-00000000”) in new stack
– Executing [[email protected]:5] Set(“SIP/704-00000000”, “CHANEXTEN=704-00000000”) in new stack
– Executing [[email protected]:6] Set(“SIP/704-00000000”, “CALLERID(number)=704”) in new stack
– Executing [[email protected]:7] Set(“SIP/704-00000000”, “AMPUSER=704”) in new stack
– Executing [[email protected]:8] Set(“SIP/704-00000000”, “HOTDESCKCHAN=704-00000000”) in new stack
– Executing [[email protected]:9] Set(“SIP/704-00000000”, “HOTDESKEXTEN=704”) in new stack
– Executing [[email protected]:10] Set(“SIP/704-00000000”, “HOTDESKCALL=0”) in new stack
– Executing [[email protected]:11] ExecIf(“SIP/704-00000000”, “0?Set(HOTDESKCALL=1)”) in new stack
– Executing [[email protected]:12] ExecIf(“SIP/704-00000000”, “0?Set(CALLERID(name)=)”) in new stack
– Executing [[email protected]:13] GotoIf(“SIP/704-00000000”, “0?report”) in new stack
– Executing [[email protected]:14] ExecIf(“SIP/704-00000000”, “1?Set(REALCALLERIDNUM=704)”) in new stack
– Executing [[email protected]:15] Set(“SIP/704-00000000”, “AMPUSER=704”) in new stack
– Executing [[email protected]:16] GotoIf(“SIP/704-00000000”, “0?limit”) in new stack
– Executing [[email protected]:17] Set(“SIP/704-00000000”, “AMPUSERCIDNAME=Tested”) in new stack
– Executing [[email protected]:18] ExecIf(“SIP/704-00000000”, “0?Set(__CIDMASQUERADING=TRUE)”) in new stack
– Executing [[email protected]:19] GotoIf(“SIP/704-00000000”, “0?report”) in new stack
– Executing [[email protected]:20] Set(“SIP/704-00000000”, “AMPUSERCID=704”) in new stack
– Executing [[email protected]:21] Set(“SIP/704-00000000”, “__DIAL_OPTIONS=HhTtr”) in new stack
– Executing [[email protected]:22] Set(“SIP/704-00000000”, “CALLERID(all)=“Tested” <704>”) in new stack
– Executing [[email protected]:23] ExecIf(“SIP/704-00000000”, “0?Set(CUSDIAL=)”) in new stack
– Executing [[email protected]:24] ExecIf(“SIP/704-00000000”, “0?Set(CALLERID(all)=“Tested” <704>)”) in new stack
– Executing [[email protected]:25] GotoIf(“SIP/704-00000000”, “0?limit”) in new stack
– Executing [[email protected]:26] ExecIf(“SIP/704-00000000”, “0?Set(GROUP(concurrency_limit)=704)”) in new stack
– Executing [[email protected]:27] ExecIf(“SIP/704-00000000”, “0?Set(CHANNEL(language)=)”) in new stack
– Executing [[email protected]:28] NoOp(“SIP/704-00000000”, “Macro Depth is 1”) in new stack
– Executing [[email protected]:29] GotoIf(“SIP/704-00000000”, “1?report2:macroerror”) in new stack
– Goto (macro-user-callerid,s,30)
– Executing [[email protected]:30] GotoIf(“SIP/704-00000000”, “0?continue”) in new stack
– Executing [[email protected]:31] ExecIf(“SIP/704-00000000”, “1?Set(__CALLEE_ACCOUNCODE=)”) in new stack
– Executing [[email protected]:32] Set(“SIP/704-00000000”, “__TTL=64”) in new stack
– Executing [[email protected]:33] GotoIf(“SIP/704-00000000”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,49)
– Executing [[email protected]:49] Set(“SIP/704-00000000”, “CALLERID(number)=704”) in new stack
– Executing [[email protected]:50] Set(“SIP/704-00000000”, “CALLERID(name)=Tested”) in new stack
– Executing [[email protected]:51] GotoIf(“SIP/704-00000000”, “0?cnum”) in new stack
– Executing [[email protected]:52] Set(“SIP/704-00000000”, “CDR(cnam)=Tested”) in new stack
– Executing [[email protected]:53] Set(“SIP/704-00000000”, “CDR(cnum)=704”) in new stack
– Executing [[email protected]:54] Set(“SIP/704-00000000”, “CHANNEL(language)=en”) in new stack
– Executing [[email protected]:2] Progress(“SIP/704-00000000”, “”) in new stack
– Executing [[email protected]:3] ExecIf(“SIP/704-00000000”, “1?Set(__QUEUEWAIT=1642162179)”) in new stack
– Executing [[email protected]:4] Macro(“SIP/704-00000000”, “blkvm-set,reset”) in new stack
– Executing [[email protected]:1] ExecIf(“SIP/704-00000000”, “1?Set(__BLKVM_CHANNEL=SIP/704-00000000)”) in new stack
– Executing [[email protected]:2] Set(“SIP/704-00000000”, “SHARED(BLKVM,SIP/704-00000000)=TRUE”) in new stack
– Executing [[email protected]:3] Set(“SIP/704-00000000”, “GOSUB_RETVAL=TRUE”) in new stack
– Executing [[email protected]:4] MacroExit(“SIP/704-00000000”, “”) in new stack
– Executing [[email protected]:5] ExecIf(“SIP/704-00000000”, “1?Set(_DIAL_OPTIONS=HhTtrM(auto-blkvm))”) in new stack
– Executing [[email protected]:6] Set(“SIP/704-00000000”, “__NODEST=707”) in new stack
– Executing [[email protected]:7] Set(“SIP/704-00000000”, “__QCONTEXT=0”) in new stack
– Executing [[email protected]:8] Set(“SIP/704-00000000”, “QCIDPP=Sales:”) in new stack
– Executing [[email protected]:9] Set(“SIP/704-00000000”, “VQ_CIDPP=”) in new stack
– Executing [[email protected]:10] ExecIf(“SIP/704-00000000”, “1?Macro(prepend-cid,Sales:)”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/704-00000000”, “1?REPCID”) in new stack
– Goto (macro-prepend-cid,s,5)
– Executing [[email protected]:5] Set(“SIP/704-00000000”, “_RGPREFIX=Sales:”) in new stack
– Executing [[email protected]:6] Set(“SIP/704-00000000”, “CALLERID(name)=Sales:Tested”) in new stack
– Executing [[email protected]:11] Set(“SIP/704-00000000”, “QAINFO=”) in new stack
– Executing [[email protected]:12] Set(“SIP/704-00000000”, “VQ_AINFO=”) in new stack
– Executing [[email protected]:13] Set(“SIP/704-00000000”, “__RVOL_MODE=dontcare”) in new stack
– Executing [[email protected]:14] ExecIf(“SIP/704-00000000”, “0?Set(__ALERT_INFO=)”) in new stack
– Executing [[email protected]:15] Set(“SIP/704-00000000”, “QJOINMSG=”) in new stack
– Executing [[email protected]:16] Set(“SIP/704-00000000”, “VQ_JOINMSG=”) in new stack
– Executing [[email protected]:17] Set(“SIP/704-00000000”, “QCANCELMISSED=”) in new stack
– Executing [[email protected]:18] Set(“SIP/704-00000000”, “QRETRY=”) in new stack
– Executing [[email protected]rom-internal:19] Set(“SIP/704-00000000”, “VQ_RETRY=”) in new stack
– Executing [[email protected]:20] Set(“SIP/704-00000000”, “QOPTIONS=t”) in new stack
– Executing [[email protected]:21] Set(“SIP/704-00000000”, “VQ_OPTIONS=”) in new stack
– Executing [[email protected]:22] Set(“SIP/704-00000000”, “QGOSUB=”) in new stack
– Executing [[email protected]:23] Set(“SIP/704-00000000”, “VQ_GOSUB=”) in new stack
– Executing [[email protected]:24] Set(“SIP/704-00000000”, “QAGI=”) in new stack
– Executing [[email protected]:25] Set(“SIP/704-00000000”, “VQ_AGI=”) in new stack
– Executing [[email protected]:26] Set(“SIP/704-00000000”, “QRULE=”) in new stack
– Executing [[email protected]:27] Set(“SIP/704-00000000”, “VQ_RULE=”) in new stack
– Executing [[email protected]:28] Set(“SIP/704-00000000”, “QPOSITION=”) in new stack
– Executing [[email protected]:29] Set(“SIP/704-00000000”, “VQ_POSITION=”) in new stack
– Executing [[email protected]:30] Gosub(“SIP/704-00000000”, “sub-record-check,s,1(q,707,dontcare)”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/704-00000000”, “0?initialized”) in new stack
– Executing [[email protected]:2] Set(“SIP/704-00000000”, “__REC_STATUS=INITIALIZED”) in new stack
– Executing [[email protected]:3] Set(“SIP/704-00000000”, “NOW=1642162179”) in new stack
– Executing [[email protected]:4] Set(“SIP/704-00000000”, “__DAY=14”) in new stack
– Executing [[email protected]:5] Set(“SIP/704-00000000”, “__MONTH=01”) in new stack
– Executing [[email protected]:6] Set(“SIP/704-00000000”, “__YEAR=2022”) in new stack
– Executing [[email protected]:7] Set(“SIP/704-00000000”, “__TIMESTR=20220114-150939”) in new stack
– Executing [[email protected]:8] Set(“SIP/704-00000000”, “__FROMEXTEN=704”) in new stack
– Executing [[email protected]:9] Set(“SIP/704-00000000”, “__MON_FMT=wav”) in new stack
– Executing [[email protected]:10] NoOp(“SIP/704-00000000”, “Recordings initialized”) in new stack
– Executing [[email protected]:11] ExecIf(“SIP/704-00000000”, “0?Set(ARG3=dontcare)”) in new stack
– Executing [[email protected]:12] Set(“SIP/704-00000000”, “REC_POLICY_MODE_SAVE=”) in new stack
– Executing [[email protected]:13] ExecIf(“SIP/704-00000000”, “0?Set(REC_STATUS=NO)”) in new stack
– Executing [[email protected]:14] GotoIf(“SIP/704-00000000”, “1?checkaction”) in new stack
– Goto (sub-record-check,s,17)
– Executing [[email protected]:17] GotoIf(“SIP/704-00000000”, “0?sub-record-check,q,1”) in new stack
– Executing [[email protected]:18] NoOp(“SIP/704-00000000”, “Generic q Recording Check - 704 707”) in new stack
– Executing [[email protected]:19] Gosub(“SIP/704-00000000”, “recordcheck,1(dontcare,q,707)”) in new stack
– Executing [[email protected]:1] NoOp(“SIP/704-00000000”, “Starting recording check against dontcare”) in new stack
– Executing [[email protected]:2] Goto(“SIP/704-00000000”, “dontcare”) in new stack
– Goto (sub-record-check,recordcheck,3)
– Executing [[email protected]:3] Return(“SIP/704-00000000”, “”) in new stack
– Executing [[email protected]:20] Return(“SIP/704-00000000”, “”) in new stack
– Executing [[email protected]:31] Set(“SIP/704-00000000”, “__SIGNORE=TRUE”) in new stack
– Executing [[email protected]:32] Set(“SIP/704-00000000”, “__QC_CONFIRM=0”) in new stack
– Executing [[email protected]:33] GotoIf(“SIP/704-00000000”, “0?QVQANNOUNCE:NOQVQANNOUNCE”) in new stack
– Goto (from-internal,707,38)
– Executing [[email protected]:38] Set(“SIP/704-00000000”, “VQ_CONFIRMMSG=”) in new stack
– Executing [[email protected]:39] ExecIf(“SIP/704-00000000”, “0?Playback(, noanswer)”) in new stack
– Executing [[email protected]:40] QueueLog(“SIP/704-00000000”, “707,1642162179.0,NONE,DID,”) in new stack
– Executing [[email protected]:41] Set(“SIP/704-00000000”, “QAANNOUNCE=”) in new stack
– Executing [[email protected]:42] Set(“SIP/704-00000000”, “VQ_AANNOUNCE=”) in new stack
– Executing [[email protected]:43] Set(“SIP/704-00000000”, “QMOH=”) in new stack
– Executing [[email protected]:44] Set(“SIP/704-00000000”, “VQ_MOH=”) in new stack
– Executing [[email protected]:45] ExecIf(“SIP/704-00000000”, “0?Set(__MOHCLASS=)”) in new stack
– Executing [[email protected]:46] ExecIf(“SIP/704-00000000”, “0?Set(CHANNEL(musicclass)=)”) in new stack
– Executing [[email protected]:47] Set(“SIP/704-00000000”, “QMAXWAIT=”) in new stack
– Executing [[email protected]:48] Set(“SIP/704-00000000”, “VQ_MAXWAIT=”) in new stack
– Executing [[email protected]:49] Set(“SIP/704-00000000”, “QUEUENUM=707”) in new stack
– Executing [[email protected]:50] Set(“SIP/704-00000000”, “QUEUEJOINTIME=1642162179”) in new stack
– Executing [[email protected]:51] Queue(“SIP/704-00000000”, “707,t,”) in new stack
– Started music on hold, class ‘default’, on channel ‘SIP/704-00000000’
– Called Local/[email protected]/n
– Executing [[email protected]:1] NoOp(“Local/[email protected];2”, “Call from Sales queue”) in new stack
– – LazyMembers debugging - Numbusies: 0, Nummems: 2
– Executing [[email protected]:2] Dial(“Local/[email protected];2”, “SIP/705,15,t”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called SIP/705
– SIP/705-00000001 is ringing
– Local/[email protected];1 is ringing
– Nobody picked up in 15000 ms
– – LazyMembers debugging - Numbusies: 0, Nummems: 2
== Spawn extension (from-queue, 705, 2) exited non-zero on ‘Local/[email protected];2’
– Executing [[email protected]:1] Macro(“Local/[email protected];2”, “hangupcall,”) in new stack
– Executing [[email protected]:1] GotoIf(“Local/[email protected];2”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [[email protected]:3] ExecIf(“Local/[email protected];2”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [[email protected]:4] NoOp(“Local/[email protected];2”, "SIP/705-00000001 montior file= ") in new stack
– Executing [[email protected]:5] GotoIf(“Local/[email protected];2”, “1?skipagi”) in new stack
– Goto (macro-hangupcall,s,7)
– Executing [[email protected]:7] Hangup(“Local/[email protected];2”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 7) exited non-zero on ‘Local/[email protected];2’ in macro ‘hangupcall’
== Spawn extension (from-queue, h, 1) exited non-zero on ‘Local/[email protected];2’
– Stopped music on hold on SIP/704-00000000
– <SIP/704-00000000> Playing ‘queue-youarenext.ulaw’ (language ‘en’)
– Told SIP/704-00000000 in 707 their queue position (which was 1)
– <SIP/704-00000000> Playing ‘queue-thankyou.ulaw’ (language ‘en’)
– Started music on hold, class ‘default’, on channel ‘SIP/704-00000000’
– Called Local/[email protected]/n
– – LazyMembers debugging - Numbusies: 0, Nummems: 2
– Executing [[email protected]:1] NoOp(“Local/[email protected];2”, “Call from Sales queue”) in new stack
– Executing [[email protected]:2] Dial(“Local/[email protected];2”, “SIP/708,15,t”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called SIP/708
– SIP/708-00000002 is ringing
– Local/[email protected];1 is ringing
– Nobody picked up in 15000 ms
– – LazyMembers debugging - Numbusies: 0, Nummems: 2
== Spawn extension (from-queue, 708, 2) exited non-zero on ‘Local/[email protected];2’
– Executing [[email protected]:1] Macro(“Local/[email protected];2”, “hangupcall,”) in new stack
– Executing [[email protected]:1] GotoIf(“Local/[email protected];2”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [[email protected]:3] ExecIf(“Local/[email protected];2”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [[email protected]:4] NoOp(“Local/[email protected];2”, "SIP/708-00000002 montior file= ") in new stack
– Executing [[email protected]:5] GotoIf(“Local/[email protected];2”, “1?skipagi”) in new stack
– Goto (macro-hangupcall,s,7)
– Executing [[email protected]:7] Hangup(“Local/[email protected];2”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 7) exited non-zero on ‘Local/[email protected];2’ in macro ‘hangupcall’
== Spawn extension (from-queue, h, 1) exited non-zero on ‘Local/[email protected];2’
– Executing [[email protected]:1] NoOp(“Local/[email protected];2”, “Call from Sales queue”) in new stack
– Executing [[email protected]:2] Dial(“Local/[email protected];2”, “SIP/705,15,t”) in new stack
– Called Local/[email protected]/n
– – LazyMembers debugging - Numbusies: 0, Nummems: 2
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called SIP/705
– SIP/705-00000003 is ringing
– Local/[email protected];1 is ringing
> 0x7f823800b460 – Strict RTP learning after remote address set to: 192.168.1.143:54175
– SIP/705-00000003 answered Local/[email protected];2
– Local/[email protected];1 answered SIP/704-00000000
– Channel SIP/705-00000003 joined ‘simple_bridge’ basic-bridge <4ca4b11f-d667-49e9-ad28-73de78dd78bf>
– Channel Local/[email protected];2 joined ‘simple_bridge’ basic-bridge <4ca4b11f-d667-49e9-ad28-73de78dd78bf>
– <Local/[email protected];1> Playing ‘queue-reporthold.ulaw’ (language ‘en’)
– <Local/[email protected];1> Playing ‘digits/40.ulaw’ (language ‘en’)
– <Local/[email protected];1> Playing ‘digits/9.ulaw’ (language ‘en’)
– <Local/[email protected];1> Playing ‘queue-seconds.ulaw’ (language ‘en’)
– Stopped music on hold on SIP/704-00000000
– Channel Local/[email protected];1 joined ‘simple_bridge’ basic-bridge <1a57924b-90a6-4bf2-a566-e1af30516bb1>
– Channel SIP/704-00000000 joined ‘simple_bridge’ basic-bridge <1a57924b-90a6-4bf2-a566-e1af30516bb1>
– Channel SIP/705-00000003 left ‘simple_bridge’ basic-bridge <4ca4b11f-d667-49e9-ad28-73de78dd78bf>
– Channel Local/[email protected];2 left ‘simple_bridge’ basic-bridge <4ca4b11f-d667-49e9-ad28-73de78dd78bf>
== Spawn extension (from-queue, 705, 2) exited non-zero on ‘Local/[email protected];2’
– Executing [[email protected]:1] Macro(“Local/[email protected];2”, “hangupcall,”) in new stack
– Executing [[email protected]:1] GotoIf(“Local/[email protected];2”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [[email protected]:3] ExecIf(“Local/[email protected];2”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [[email protected]:4] NoOp(“Local/[email protected];2”, "SIP/705-00000003 montior file= ") in new stack
– Executing [[email protected]:5] GotoIf(“Local/[email protected];2”, “1?skipagi”) in new stack
– Goto (macro-hangupcall,s,7)
– Executing [[email protected]:7] Hangup(“Local/[email protected];2”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 7) exited non-zero on ‘Local/[email protected];2’ in macro ‘hangupcall’
== Spawn extension (from-queue, h, 1) exited non-zero on ‘Local/[email protected];2’
– Channel Local/[email protected];1 left ‘simple_bridge’ basic-bridge <1a57924b-90a6-4bf2-a566-e1af30516bb1>
– Channel SIP/704-00000000 left ‘simple_bridge’ basic-bridge <1a57924b-90a6-4bf2-a566-e1af30516bb1>
== Spawn extension (from-internal, 707, 51) exited non-zero on ‘SIP/704-00000000’
– Executing [[email protected]:1] Macro(“SIP/704-00000000”, “hangupcall”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/704-00000000”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [[email protected]:3] ExecIf(“SIP/704-00000000”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [[email protected]:4] NoOp(“SIP/704-00000000”, "Local/[email protected];1 montior file= ") in new stack
– Executing [[email protected]:5] GotoIf(“SIP/704-00000000”, “1?skipagi”) in new stack
– Goto (macro-hangupcall,s,7)
– Executing [[email protected]:7] Hangup(“SIP/704-00000000”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 7) exited non-zero on ‘SIP/704-00000000’ in macro ‘hangupcall’
== Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/704-00000000’

The first GotoIf will never be true, as you don’t have the g option set on Dial.

Handling busy, and congestion the same as a successful call seems strange.

Hello @david55 , thanks for this, so I should have it like this:
[from-queue]
exten => 705,1,NoOp(Call from Sales queue)
exten => 705,n,Dial(SIP/705,15,t,g)
exten => 705,n,GotoIf($["${DIALSTATUS}"=“ANSWER”]?answered)
exten => 705,n(answered),AGI(test.php)

exten => 708,1,NoOp(Call from Sales queue)
exten => 708,n,Dial(SIP/708,15,t,g)
exten => 708,n,GotoIf($["${DIALSTATUS}"=“ANSWER”]?answered)
exten => 708,n(answered),AGI(test.php)

As for handling congestion & busy, I am thinking since this are two agents in a queue, the only dial status I am interested in should be answer & noanswer.
Or should i add where to go to in case of the other two, and how exactly should i handle that, by adding additional gotoifs or?

Are you trying to use FreePBX queues or make your own queue system?

You can’t put the [from-queue] context into extensions_custom.conf.

Hello @billsimon I am using freepbx queues, I created a queue called Sales from the freepbx GUI.
Which context should I add in extensions_custom.conf file then?

None… you should not do anything with extensions_custom.conf…

Explain more fully how you want to customize the FreePBX queue behavior.

So the Sales queue has two members registered on softphones, once a call comes in, if not answered it should ring in the next agent, but once picked, I want to execute a php script which will capture the details of the caller. I selected rrmemory ring strategy when creating the queue in freepbx.

There is no queue referenced in the dialplan!

Options are a single, top level, parameter of Dial; there should be no comma between.

A GoTo to a label on the next line is redundant, even if conditional.

@david55 kindly explain further on referencing a queue in the dial plan.

Queues can only be referenced by the Queue application (and associated variables and function, or less directly, by dialling local channels which, in turn, run Queue().

I am dialing local channels in my case.

SIP/705 is not a local channel.

Any resource you can point me to that can help me learn more on this @david55 or any advice on what I should change to enable continuation of the script after Dial application?

What you’re describing just sounds like CDR. Go into more detail. Do you want a screen popup? Zulu and the CRM module can help here.

Assuming the main goal here is this one thing:

If your plan is to run a script whenever a queue agent is dialed or when the queue agent terminates a call, that’s fairly simple using the dialplan hooks described here.

If you want the script to run on answer, see this thread: Perform a custom dialplan action on extension answer

1 Like

You can also use QGOSUB to execute anything once a queue call gets answered.

1 Like

And pitzkey reminded me of this thread Using Dynamic Routes to run a dialplan sub when queue agent answers

1 Like

Thanks @lgaetz I wil try the above and the dynamic route option by tomorrow. @billsimon yes I want a pop after I have run my script which will basically check whether we have that number in our customers DB, and display the name to the agent so that they are aware who they are talking to on ANSWERING, unfortunately I don’t want proprietary plugins, because I believe i can achieve this without.

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