[custom-survey-dest] exten => s,1,Answer() same => n,Wait(1) same => n,Set(CALLID=${UNIQUEID}) same => n,NoOp(=== Starting Custom Survey ===) same => n,AGI(/var/www/ccsystem/artisan,"agi:survey-handler") same => n,Hangup() [custom-gln-dest] exten => s,1,Answer() same => n,NoOp(=== Starting Custom GLN Capture ===) same => n,AGI(/var/www/ccsystem/artisan,"agi:gln-handler") same => n,Hangup() [custom-ButOnOrder-dest] exten => s,1,NoOp(=== Storing Order Callback Number ===) same => n,AGI(/var/www/ccsystem/artisan,"agi:order-callback-handler") same => n,Hangup() [custom-dynamic-router] exten => s,1,NoOp(Starting Dynamic Laravel Router) same => n,Answer() same => n,AGI(/var/www/ccsystem/artisan,"agi:dynamic-router") same => n,NoOp(Laravel returned: ${NEXT_DEST}) same => n,GotoIf($["${NEXT_DEST}" != ""]?${NEXT_DEST}:ivr-default,s,1) same => n,Hangup() [from-internal-custom] ; WebRTC browser spy: dial spy to ChanSpy on a live channel ; e.g. sip:spy1001@domain → ChanSpy(PJSIP/1001,qvs) exten => _spy.,1,NoOp(Browser ChanSpy on PJSIP/${EXTEN:3}) same => n,Answer() same => n,Wait(1) same => n,ChanSpy(PJSIP/${EXTEN:3},qvs) same => n,Hangup() ; WebRTC browser whisper: dial whisper — only the agent hears the supervisor ; Uses W (uppercase) = private whisper: monitored channel hears you, the customer does NOT exten => _whisper.,1,NoOp(Browser Whisper on PJSIP/${EXTEN:7}) same => n,Answer() same => n,Wait(1) same => n,ChanSpy(PJSIP/${EXTEN:7},qvw) same => n,Hangup() ; WebRTC browser barge: dial barge — all parties hear the supervisor ; Uses w (lowercase) = whisper/barge: both agent and customer hear you exten => _barge.,1,NoOp(Browser Barge on PJSIP/${EXTEN:5}) same => n,Answer() same => n,Wait(1) same => n,ChanSpy(PJSIP/${EXTEN:5},qvw) same => n,Hangup() [from-internal-noxfer-custom] [from-pstn-custom] [restapps-device-hints] [ext-meetme] [ext-did-post-custom] [app-recordings] [grps] [vmblast-grp] [masking-operator] exten => s,1,Answer() same => n,AGI(/var/www/ccsystem/artisan,"agi:handler") same => n,Set(TARGET_NUMBER=${TARGET_NUMBER}) same => n,Dial(PJSIP/${TARGET_NUMBER}@pri,50) same => n,Gosub(handle-call-result,s,1) same => n,Background(ar/custom/ar-thanks-hangup-now) same => n,Hangup() ;same => n,Set(VALID_NUMBER=0) ; Initialize a variable to track number validity ;same => n,Set(CALLERID=${CALLERID(num)}) ;same => n,Set(MASKING_AGI_SCRIPT_URL=http://127.0.0.1/agi-script/getoperator) ;same => n,Set(MASKING_AGI_RESULT=${CURL(${MASKING_AGI_SCRIPT_URL}?caller_id=${CALLERID})}) ;exten => s,n,NoOp("-----------------------------------") ;exten => s,n,NoOp(${MASKING_AGI_RESULT}) ;exten => s,n,NoOp("-----------------------------------") ; Check if the dialed number is valid. You can customize this part. ;same => n,GotoIf($["${LEN(MASKING_AGI_RESULT)}" != "11"]?invalid_number) ;same => s,n,GotoIf($[${LEN(${MASKING_AGI_RESULT})} != "11"]?invalid_number) same => n,MixMonitor(${UNIQUEID}.wav) same => n,Playback(custom/connecting-message) ;same => n,Dial(PJSIP/${MASKING_AGI_RESULT}@pri,50) ; If the dial fails, playback an error message. same => n,GotoIf($["${DIALSTATUS}" = "BUSY"]?busy) same => n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?noanswer) same => n,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL"]?chanunavail) ; If there's an unknown error, play a generic error message. same => n(unknown_error),Playback(error) same => n,Hangup() ; Handle various dial status cases same => n(busy),Playback(beeperr) same => n,Hangup() same => n(noanswer),Playback(beeperr) same => n,Hangup() same => n(chanunavail),Playback(beeperr) same => n,Hangup() ; If the number is not valid, play an error message. same => n(invalid_number),Playback(beeperr) same => n,Hangup() [handle-call-result] exten => s,1,Set(RESULT=${DIALSTATUS}) exten => s,n,GotoIf($["${RESULT}"="ANSWER"]?call-successful,1) exten => s,n,GotoIf($["${RESULT}"="BUSY"]?call-busy,1) exten => s,n,GotoIf($["${RESULT}"="NOANSWER"]?call-no-answer,1) exten => s,n,Goto(call-failure,1) exten => call-successful,1,NoOp(Call was successful) exten => call-successful,n,Return() exten => call-busy,1,NoOp(Call was busy) ;exten => call-busy,n,Playback(ar/custom/ar-number-busy) exten => call-busy,n,Return() exten => call-no-answer,1,NoOp(Call had no answer) exten => call-no-answer,n,Playback(ar/custom/ar-no-answer) exten => call-no-answer,n,Return() exten => call-failure,1,NoOp(Call failed for an unknown reason) exten => call-failure,n,Return() [macro-hangupcall-custom] exten => s,1,NoOp(Executing macro-hangupcall-custom) exten => s,n,Gosub(crm-hangup,s,1()) exten => s,n,Return() [from-internal] exten => 5555,1,Answer() same => n,Wait(1) same => n,Read(SPYNUM,agent-newlocation) same => n,Set(FULLNUM=99${SPYNUM}) same => n,ChanSpy(PJSIP/${FULLNUM},qvs) same => n,Hangup()