Add Global and Per-Group "Disable Forwarding for Group Calls" Option #871
Closed
Weble-xx
started this conversation in
General ( Обо всём )
Replies: 3 comments
|
What do you mean? Give an example of a dialplan |
0 replies
|
If a queue is created with, for example, 8 members, and one of these members has set up call forwarding to their mobile phone on their desk phone, calls to the queue should not be forwarded. My current dial plan sometimes works and sometimes doesn't: [internal-users-custom]
exten => 10,1,NoOp(Checking switch/nightmode for night mode)
same => n,Set(SWITCH_STATUS=${DB(switch/nightmode)})
same => n,GotoIf($["${SWITCH_STATUS}"="0"]?no_night_mode)
same => n,Set(CALLER_FROM_QUEUE=1)
same => n,Queue(QUEUE-C23B86EAA2D53377929BF840EB3B30ED)
same => n,Hangup()
same => n(no_night_mode),NoOp(No night mode active, continuing normal call flow)
same => n,Return()
exten => _X!,1,NoOp(-- Disable call forwarding for group calls --)
same => n,Verbose(1,MF2-Verbose IS_GROUP_CALL is ${IS_GROUP_CALL})
same => n,ExecIf($["${__QUEUE_SRC_CHAN}" != ""]?Set(IS_GROUP_CALL=1))
same => n,Verbose(1,MF2-Verbose IS_GROUP_CALL is ${IS_GROUP_CALL})
same => n,Verbose(1,MF2-Verbose CALLER_FROM_QUEUE is ${CALLER_FROM_QUEUE})
same => n,Verbose(1,MF2-Verbose CALLERID_NUM is ${CALLERID(num)})
same => n,Verbose(1,MF2-Verbose OUTGOING_CID is ${OUTGOING_CID})
same => n,Verbose(1,MF2-Verbose EXTEN is ${EXTEN})
same => n,Verbose(1,MF2-Verbose ISTRANSFER is ${ISTRANSFER})
same => n,Verbose(1,MF2-Verbose CALLERID_ALL is ${CALLERID(all)})
same => n,Verbose(1,MF2-Verbose ORIGINAL_CALLERID is ${ORIGINAL_CALLERID})
same => n,Verbose(1,MF2-Verbose QUEUE_SRC_CHAN is ${QUEUE_SRC_CHAN})
same => n,ExecIf($["${IS_GROUP_CALL}x" == "x"]?Return())
same => n,Gosub(set-dial-contacts,${EXTEN},1)
same => n,ExecIf($["${FIELDQTY(DST_CONTACT,&)}" != "1"]?Set(__PT1C_SIP_HEADER=${EMPTY_VAR}))
same => n,ExecIf($["${TRANSFER_OPTIONS}x" == "x" || "${ISTRANSFER}x" != "x"]?Set(TRANSFER_OPTIONS=Tt))
same => n,ExecIf($["${DST_CONTACT}x" != "x"]?Dial(${DST_CONTACT},${ringlength},${TRANSFER_OPTIONS}iekKHhU(${ISTRANSFER}dial_answer)b(dial_create_chan,s,1)):Set(DIALSTATUS=CHANUNAVAIL))
same => n,ExecIf($["${DST_CONTACT}x" == "x"]?Gosub(dial_end,${EXTEN},1))
same => n(fw_start),NoOp()
same => n,ExecIf($["${ATTENDEDTRANSFER}x" != "x" && "${FW_DISABLE_ATRANSFER}" == "1"]?Set(FW_DISABLE=1))
same => n,ExecIf($["${ISTRANSFER}x" != "x" && "${FW_DISABLE_TRANSFER}" == "1"]?Set(FW_DISABLE=1))
same => n,ExecIf($["${FW_DISABLE}" == "1" && "${FW_DISABLE_INTERNAL}" == "1"]?Goto(${EXTEN},fw_end))
same => n,ExecIf($["${FROM_DID}${TO_CHAN}x" == "x" && "${FW_DISABLE_INTERNAL}" == "1"]?Goto(${EXTEN},fw_end))
same => n,ExecIf($["${DIALSTATUS}" != "ANSWER" && "${ISTRANSFER}x" != "x"]?Goto(internal-fw,${EXTEN},1))
same => n,ExecIf($["${DIALSTATUS}" != "ANSWER" && "${QUEUE_SRC_CHAN}x" == "x"]?Goto(internal-fw,${EXTEN},1))
same => n(fw_end),ExecIf($["${BLINDTRANSFER}x" != "x"]?AGI(check_redirect.php,${BLINDTRANSFER})) Here, I set the "i" option in the Dial() command so that Asterisk ignores any forwarding requests it may receive during the dial attempt. The original dial plan is generated in So, I need the following logic: IF IS_QUEUE_CALLED THEN $conf .= 'same => n,ExecIf($["${DST_CONTACT}x" != "x"]?Dial(${DST_CONTACT},${ringlength},${TRANSFER_OPTIONS}iekKHhU(${ISTRANSFER}dial_answer)b(dial_create_chan,s,1)):Set(DIALSTATUS=CHANUNAVAIL))' . " \n\t";ELSE $conf .= 'same => n,ExecIf($["${DST_CONTACT}x" != "x"]?Dial(${DST_CONTACT},${ringlength},${TRANSFER_OPTIONS}ekKHhU(${ISTRANSFER}dial_answer)b(dial_create_chan,s,1)):Set(DIALSTATUS=CHANUNAVAIL))' . " \n\t"; |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hello,
Would it be possible to add a global "Disable Forwarding for Group Calls" option?
If this option is enabled, the Dial option "i" should be added to group calls.
Additionally, could this option also be configurable per group?
Thanks!
All reactions