Можно почитать об этом очень подробно в книгах по Астериск.
Не надо рассчитывать на индивидуальных раъяснителей.
Код: Выделить всё
[incoming-gsm]
include => incoming-gsm-sms
include => incominng-gsm-ussd
exten => s,1,NoOp(CALLERID = ${CALLERID(num)})
exten => s,n(lbl_incoming-gsm_0),Set(GLOBAL(CID)=${CALLERID(num):-10})
exten => s,n,Set(_CALLERID(num)=${CALLERID(num):-10})
exten => s,n,Verbose(10,!! Printing channel ${CHANNEL} !!)
exten => s,n,AGI(/usr/share/call/call,acr,${CID},${CALLERID(name)},${CHANNEL})
exten => s,n,AGI(/usr/share/call/call,chblm,${CID},${CALLERID(name)})
exten => s,n,GotoIf($["${CALLBACKGSM}" = "OFF"]?:lbl_incoming-gsm_1)
exten => s,n,GotoIf($["${CBGSMOTHER}" = "OFF"]?:lbl_incoming-gsm_3)
exten => s,n(lbl_incoming-gsm_2),AGI(/usr/share/call/call,gin,${CID},${CALLERID(name)})
exten => s,n,Verbose(10,Client of company ${dbname} count rows ${idscount})
exten => s,n,Set(errorscript=OK)
exten => s,n,AGI(/usr/share/call/who-is-who,${CID},${idsdb},${idsname})
exten => s,n,Verbose(10,Result is content ${tocontext}, extension ${toextension})
exten => s,n,GotoIf($[${errorscript} = 1]?:lbl_incoming-gsm_4)
exten => s,n,Goto(incedental-incoming-calls,s,1)
exten => s,n(lbl_incoming-gsm_4),Goto(${tocontext},${toextension},1)
exten => s,n(lbl_incoming-gsm_3),AGI(/usr/share/call/call,ops,${CID})
exten => s,n,Verbose(10,Call from OPSOS - ${OPSOS} voice -${opsosvoice})
exten => s,n,GotoIf($["${OPERTYPE}" = "GSM"]?:lbl_incoming-gsm_1)
exten => s,n,Goto(lbl_incoming-gsm_2)
exten => s,n(lbl_incoming-gsm_1),Goto(callback,s,1)
exten => fcb,1,NoOp(DIALEDID = ${DIALEDID})
exten => fcb,n,Set(CALLERID(num)=${DIALEDID:-10})
exten => fcb,n,Goto(s,lbl_incoming-gsm_0)
[first-registration-city]
exten => s,1,NoOp(Called from channel = ${CHANNEL} CID=${CID} dbname =${idsdb} idsname={idsname} idscityen=${idscityen} idsid =${idsid} device=${device})
exten => s,n,Verbose(10,Add to dial plan params device =${device} idsid=${idsid} idscityen = ${idscityen} idsdb= ${idsdb} idsname = ${idsname})
exten => s,n,Playback(taxi/${idsname}/${DEFAULTLANGUAGE}/hallow)
exten => s,n,GotoIf($["${PLAYBACKSTATUS}" = "SUCCESS"]?:lbl_first-registration-city_0)
exten => s,n(lbl_first-registration-city_0),Playback(taxi/${idsname}/firtst-call-noreg)
exten => s,n,GotoIf($["${PLAYBACKSTATUS}" = "SUCCESS"]?:lbl_first-registration-city_1)
exten => s,n(lbl_first-registration-city_1),Set(TIMEOUT(digit)=120)
exten => s,n,Background(${idsname}/first-call-ivr-checknum&${idsname}/first-call-ivr-checknum2&${idsname}/info-nodtmf)
exten => s,n,Wait(0.1)
exten => s,n,Set(GLOBAL(I)=MATH(${I}+1))
exten => s,n,Verbose(10,Set I=${I})
exten => s,n,GotoIf($["${I}" >= "2"]?:lbl_first-registration-city_1)
exten => s,n,AGI(/usr/share/call/call,acb,${CID},1,${idscityen},${idsdb},${idsname})
exten => s,n(lbl_first-registration-city_2),GotoIf($["${WORKINGTIME}" = "OFF"]?:lbl_first-registration-city_4)
exten => s,n(lbl_first-registration-city_3),Goto(first-registration-city-nodtmf,day,1)
exten => s,n(lbl_first-registration-city_4),GotoIfTime(01:00-7:30,*,*,*?lbl_first-registration-city_3)
exten => s,n,Goto(first-registration-city-nodtmf,day,1)
exten => *,1(lbl_first-registration-city_5),Wait(1)
exten => *,n,AGI(/usr/share/call/call,acb,${CID},7,${idscityen},${idsdb},${idsname})
exten => *,n,AGI(/usr/share/call/call,ops,${CID})
exten => *,n,Playback(general/first-call-thks-reg)
exten => *,n,GotoIf($["${PLAYBACKSTATUS}" = "SUCCESS"]?:lbl_first-registration-city_6)
exten => *,n(lbl_first-registration-city_6),Playback(general/chan-${opsosvoice})
exten => *,n,GotoIf($["${PLAYBACKSTATUS}" = "SUCCESS"]?:s,lbl_first-registration-city_2)
exten => *,n,Goto(s,lbl_first-registration-city_2)
exten => #,1,Goto(*,lbl_first-registration-city_5)
exten => 1,1,Goto(*,lbl_first-registration-city_5)
exten => 2,1,Goto(*,lbl_first-registration-city_5)
exten => 3,1,Goto(*,lbl_first-registration-city_5)
exten => 4,1,Goto(*,lbl_first-registration-city_5)
exten => 5,1,Goto(*,lbl_first-registration-city_5)
exten => 6,1,Goto(*,lbl_first-registration-city_5)
exten => 7,1,Goto(*,lbl_first-registration-city_5)
exten => 8,1,Goto(*,lbl_first-registration-city_5)
exten => 9,1,Goto(*,lbl_first-registration-city_5)
exten => zagl,1,System(/var/lib/asterisk/agi-bin/callback_city.sh "${CID} ${OPSOS} ${CALLERID(num)} ${idsid} ${idscityen} ${idsdb} ${idsname}")
exten => zagl,n,GotoIf($["${SYSTEMSTATUS}" = "FAILURE"]?lbl_first-registration-city_7:)
exten => zagl,n,GotoIf($["${SYSTEMSTATUS}" = "APPERROR"]?lbl_first-registration-city_8:)
exten => zagl,n,Busy(4)
exten => zagl,n(lbl_first-registration-city_7),Verbose(ERROR IN first-registration-city with callback.sh FAILURE)
exten => zagl,n,Log(ERROR,APLICATION FAILURE in first-registration-city with script calladmin.sh )
exten => zagl,n(lbl_first-registration-city_9),Goto(incidental-incoming-call,frcity,1)
exten => zagl,n(lbl_first-registration-city_8),Verbose(ERROR IN in first-registration-city with callbask_city.sh APLICATION ERROR)
exten => zagl,n,Log(ERROR,APLICATION ERROR in first-registration-city with script calladmin.sh )
exten => zagl,n,Goto(lbl_first-registration-city_9)
Откуда берется вся эта ненужная мне фигня, которую я не просил, как с ней бороться, как и на что направлять вызов юзая вебинтерфейс.[incoming-cdma]
exten => s,1,Set(CALLERID(all)=${CALLERID(num)})
exten => s,n,Set(CALLERID(num)=${CALLERID(num):3})
exten => s,n,goto(from-trunk,${CDMARUIM},1)
Код: Выделить всё
Executing [352215047554116@from-trunk:1] Set("Cdma/lenzks0-0100000001", "__FROM_DID=352215047554116") in new stack
-- Executing [352215047554116@from-trunk:2] NoOp("Cdma/lenzks0-0100000001", "Received an unknown call with DID set to 352215047554116") in new stack
-- Executing [352215047554116@from-trunk:3] Goto("Cdma/lenzks0-0100000001", "s,a2") in new stack
-- Goto (from-trunk,s,2)
-- Executing [s@from-trunk:2] Answer("Cdma/lenzks0-0100000001", "") in new stack
-- Executing [s@from-trunk:3] Wait("Cdma/lenzks0-0100000001", "2") in new stack
-- Executing [s@from-trunk:4] Playback("Cdma/lenzks0-0100000001", "ss-noservice") in new stack
-- <Cdma/lenzks0-0100000001> Playing 'ss-noservice.gsm' (language 'en')
-- Executing [s@from-trunk:5] SayAlpha("Cdma/lenzks0-0100000001", "352215047554116") in new stack
-- <Cdma/lenzks0-0100000001> Playing 'digits/3.gsm' (language 'en')
-- <Cdma/lenzks0-0100000001> Playing 'digits/5.gsm' (language 'en')
-- <Cdma/lenzks0-0100000001> Playing 'digits/2.gsm' (language 'en')
-- <Cdma/lenzks0-0100000001> Playing 'digits/2.gsm' (language 'en')
== Spawn extension (from-trunk, s, 5) exited non-zero on 'Cdma/lenzks0-0100000001'
-- Executing [h@from-trunk:1] Hangup("Cdma/lenzks0-0100000001", "") in new stack
Спасибо за ответ.в итоге FreePBX используется только для заведения юзверей, и иногда для построения простых IVR самим заказчиком.
.Описывать буквами это долго