Hi,
There’s a similar issue: QUEUESTATUS for Abandoned Call but I start a new topic with a more detailed approach.
The QUEUESTATUS variable is not available in the extension h when the caller hangup (abandoned call). This happens with asterisk 18 with PJSIP channel driver, in asterisk 1.8 with chan_sip the variable is propagated without no problem.
If the queue times out, the variable QUEUESTATUS is available in the next priority when continue extension dialplan execution.
I think the problem is caused by the PJSIP variable handling isolating them in several channels.
Other variables link PLAYBACKSTATUS are propagated from the Playback application and also other variables from the Queue: QUEUEPOSITION, QEORIGINALPOS, QEHOLDTIME
I also tried to get the QUEUESTATUS variable with IMPORT function without success.
Any idea to retrieve QUEUESTATUS in the hangup extension?
Best Regards.
---- Tech info ----
Asterisk version: 18.0.1
PJPROJECT version: 2.10 (bundled with asterisk)
extensions.conf
exten => 401,1,Answer()
same => n,Playback(custom/bienvenidav3)
same => n,Set(__callerChannel=${CHANNEL})
same => n,Queue(Entrada,tkC)
same => n,Hangup()
exten => h,1,DumpChan()
same => n,NoOp(queuestatus imported: ${IMPORT(${callerChannel},QUEUESTATUS)})
DumpChan on hangup:
Dumping Info For Channel: PJSIP/201-0000002c:
================================================================================
Info:
Name= PJSIP/201-0000002c
Type= PJSIP
UniqueID= 1606301064.314
LinkedID= 1606301064.314
CallerIDNum= 201
CallerIDName= Juan
ConnectedLineIDNum= 200
ConnectedLineIDName=Pedro
DNIDDigits= 401
RDNIS= (N/A)
Parkinglot=
Language= es
State= Up (6)
Rings= 1
NativeFormat= (alaw)
WriteFormat= alaw
ReadFormat= alaw
RawWriteFormat= alaw
RawReadFormat= alaw
WriteTranscode= No
ReadTranscode= No
1stFileDescriptor= -1
Framesin= 307
Framesout= 292
TimetoHangup= 0
ElapsedTime= 0h0m6s
BridgeID= (Not bridged)
Context= colas
Extension= h
Priority= 1
CallGroup= 1
PickupGroup= 1
Application= DumpChan
Data= (Empty)
Blocking_in= (Not Blocking)
Variables:
QUEUEPOSITION=1
QEORIGINALPOS=1
QEHOLDTIME=1
callerChannel=PJSIP/201-0000002c
PLAYBACKSTATUS=SUCCESS
================================================================================
-- Executing [h@testing:2] NoOp("PJSIP/201-0000002c", "queuestatus imported: ") in new stack