Да, в качестве GUI - FreePBX12.
Вот записи extenstion_additional.conf отвечающие за входящий и переадресацию.
Код: Выделить всё
[ext-did-0002]
include => ext-did-0002-custom
exten => fax,1,Goto(${CUT(FAX_DEST,^,1)},${CUT(FAX_DEST,^,2)},${CUT(FAX_DEST,^,3)})
exten => 123456,1,Set(__DIRECTION=INBOUND)
exten => 123456,n,Gosub(sub-record-check,s,1(in,${EXTEN},dontcare))
exten => 123456,n,Gosub(app-blacklist-check,s,1())
exten => 123456,n,Set(__FROM_DID=${EXTEN})
exten => 123456,n,Set(CDR(did)=${FROM_DID})
exten => 123456,n,ExecIf($[ "${CALLERID(name)}" = "" ] ?Set(CALLERID(name)=${CALLERID(num)}))
exten => 123456,n,Set(CHANNEL(musicclass)=default)
exten => 123456,n,Set(__MOHCLASS=default)
exten => 123456,n,GotoIf($["${__REVERSAL_REJECT}"="TRUE" & "${CHANNEL(reversecharge)}"="1" ]?macro-hangupcall)
exten =>123456,n,Set(__CALLINGPRES_SV=${CALLERPRES()})
exten => 123456,n,Set(CALLERPRES()=allowed_not_screened)
exten => 123456,n(dest-ext),Goto(from-did-direct,101,1)
;--== end of [ext-did-0002] ==--;
Код: Выделить всё
[ext-trunk]
include => ext-trunk-custom
exten => 1,1,Set(TDIAL_STRING=DAHDI/g0)
exten => 1,n,Set(DIAL_TRUNK=1)
exten => 1,n,Goto(ext-trunk,tdial,1)
exten => 2,1,Set(TDIAL_STRING=SIP/123456-zadarma)
exten => 2,n,Set(DIAL_TRUNK=2)
exten => 2,n,Goto(ext-trunk,tdial,1)
exten => tdial,1,Set(OUTBOUND_GROUP=OUT_${DIAL_TRUNK})
exten => tdial,n,GotoIf($["${OUTMAXCHANS_${DIAL_TRUNK}}" = ""]?nomax)
exten => tdial,n,GotoIf($[${GROUP_COUNT(OUT_${DIAL_TRUNK})} >= ${OUTMAXCHANS_${DIAL_TRUNK}}]?hangit)
exten => tdial,n(nomax),ExecIf($["${CALLINGPRES_SV}" != ""]?Set(CALLERPRES()=${CALLINGPRES_SV}))
exten => tdial,n,Set(DIAL_NUMBER=${FROM_DID})
exten => tdial,n,GosubIf($["${PREFIX_TRUNK_${DIAL_TRUNK}}" != ""]?sub-flp-${DIAL_TRUNK},s,1())
exten => tdial,n,Set(OUTNUM=${OUTPREFIX_${DIAL_TRUNK}}${DIAL_NUMBER})
exten => tdial,n,Set(DIAL_TRUNK_OPTIONS=${IF($["${DB_EXISTS(TRUNK/${DIAL_TRUNK}/dialopts)}" = "1"]?${DB_RESULT}:${TRUNK_OPTIONS})})
exten => tdial,n,Dial(${TDIAL_STRING}/${OUTNUM}${TDIAL_SUFFIX},${TRUNK_RING_TIMER},${DIAL_TRUNK_OPTIONS})
exten => tdial,n,Set(CALLERID(number)=${CALLERID(number):0:40})
exten => tdial,n,Set(CALLERID(name)=${CALLERID(name):0:40})
exten => tdial,n(hangit),Hangup
;--== end of [ext-trunk] ==--;
Код: Выделить всё
[from-trunk-sip-123456-zadarma]
include => from- trunk-sip-123456-zadarma-custom
exten => _.,1,Set(GROUP()=OUT_2)
exten => _.,n,Goto(from-trunk,${EXTEN},1)
;--== end of [from-trunk-sip-123456-zadarma] ==--;
FollowME
Код: Выделить всё
exten => FM101,1,Goto(101,FM101)
exten => 101,1,GotoIf($[ "${DB(AMPUSER/101/followme/ddial)}" = "EXTENSION" ]?ext-local,101,1)
exten => 101,n(FM101),Macro(user-callerid,)
exten => 101,n,Set(DIAL_OPTIONS=${DIAL_OPTIONS}I)
exten => 101,n,Set(CONNECTEDLINE(num,i)=101)
exten => 101,n,Gosub(sub-presencestate-display,s,1(101))
exten => 101,n,Set(CONNECTEDLINE(name)=${DB(AMPUSER/101/cidname)}${PRESENCESTATE_DISPLAY})
exten => 101,n,Set(FM_DIALSTATUS=${EXTENSION_STATE(101@ext-local)})
exten => 101,n,Set(__EXTTOCALL=${EXTEN})
exten => 101,n,Set(__PICKUPMARK=${EXTEN})
exten => 101,n,Macro(blkvm-setifempty,)
exten => 101,n,GotoIf($["${GOSUB_RETVAL}" = "TRUE"]?skipov)
exten => 101,n,Macro(blkvm-set,reset)
exten => 101,n,Set(__NODEST=)
exten => 101,n(skipov),Set(RRNODEST=${NODEST})
exten => 101,n(skipvmblk),Set(__NODEST=${EXTEN})
exten => 101,n,GosubIf($[${DB_EXISTS(AMPUSER/101/followme/changecid)} = 1 & "${DB(AMPUSER/101/followme/changecid)}" != "default" & "${DB(AMPUSER/101/followme/changecid)}" != ""]?sub-fmsetci$
exten => 101,n,Set(RecordMethod=Group)
exten => 101,n(checkrecord),Gosub(sub-record-check,s,1(exten,101,))
exten => 101,n,GotoIf($[$[ "${DB(AMPUSER/101/followme/prering)}" = "0" ] | $[ "${DB(AMPUSER/101/followme/prering)}" = "" ]] ?skipsimple)
exten => 101,n,Macro(simple-dial,101,${DB(AMPUSER/101/followme/prering)})
exten => 101,n(skipsimple),Set(RingGroupMethod=firstavailable)
exten => 101,n,Set(_FMGRP=101)
exten => 101,n(DIALGRP),GotoIf($[("${DB(AMPUSER/101/followme/grpconf)}"="ENABLED") | ("${FORCE_CONFIRM}"!="") ]?doconfirm)
exten => 101,n,Macro(dial,${DB(AMPUSER/101/followme/grptime)},${DIAL_OPTIONS},${DB(AMPUSER/101/followme/grplist)})
exten => 101,n,Goto(nextstep)
exten => 101,n(doconfirm),Macro(dial-confirm,${DB(AMPUSER/101/followme/grptime)},${DIAL_OPTIONS},${DB(AMPUSER/101/followme/grplist)},101)
exten => 101,n(nextstep),Set(RingGroupMethod=)
exten => 101,n,GotoIf($["foo${RRNODEST}" != "foo"]?nodest)
exten => 101,n,Set(__NODEST=)
Куда именно нужно вставить шаг с Answer???