call reject при занятости абонента.
Добавлено: 05 мар 2021, 09:50
Добрый день коллеги.
при вызове абонента по подобному сценарию (описан ниже) в транк уходит call reject.
Где ошибка?
exten => 7354350,1,NoOP(all phone ring)
same => n,gosub(dial-one,s,1(Radiktest,701))
same => n,Hangup()
[dial-one]
exten => s,1,Set(__DEXTEN=${ARG2}) ;ARG1=client001 ARG2=4000 ARG3=Mohclass
same => n,Set(CDR(accountcode)=${ARG1})
same => n,ExecIf($["${DB(${ARG1}/MONITOR/${DEXTEN})}" = "yes" | "${DB(${ARG1}/MONITOR/${CDR(officenum)})}" ="yes"]?Set(monitorflag=M(monitor^${CALLERID(number)})):Set(monitorflag=))
same => n,ExecIf($["${DB(${ARG1}/MONITOR/${DEXTEN})}" = "yes" | "${DB(${ARG1}/MONITOR/${CDR(officenum)})}" ="yes"]?Set(_mon_fname=/var/spool/asterisk/monitor/${CDR(accountcode)}/${STRFTIME(${EPOCH},,%Y%m%d%H%M)}-${ARG1}-${DEXTEN}):Set(monitorflag=))
same => n,goto(godial,1)
exten => godial,1,noop("CDR(accountcode)=${CDR(accountcode)},DEXTEN=${DEXTEN},DEVICE_STATE=${DEVICE_STATE(sip/${CDR(accountcode)}${DEXTEN})})
same => n,GotoIf($["${DEVICE_STATE(sip/${CDR(accountcode)}${DEXTEN})}" = "BUSY" | "${DEVICE_STATE(sip/${CDR(accountcode)}${DEXTEN})}"="RINGING" | "${DEVICE_STATE(sip/${CDR(accountcode)}${DEXTEN})}" = "UNAVAILABLE" ]?busy,1)
same => n,dial(sip/${CDR(accountcode)}${DEXTEN},${RINGTIMER},tT${ARG3} ${monitorflag}))
same => n,return()
exten => busy,1,return()
при вызове абонента по подобному сценарию (описан ниже) в транк уходит call reject.
Где ошибка?
exten => 7354350,1,NoOP(all phone ring)
same => n,gosub(dial-one,s,1(Radiktest,701))
same => n,Hangup()
[dial-one]
exten => s,1,Set(__DEXTEN=${ARG2}) ;ARG1=client001 ARG2=4000 ARG3=Mohclass
same => n,Set(CDR(accountcode)=${ARG1})
same => n,ExecIf($["${DB(${ARG1}/MONITOR/${DEXTEN})}" = "yes" | "${DB(${ARG1}/MONITOR/${CDR(officenum)})}" ="yes"]?Set(monitorflag=M(monitor^${CALLERID(number)})):Set(monitorflag=))
same => n,ExecIf($["${DB(${ARG1}/MONITOR/${DEXTEN})}" = "yes" | "${DB(${ARG1}/MONITOR/${CDR(officenum)})}" ="yes"]?Set(_mon_fname=/var/spool/asterisk/monitor/${CDR(accountcode)}/${STRFTIME(${EPOCH},,%Y%m%d%H%M)}-${ARG1}-${DEXTEN}):Set(monitorflag=))
same => n,goto(godial,1)
exten => godial,1,noop("CDR(accountcode)=${CDR(accountcode)},DEXTEN=${DEXTEN},DEVICE_STATE=${DEVICE_STATE(sip/${CDR(accountcode)}${DEXTEN})})
same => n,GotoIf($["${DEVICE_STATE(sip/${CDR(accountcode)}${DEXTEN})}" = "BUSY" | "${DEVICE_STATE(sip/${CDR(accountcode)}${DEXTEN})}"="RINGING" | "${DEVICE_STATE(sip/${CDR(accountcode)}${DEXTEN})}" = "UNAVAILABLE" ]?busy,1)
same => n,dial(sip/${CDR(accountcode)}${DEXTEN},${RINGTIMER},tT${ARG3} ${monitorflag}))
same => n,return()
exten => busy,1,return()