Код: Выделить всё
CLI> dialplan show sub-record-chec
у вас вышло из него на 11 приоритете
-- Executing [s@sub-record-check:11] ExecIf("SIP/MSM7495797XXXX-00000053", "1?Return()") in new stack
Код: Выделить всё
CLI> dialplan show sub-record-chec
-- Executing [s@sub-record-check:11] ExecIf("SIP/MSM7495797XXXX-00000053", "1?Return()") in new stack
Код: Выделить всё
asterisk -rx "dialplan show sub-record-check"
[ Context 'sub-record-check' created by 'pbx_config' ]
'conf' => 1. Gosub(recconf,1(${EXTEN},${ARG2},${ARG2})) [pbx_config]
2. Return() [pbx_config]
'exten' => 1. GotoIf($["${REC_POLICY_MODE}"!=""]?callee) [pbx_config]
2. Set(__REC_POLICY_MODE=${IF($[${LEN(${FROM_DID})}]?${DB(AMPUSER/${ARG2}/recording/in/external)}:${DB(AMPUSER/${ARG2}/recording/in/internal)})}) [pbx_config]
3. GotoIf($["${REC_POLICY_MODE}"="dontcare"]?caller) [pbx_config]
4. GotoIf($["${DB(AMPUSER/${FROMEXTEN}/recording/out/internal)}"="dontcare" | "${FROM_DID}"!=""]?callee) [pbx_config]
5. ExecIf($[${LEN(${DB(AMPUSER/${FROMEXTEN}/recording/priority)})}]?Set(CALLER_PRI=${DB(AMPUSER/${FROMEXTEN}/recording/priority)}):Set(CALLER_PRI=0)) [pbx_config]
6. ExecIf($[${LEN(${DB(AMPUSER/${ARG2}/recording/priority)})}]?Set(CALLEE_PRI=${DB(AMPUSER/${ARG2}/recording/priority)}):Set(CALLEE_PRI=0)) [pbx_config]
7. GotoIf($["${CALLER_PRI}"="${CALLEE_PRI}"]?${REC_POLICY}:${IF($[${CALLER_PRI}>${CALLEE_PRI}]?caller:callee)}) [pbx_config]
[callee] 8. GosubIf($["${REC_POLICY_MODE}"="always"]?record,1(${EXTEN},${ARG2},${FROMEXTEN})) [pbx_config]
9. Return() [pbx_config]
[caller] 10. Set(__REC_POLICY_MODE=${DB(AMPUSER/${FROMEXTEN}/recording/out/internal)}) [pbx_config]
11. GosubIf($["${REC_POLICY_MODE}"="always"]?record,1(${EXTEN},${ARG2},${FROMEXTEN})) [pbx_config]
12. Return() [pbx_config]
'force' => 1. GosubIf($["${REC_POLICY_MODE}"="always"]?record,1(${EXTEN},${REC_POLICY_MODE},${FROMEXTEN})) [pbx_config]
2. Return() [pbx_config]
'out' => 1. ExecIf($["${REC_POLICY_MODE}"=""]?Set(__REC_POLICY_MODE=${DB(AMPUSER/${FROMEXTEN}/recording/out/external)})) [pbx_config]
2. GosubIf($["${REC_POLICY_MODE}"="always"]?record,1(exten,${ARG2},${FROMEXTEN})) [pbx_config]
3. Return() [pbx_config]
'page' => 1. GosubIf($["${REC_POLICY_MODE}"="always"]?recconf,1(${EXTEN},${ARG2},${FROMEXTEN})) [pbx_config]
2. Return() [pbx_config]
'q' => 1. GosubIf($["${REC_POLICY_MODE}"="always"]?recq,1(${EXTEN},${ARG2},${FROMEXTEN})) [pbx_config]
2. Return() [pbx_config]
'recconf' => 1. Set(__CALLFILENAME=${IF($[${MEETME_INFO(parties,${ARG2})}]?${DB(RECCONF/${ARG2})}:${ARG1}-${ARG2}-${ARG3}-${TIMESTR}-${UNIQUEID})}) [pbx_config]
2. ExecIf($[!${MEETME_INFO(parties,${ARG2})}]?Set(DB(RECCONF/${ARG2})=${CALLFILENAME})) [pbx_config]
3. Set(MEETME_RECORDINGFILE=${IF($[${LEN(${MIXMON_DIR})}]?${MIXMON_DIR}:${ASTSPOOLDIR}/monitor/)}${YEAR}/${MONTH}/${DAY}/${CALLFILENAME}) [pbx_config]
4. Set(MEETME_RECORDINGFORMAT=${MIXMON_FORMAT}) [pbx_config]
5. ExecIf($["${REC_POLICY_MODE}"!="always"]?Return()) [pbx_config]
6. Set(__REC_STATUS=RECORDING) [pbx_config]
7. Set(CDR(recordingfile)=${CALLFILENAME}.${MON_FMT}) [pbx_config]
8. Return() [pbx_config]
'record' => 1. Set(AUDIOHOOK_INHERIT(MixMonitor)=yes) [pbx_config]
2. MixMonitor(${MIXMON_DIR}${YEAR}/${MONTH}/${DAY}/${CALLFILENAME}.${MIXMON_FORMAT},,${MIXMON_POST}) [pbx_config]
3. Set(__REC_STATUS=RECORDING) [pbx_config]
4. Set(CDR(recordingfile)=${CALLFILENAME}.${MON_FMT}) [pbx_config]
5. Return() [pbx_config]
'recq' => 1. Set(AUDIOHOOK_INHERIT(MixMonitor)=yes) [pbx_config]
2. Set(MONITOR_FILENAME=${MIXMON_DIR}${YEAR}/${MONTH}/${DAY}/${CALLFILENAME}) [pbx_config]
3. MixMonitor(${MONITOR_FILENAME}.${MIXMON_FORMAT},${MONITOR_OPTIONS},${MIXMON_POST}) [pbx_config]
4. Set(__REC_STATUS=RECORDING) [pbx_config]
5. Set(CDR(recordingfile)=${CALLFILENAME}.${MON_FMT}) [pbx_config]
6. Return() [pbx_config]
'rg' => 1. GosubIf($["${REC_POLICY_MODE}"="always"]?record,1(${EXTEN},${REC_POLICY_MODE},${FROMEXTEN})) [pbx_config]
2. Return() [pbx_config]
's' => 1. Set(REC_POLICY_MODE_SAVE=${REC_POLICY_MODE}) [pbx_config]
2. GotoIf($["${BLINDTRANSFER}" = ""]?check) [pbx_config]
3. ResetCDR() [pbx_config]
4. GotoIf($["${REC_STATUS}" != "RECORDING"]?check) [pbx_config]
5. Set(AUDIOHOOK_INHERIT(MixMonitor)=yes) [pbx_config]
6. MixMonitor(${MIXMON_DIR}${YEAR}/${MONTH}/${DAY}/${CALLFILENAME}.${MIXMON_FORMAT},a,${MIXMON_POST}) [pbx_config]
[check] 7. Set(__MON_FMT=${IF($["${MIXMON_FORMAT}"="wav49"]?WAV:${MIXMON_FORMAT})}) [pbx_config]
8. GotoIf($["${REC_STATUS}"!="RECORDING"]?next) [pbx_config]
9. Set(CDR(recordingfile)=${CALLFILENAME}.${MON_FMT}) [pbx_config]
10. Return() [pbx_config]
[next] 11. ExecIf($[!${LEN(${ARG1})}]?Return()) [pbx_config]
12. ExecIf($["${REC_POLICY_MODE}"="" & "${ARG3}"!=""]?Set(__REC_POLICY_MODE=${ARG3})) [pbx_config]
13. GotoIf($["${REC_STATUS}"!=""]?${ARG1},1) [pbx_config]
14. Set(__REC_STATUS=INITIALIZED) [pbx_config]
15. Set(NOW=${EPOCH}) [pbx_config]
16. Set(__DAY=${STRFTIME(${NOW},,%d)}) [pbx_config]
17. Set(__MONTH=${STRFTIME(${NOW},,%m)}) [pbx_config]
18. Set(__YEAR=${STRFTIME(${NOW},,%Y)}) [pbx_config]
19. Set(__TIMESTR=${YEAR}${MONTH}${DAY}-${STRFTIME(${NOW},,%H%M%S)}) [pbx_config]
20. Set(__FROMEXTEN=${IF($[${LEN(${AMPUSER})}]?${AMPUSER}:${IF($[${LEN(${REALCALLERIDNUM})}]?${REALCALLERIDNUM}:unknown)})}) [pbx_config]
21. Set(__CALLFILENAME=${ARG1}-${ARG2}-${FROMEXTEN}-${TIMESTR}-${UNIQUEID}) [pbx_config]
22. Goto(${ARG1},1) [pbx_config]
Include => 'sub-record-check-custom' [pbx_config]
-= 11 extensions (66 priorities) in 1 context. =-
Код: Выделить всё
cat /etc/asterisk/extensions_override_freepbx.conf
[disa]
include => disa-custom
exten => 1,1,Authenticate(4585,)
exten => 1,n,Set(_DISA=disa^1^newcall)
exten => 1,n(newcall),Set(_DISACONTEXT=from-internal)
exten => 1,n,Set(_KEEPCID=TRUE)
exten => 1,n,Set(_HANGUP=${TRUNK_OPTIONS})
exten => 1,n,Set(TIMEOUT(digit)=5)
exten => 1,n,Set(TIMEOUT(response)=30)
exten => 1,n,DISA(no-password,disa-dial)
exten => 1,n(end),Hangup
exten => 3,1,Answer
exten => 3,n,Set(_DISA=disa^3^newcall)
exten => 3,n,Gosub(sub-record-check,s,1(${_DISA},always))
exten => 3,n(newcall),Set(_DISACONTEXT=from-internal)
exten => 3,n,Set(_KEEPCID=TRUE)
exten => 3,n,Set(_HANGUP=${TRUNK_OPTIONS})
exten => 3,n,Set(TIMEOUT(digit)=5)
exten => 3,n,Set(TIMEOUT(response)=30)
exten => 3,n,DISA(no-password,disa-dial)
exten => 3,n(end),Hangup
;--== end of [disa] ==--;
Код: Выделить всё
exten => 3,n,Gosub(sub-record-check,s,14(record))
Код: Выделить всё
exten => 3,n,Gosub(sub-record-check,s,14(record))
Код: Выделить всё
14. Set(__REC_STATUS=INITIALIZED)