Hello.
I am trying to implement call monitoring feature on my dialplan. I have agent with 6001 extension in the sale queue and a supervisor with extension 6002 outside the queue. When caller and 6001 agent connect each other, I logged to my softphone using 6002 extesnion and I tried to barge the call dialing 557. But only the agent heard me not the caller. This is my extensions.conf codes.
[general]
static=yes
writeprotect=no
autofallthrough=yes
dtmfmode=rfc2833
;[outbound-calls]
; Context for handling specific outbound call scenarios
;exten => _XXXXXXX.,1,NoOp(Making outbound call to ${EXTEN})
; same => n, Set(CALLERID(num)=0112019511)
; Dial the number and set the call to jump to priority 2 if the call is answered
;same => n, Dial(PJSIP/${EXTEN}@my_sip_trunk,30,g)
; Priority 2, execute if the call is answered
;same => n, Background(welcome_en)
;same => n, Hangup()
[outboundB]
[outbound-calls]
exten => _XXXXXXX.,1,NoOp(Calling ${EXTEN})
same => n, Set(CALLERID(num)=0112019511)
same => n, Dial(PJSIP/${EXTEN}@my_sip_trunk,30,b(hello-context^s^1))
same => n, Hangup()
[hello-context]
exten => s,1,NoOp(Playing hello message)
same => n, Answer()
same => n, Playback(hello-world)
same => n, Hangup()
[play-hello-then-queue]
exten => s,1,NoOp(Start play-hello-then-queue)
same => n,Answer()
same => n,Wait(2) ; Let RTP settle
same => n,Playback(silence/1) ; Send 1s of silence to trigger RTP response
;same => n,Wait(1)
same => n,AMD()
same => n,NoOp(AMD Status: ${AMDSTATUS})
same => n,GotoIf($[“${AMDSTATUS}” = “HUMAN” | “${AMDSTATUS}” = “NOTSURE”]?playmessage)
same => n,Hangup()
exten => s,n(playmessage),NoOp(Human detected, playing message)
same => n,Playback(Welcome-to-DMS-Electronic-1)
same => n,Queue(sale,tT)
same => n,Hangup()[testing]
;exten => _0112019510,1,NoOp(Incoming call from ${CALLERID(num)})
;same => n,Playback(hello-world) ; play once to caller first
;same => n,Set(FWDNUM=0773451602)
;same => n,Dial(PJSIP/6001)
;same => n,Hangup()
exten => 0112019510,1,NoOp(Incoming call from ${CALLERID(num)})
same => n,Set(DATETIME=${STRFTIME(${EPOCH},%Y%m%d%H%M%S)})
same => n,Set(ANI=${CALLERID(num)})
same => n,Set(DNIS=${EXTEN})
same => n,Set(FILENAME=${DATETIME}_${ANI}-${DNIS}.wav)
same => n,MixMonitor(${FILENAME},a) ; Start recording
same => n,Set(CDR(recordings)=${FILENAME})
same => n,Playback(hello-world) ; play once to caller first
same => n,Set(FWDNUM=0773451602)
same => n,Set(SPYGROUP=sale)
same => n,Queue(sale,tT)
same => n,Hangup()
exten => _0112019512,1,NoOp(Incoming call from ${CALLERID(num)})
same => n,Playback(hello-world) ; play once to caller first
same => n,Set(FWDNUM=0773451602)
same => n,Dial(PJSIP/500)
same => n,Hangup()
exten => _0112019511,1,NoOp(Incoming call from ${CALLERID(num)})
same => n,Playback(hello-world) ; play once to caller first
;same => n,Set(FWDNUM=0773451602)
;same => n,Dial(PJSIP/${FWDNUM}@gw-outgoing,30,U(play-after-answer))
same => n,Hangup()
; Context for handling specific outbound call scenarios
exten => _XXXXXXX.,1,NoOp(Making outbound call to ${EXTEN})
same => n, Set(CALLERID(num)=0112019511)
; Dial the number and set the call to jump to priority 2 if the call is answered
same => n, Dial(PJSIP/${EXTEN}@gw-outgoing,30,g)
;same => n,Dial(PJSIP/${EXTEN}@gw-outgoing,30,U(play-after-answer))
; Priority 2, execute if the call is answered
;same => n, Background(welcome_en)
same => n, Hangup()
[play-after-answer]
exten => s,1,NoOp(Playing hello-world 5 times and welcome message to callee after answer)
same => n,Wait(2)
same => n,Playback(Welcome-to-DMS-Electronic-1)
same => n,Return()
[play-hello]
exten => s,1,NoOp(Playing hello-world 5 times)
same => n,Set(i=0)
same => n(loop),Playback(hello-world)
same => n,Set(i=$[${i} + 1])
same => n,GotoIf($[${i} < 5]?loop)
same => n,Return()
[dmse_IVR]
exten => s,1,Answer()
same => n,Set(FILENAME=/var/log/asterisk/call_log.txt)
same => n,Set(CALL_DETAILS=${STRFTIME(${EPOCH},%Y-%m-%d %H:%M:%S)} - Caller ID: ${CALLERID(num)}, Button Pressed: 2, Unique ID:${CONFID})
same => n,System(echo “${CALL_DETAILS}” >> ${FILENAME})
same => n,Set(TEST_MESSAGE=Testing logging)
same => n,System(echo “${TEST_MESSAGE}” >> ${FILENAME})
same => n,Playback(hello-world)
same => n,Hangup()
; -------------------------
; SUPERVISOR FUNCTIONS (Spy, Coach, Barge)
; -------------------------
[supervisor-spy]
; 555 - Spy (listen only)
exten => 555,1,NoOp(Supervisor Spying on sales group)
;same => n,Authenticate(1234)
same => n,Answer()
same => n,ChanSpy(PJSIP/,q(sale))
same => n,Hangup()
; 556 - Coaching (whisper to agent only)
exten => 556,1,NoOp(Supervisor Coaching sales group)
;same => n,Authenticate(1234)
same => n,Answer()
same => n,ChanSpy(PJSIP/,qw(sale))
same => n,Hangup()
; 557 - Barging (join call fully)
exten => 557,1,NoOp(Supervisor Barging sales group)
;same => n,Authenticate(1234)
same => n,Answer()
same => n,ChanSpy(PJSIP/,qB(sale))
same => n,Hangup()
; Context for handling specific outbound call scenarios
exten => _XXXXXXX.,1,NoOp(Making outbound call to ${EXTEN})
same => n, Set(CALLERID(num)=0112019511)
; Dial the number and set the call to jump to priority 2 if the call is answered
same => n, Dial(PJSIP/${EXTEN}@gw-outgoing,30,g)
;same => n,Dial(PJSIP/${EXTEN}@gw-outgoing,30,U(play-after-answer))
; Priority 2, execute if the call is answered
;same => n, Background(welcome_en)
same => n, Hangup()
type or paste code here