• При звонке извне на внутренний номер сотрудника переадресация ему на сотовый не проходит?

    @jumbet Автор вопроса
    Решение найдено

    Столкнулся с этой проблемой при переносе конфига на новый сервер, как и писал выше
    поправить нужно тут:
    /etc/asterisk/extensions_override_freepbx.conf

    [from-trunk-sip-MTS_trunk]
    include => from-trunk-sip-MTS_trunk
    exten => _.,1,Set(GROUP()=OUT_2)
    exten => _.,2,Set(NUM=${SIP_HEADER(TO):5})
    exten => _.,3,Set(NUM=${CUT(NUM,@,1)})                                                         
    exten => _.,n,Goto(from-trunk,${NUM},1)
    
    
    
    [macro-user-callerid]
    include => macro-user-callerid-custom
    exten => lang-playback,1,GosubIf($[${DIALPLAN_EXISTS(macro-user-callerid,${CHANNEL(language)})}]?macro-user-callerid,${CHANNEL(language)},${ARG1}():macro-user-callerid,en,${ARG1}())
    exten => lang-playback,n,Return()
    
    exten => s,1,Set(TOUCH_MONITOR=${UNIQUEID})
    exten => s,n,Dumpchan(6)
    exten => s,n,Set(AMPUSER=${IF($["${AMPUSER}" = ""]?${CALLERID(number)}:${AMPUSER})})
    exten => s,n,ExecIf($["${LEN(${AMPUSER})}" != "4" || "${LEN(${AMPUSER})}" != "3"]?Set(AMPUSER=${PICKUPMARK})
    exten => s,n,Set(HOTDESCKCHAN=${CUT(CHANNEL,/,2)})
    exten => s,n,Set(HOTDESKEXTEN=${CUT(HOTDESCKCHAN,-,1)})
    exten => s,n,Set(HOTDESKCALL=0)
    exten => s,n,ExecIf($["${DB(EDEVICE/${HOTDESKEXTEN}/user)}"="DummyUser"]?Set(HOTDESKCALL=1))
    exten => s,n,ExecIf($[${HOTDESKCALL}=1]?Set(CALLERID(name)=${DB(EDEVICE/${HOTDESKEXTEN}/location)}))
    exten => s,n,GotoIf($["${CUT(CHANNEL,@,2):5:5}"="queue" | ${LEN(${AMPUSERCIDNAME})}]?report)
    exten => s,n,ExecIf($["${REALCALLERIDNUM:1:2}" = ""]?Set(REALCALLERIDNUM=${CALLERID(number)}))
    exten => s,n,Set(AMPUSER=${DB(DEVICE/${REALCALLERIDNUM}/user)})
    exten => s,n,GotoIf($["${AMPUSER}" = "none"]?limit)
    exten => s,n,ExecIf($["${LEN(${AMPUSER})}" != "4" || "${LEN(${AMPUSER})}" != "3"]?Set(AMPUSER=${PICKUPMARK})
    exten => s,n,Set(AMPUSERCIDNAME=${DB(AMPUSER/${AMPUSER}/cidname)})
    exten => s,n,ExecIf($["${ARG2}" != "EXTERNAL" & ${DB_EXISTS(AMPUSER/${AMPUSER}/cidnum)} & "${AMPUSER}" != "${DB(AMPUSER/${AMPUSER}/cidnum)}"]?Set(__CIDMASQUERADING=TRUE))
    exten => s,n,GotoIf($["${AMPUSERCIDNAME:1:2}" = ""]?report)
    exten => s,n,Set(AMPUSERCID=${IF($["${ARG2}" != "EXTERNAL" & "${DB_EXISTS(AMPUSER/${AMPUSER}/cidnum)}" = "1"]?${DB_RESULT}:${AMPUSER})})
    exten => s,n,Set(__DIAL_OPTIONS=${IF($["${DB_EXISTS(AMPUSER/${AMPUSER}/dialopts)}" = "1"]?${DB_RESULT}:${DIAL_OPTIONS})})
    exten => s,n,Set(CALLERID(all)="${AMPUSERCIDNAME}" <${AMPUSERCID}>)
    exten => s,n,ExecIf($["${DB(DEVICE/${ARG2}/tech)}"="custom"]?Set(CUSDIAL=${CUT(CUT(DB(DEVICE/${ARG2}/dial),/,2),@,1)}))
    exten => s,n,ExecIf($["${DB(DEVICE/${ARG2}/tech)}"="custom" & "${DB(DEVICE/${CUSDIAL}/type)}" =""]?Set(CALLERID(all)=${IF($[${LEN(${DB(AMPUSER/${ARG2}/outboundcid)})}]?${DB(AMPUSER/${ARG2}/outboundcid)}:${CALLERID(all)})}))
    exten => s,n,GotoIf($["${ARG1}"="LIMIT" & ${LEN(${AMPUSER})} & ${DB_EXISTS(AMPUSER/${AMPUSER}/concurrency_limit)} & ${DB(AMPUSER/${AMPUSER}/concurrency_limit)}>0 & ${GROUP_COUNT(${AMPUSER}@concurrency_limit)}>=${DB(AMPUSER/${AMPUSER}/concurrency_limit)}]?limit)
    exten => s,n,ExecIf($["${ARG1}"="LIMIT" & ${LEN(${AMPUSER})}]?Set(GROUP(concurrency_limit)=${AMPUSER}))
    exten => s,n,ExecIf($["${DB(AMPUSER/${AMPUSER}/language)}" != ""]?Set(CHANNEL(language)=${DB(AMPUSER/${AMPUSER}/language)}))
    exten => s,n(report),Noop(Macro Depth is ${MACRO_DEPTH})
    exten => s,n,GotoIf($["${MACRO_DEPTH}" = "" | ${MACRO_DEPTH} < 6 ]?report2:macroerror)
    exten => s,n(report2),GotoIf($[ "${ARG1}" = "SKIPTTL" | "${ARG1}" = "LIMIT" ]?continue)
    exten => s,n,ExecIf($["${CALLEE_ACCOUNCODE}" = ""]?Set(__CALLEE_ACCOUNCODE=${DB(AMPUSER/${IF($["${MACRO_CONTEXT}"="macro-exten-vm"]?${ARG2}:${MACRO_EXTEN})}/accountcode)}))
    exten => s,n(report3),Set(__TTL=${IF($["foo${TTL}" = "foo"]?64:$[ ${TTL} - 1 ])})
    exten => s,n,GotoIf($[ ${TTL} > 0 ]?continue)
    exten => s,n,Wait(${RINGTIMER})
    exten => s,n,Answer
    exten => s,n,Wait(1)
    exten => s,n,Gosub(macro-user-callerid,lang-playback,1(hook_0))
    exten => s,n,Macro(hangupcall,)
    exten => s,n(macroerror),Noop(Macro Limit Reached. Aborting Call)
    exten => s,n,Answer
    exten => s,n,Wait(1)
    exten => s,n,Gosub(macro-user-callerid,lang-playback,1(hook_2))
    exten => s,n,Macro(hangupcall,)
    exten => s,n(limit),Answer
    exten => s,n,Wait(1)
    exten => s,n,Gosub(macro-user-callerid,lang-playback,1(hook_1))
    exten => s,n,Macro(hangupcall,)
    exten => s,n,Congestion(20)
    exten => s,n(continue),Set(CALLERID(number)=${CALLERID(number):0:40})
    exten => s,n,ExecIf($["${LEN(${CALLERID(number)})}" != "4" || "${LEN(${CALLERID(number)})}" != "3"]?Set(CALLERID(number)=${PICKUPMARK})
    exten => s,n,Set(CALLERID(name)=${CALLERID(name):0:40})
    exten => s,n,GotoIf($["${CALLERID(name)}" = ""]?cnum)
    exten => s,n,Set(CDR(cnam)=${CALLERID(name)})
    exten => s,n(cnum),Set(CDR(cnum)=${CALLERID(num)})
    exten => s,n,Set(CHANNEL(language)=${MASTER_CHANNEL(CHANNEL(language))})
    
    exten => h,1,Macro(hangupcall,)
    
    exten => en,1(hook_0),Playback(im-sorry&an-error-has-occurred&with&call-forwarding)
    exten => en,n,Return()
    exten => en,n(hook_1),Playback(beep&im-sorry&your&simul-call-limit-reached&goodbye)
    exten => en,n,Return()
    exten => en,n(hook_2),Playback(im-sorry&an-error-has-occurred)
    exten => en,n,Return()
    
    exten => ja,1(hook_0),Playback(im-sorry&call-forwarding&jp-no&an-error-has-occured)
    exten => ja,n,Return()
    exten => ja,n(hook_1),Playback(beep&im-sorry&simul-call-limit-reached)
    exten => ja,n,Return()
    exten => ja,n(hook_2),Playback(im-sorry&an-error-has-occured)
    exten => ja,n,Return()
    
    ;--== end of [macro-user-callerid] ==--;


    что тут происходит понятия не имею, лишь предполагаю что запихивает звонок в свободный исходящий транк, подкорректируйте под себя, и на здоровье
    Ответ написан
    Комментировать