Does anyone know how to perform a ChanSpy
simultaneously with paging without blocking a dial?
My goal is to monitor the fax-out
channel via ChanSpy
and listen to the ChanSpy
via paging. I have already tried bevor it’s dial
same => n,Page(PJSIP/1005,qidb(outgoing^addHeader^1))
but then it gets stuck in the addHeader@outgoing
context and the Dial
command same => n,Dial(PJSIP/${NEW_EXTEN}@fax-out,20)
is not executed within the fax-out
context!
extensions.conf:
[fax-out]
exten => _0.,1,NoOp(Sending call to ${EXTEN})
same => n,Set(DEVICE_STATE(Custom:555)=INUSE) ; Hint for ChanSpy BLF
same => n,Set(CALLEEID=${EXTEN})
same => n,Set(CALLEEID=${CALLEEID:1})
same => n,Set(CALLEEID=+1${CALLEEID})
same => n,Set(CLEANED_NUMBER=${EXTEN})
same => n,Set(FAXOPT(gateway)=yes)
same => n,Set(CALLERID(num)=+1 23 45 67 89)
same => n,Set(NEW_EXTEN=0${EXTEN:1})
< — HERE I WANT PAGEGING AND CHANSPY WITHOUT BLOCKING DIAL FOR FAX-OUT (maybe my existing extensions 500 and 2000 ?) —>
same => n,Dial(PJSIP/${NEW_EXTEN}@fax-out,20)
same => n,Hangup()
exten => h,1,Set(DEVICE_STATE(Custom:555)=NOT_INUSE)[outgoing]
exten => 2000,1,Answer()
exten => addHeader,1,Set(PJSIP_HEADER(add,Call-Info)=“;answer-after=0)”)
same => n,Return()
exten => 2000,n,Page(PJSIP/1005,qidb(outgoing^addHeader^1))[outgoing]
exten => 555,1,Answer()
same => n,ChanSpy(PJSIP/fax-,q) ; Channels begins with “fax-” only
same => n,Hangup()
Something like this also doesn’t work:
exten => _0.,2,Dial(PJSIP/${NEW_EXTEN}@fax-out,20,G(3))
exten => _0.,3,Page(PJSIP/1005,qidb(outgoing^addHeader^1))