Система ubuntu 10.10, установил *1.8, подключаю конфиги astpbx из архива.
При звонке на внутренний номер начинает ругаться.
- root@PBXSU:/usr/src/asterisk-1.8# asterisk -rvvv
- Verbosity is at least 3
- == Using UDPTL TOS bits 184
- == Using UDPTL CoS mark 5
- == Using SIP RTP TOS bits 184
- == Using SIP RTP CoS mark 5
- -- Executing [701@numberplan-main:1] Macro("SIP/717-00000000", "stdexten,SIP,701") in new stack
- -- Executing [s@macro-stdexten:1] Set("SIP/717-00000000", "__BLINDTRANSFER=") in new stack
- -- Executing [s@macro-stdexten:2] Set("SIP/717-00000000", "CF_TYPE=uncond") in new stack
- -- Executing [s@macro-stdexten:3] ExecIf("SIP/717-00000000", "1,Gosub,activate-user,717,1") in new stack
- [Jan 28 15:05:30] WARNING[9540]: app_exec.c:228 execif_exec: Deprecated syntax found. Please upgrade to using ExecIf(<expr>?Gosub(activate-user,717,1))
- == Channel 'SIP/717-00000000' jumping out of macro 'stdexten'
- -- Executing [717@activate-user:1] ExecIf("SIP/717-00000000", "0,Macro,cf-status,717,uncond,deactivate") in new stack
- [Jan 28 15:05:30] WARNING[9540]: app_exec.c:228 execif_exec: Deprecated syntax found. Please upgrade to using ExecIf(<expr>?Macro(cf-status,717,uncond,deactivate))
- -- Executing [717@activate-user:2] Return("SIP/717-00000000", "") in new stack
- -- Executing [s@macro-stdexten:4] Gosub("SIP/717-00000000", "check-meetme,,1") in new stack
- [Jan 28 15:05:30] ERROR[9540]: app_stack.c:419 gosub_exec: Attempt to reach a non-existent destination for gosub: (Context:check-meetme, Extension:s, Priority:1)
- == Spawn extension (macro-stdexten, s, 5) exited non-zero on 'SIP/717-00000000'
- -- Registered SIP '717' at 192.168.1.218:15846
- PBXSU*CLI>
Как обновился синтакс у execif?
- macro-stdexten];
- exten => s,1,Set(__BLINDTRANSFER=${BLINDTRANSFER})
- exten => s,n,Set(CF_TYPE=uncond)
- exten => s,n,ExecIf($["${FROM_OUTSIDE}" != "1"],Gosub,activate-user,${CALLERID(num)},1) ;
- exten => s,n,Gosub(check-meetme,${MACRO_EXTEN},1)
- exten => s,n,Gosub(check-cf,${MACRO_EXTEN},1)
- exten => s,n,Gosub(check-dnd,${MACRO_EXTEN},1)
- exten => s,n,Gosub(call-record,${MACRO_EXTEN},1)
- exten => s,n,Gosub(check-simult,${MACRO_EXTEN},1)
- exten => s,n,ExecIf($[ "${FROM_OUTSIDE}" != - "1"],Set,INDIAL_OPTS=${INDIAL_OPTS}${OUTDIAL_OPTS}); combine opts for internal calls
- exten => s,n,ExecIf($[ "${FROM_OUTSIDE}" = "1"],Playback,razgovor-mozhet-byt-zapisan)
- exten => s,n,Set(DIAL_TIMEOUT=${DB(dial_timeout/${MACRO_EXTEN})})
- exten => s,n,ExecIf($[ "${DIAL_TIMEOUT}" = "" ],Set,DIAL_TIMEOUT=${INDIAL_TIMEOUT})
- exten => s,n,Dial(${ARG1}/${ARG2},${INDIAL_TIMEOUT},${INDIAL_OPTS})
- exten => s,n,ExecIf($["${BLINDTRANSFER}" != ""],Dial,${CUT(BLINDTRANSFER,-,1)},${INDIAL_TIMEOUT},${INDIAL_OPTS})
- exten => s,n,Goto(s-${DIALSTATUS},1)
- exten => s-NOANSWER,1,Set(CF_TYPE=onunavail)
- exten => s-NOANSWER,2,Gosub(check-cf,${MACRO_EXTEN},1)
- exten => s-NOANSWER,3,Voicemail(${ARG2},ju)
- exten => s-NOANSWER,104,Answer
- exten => s-NOANSWER,105,Wait(${AFTER_ANSWER_PAUSE})
- exten => s-NOANSWER,106,Playback(abonent)
- exten => s-NOANSWER,107,Playback(ne-otvechaet)
- exten => s-NOANSWER,108,Hangup
- exten => s-BUSY,1,Set(CF_TYPE=onbusy)
- exten => s-BUSY,2,Gosub(check-cf,${MACRO_EXTEN},1)
- exten => s-BUSY,3,Voicemail(${ARG2},bj)
- exten => s-BUSY,104,Answer
- exten => s-BUSY,105,Playtones(busy)
- exten => s-BUSY,106,Wait(5)
- exten => s-BUSY,107,Hangup
- exten => s-CHANUNAVAIL,1,Set(CF_TYPE=onunavail)
- exten => s-CHANUNAVAIL,n,Gosub(check-cf,${MACRO_EXTEN},1)
- exten => s-CHANUNAVAIL,n,Gosub(menu-user-unavail,s-${MACRO_EXTEN},1) - personal menu for user, disabled by default
- exten => s-CHANUNAVAIL,n,Answer
- exten => s-CHANUNAVAIL,n,Wait(${AFTER_ANSWER_PAUSE})
- exten => s-CHANUNAVAIL,n(vm),Voicemail(${ARG2},ju)
- exten => s-CHANUNAVAIL,n,Return
- exten => s-CHANUNAVAIL,vm+101,Playback(abonent)
- exten => s-CHANUNAVAIL,vm+102,Playback(ne-podkljuchen)
- exten => s-CHANUNAVAIL,vm+103,Return
- exten => _s-.,1,Goto(s-NOANSWER,1)
раньше было с запятыми, теперь закрываеться скобками Gosub,activate-user, поправить на Gosub(activate-user
ну и вконце строки скобку закрыть
а можно мне помочь с пониманием этого макроса macro-stdexten, обяснить его.
Если я правильно понял твой вопрос новый синтаксис такой:
Version 1.6
ExecIf(expression?appiftrue(args)[:appiffalse(args)])
voip-info.org в помощь.
Задан: 2011-01-28 13:26:27 +0400
Просмотрен: 2,884 раз
Обновлен: Jan 30 '11
Проект компании "АТС Дизайн"
Asterisk® и Digium® являются зарегистрированными торговыми марками компании
Digium, Inc., США.
IP АТС Asterisk распространяется под лицензией
GNU GPL.