• Восстановить файл на NTFS разделе. Возможно?

    Miku Hatsune: есть утилита fsck для проверки и исправления ошибок.
  • Сколько примерно весит все утилиты kali linux?

    по ссылке выше есть еще и другие пакеты, все зависит от потребностей. я для себя использую только веб пакет.
  • Есть ли явные ошибки в конфиге MySQL?

    coderisimo: не лучший способ отдавать 80% под буфер. Он же у вас не единственный.
  • База данных как спроектировать?

    post - новости с полем type связанным с таблицей post_type по id
    post_type - тип новости с 2 полями (id и name|type)
    post_images - картинки ко всем типам постов что выше
    post_news_options - доп опции для тех постов что выше (тут какие то доп поля, которые носят не основной характер)
    post_category - категории
    project - проекты
    persons - персоны
    settings - настройки сайта
  • База данных как спроектировать?

    bismoney: количество постов не "влияют" на быстроту выборки. Правильные типы полей и индексы будут приносить больше производительности.
    Если посты имеют одну смысловую нагрузку, то и держать их логично в одной таблице, а не разводить кучу таблиц. В таблице использовать поле индикатор с типом поста.
    В выборке делать запрос по типу поста и выводить нужные поля.
    Приведу к примеру таблицу с товарами супермаркета, где куча разновидностей товара.
    Таблица товаров будет одна, а вот характиристики будут уже связанны с другими таблицами. Это логично.
    А вот заводить отдельную таблицу для каждого типа товара - не логично.
  • Почему PHP функция mail() не работает на сервере?

    Volgarastraport: выше ответ. можешь создать php файл с содержимым <?php phpinfo(); ?> и посмотреть в выводе все описанные дерективы.
  • PHP Curl Chunked Как записать результат в переменную?

    самый простой вариант, это сделать данную переменную глобальной
  • PHP Curl Chunked Как записать результат в переменную?

    $server_output будет пуста, т.к. данная переменная внутри функции и во вне ее нет.
  • Как запретить pkg обновлять пакет?

    @slavabars Автор вопроса
    Вариант, но слишком извращенный.
  • Как запретить pkg обновлять пакет?

    @slavabars Автор вопроса
    делал..

    Installed packages to be REMOVED:
    apache22-itk-mpm-2.2.25

    New packages to be INSTALLED:
    mod_php56: 5.6.11
    apache24: 2.4.12

    Installed packages to be UPGRADED:
    apr: 1.4.8.1.5.2 -> 1.5.2.1.5.4

    The process will require 12 MiB more space.

    Proceed with this action? [y/N]: y
    [1/4] Deinstalling apache22-itk-mpm-2.2.25...

    apache22-itk-mpm-2.2.25 is locked and may not be modified
  • Как запретить pkg обновлять пакет?

    @slavabars Автор вопроса
    создаст свою папку со своими конфигами
  • Почему не проходит внутренний звонок?

    @slavabars Автор вопроса
    dialplan show

    [ Context 'ael-dundi-e164-canonical' created by 'pbx_ael' ]

    [ Context 'ael-dundi-e164-customers' created by 'pbx_ael' ]

    [ Context 'ael-dundi-e164-via-pstn' created by 'pbx_ael' ]

    [ Context 'ael-dundi-e164-local' created by 'pbx_ael' ]
    Include => 'ael-dundi-e164-canonical' [pbx_ael]
    Include => 'ael-dundi-e164-customers' [pbx_ael]
    Include => 'ael-dundi-e164-via-pstn' [pbx_ael]

    [ Context 'ael-dundi-e164-switch' created by 'pbx_ael' ]
    Alt. Switch => 'DUNDi/e164' [pbx_ael]

    [ Context 'ael-dundi-e164-lookup' created by 'pbx_ael' ]
    Include => 'ael-dundi-e164-local' [pbx_ael]
    Include => 'ael-dundi-e164-switch' [pbx_ael]

    [ Context 'ael-dundi-e164' created by 'pbx_ael' ]
    '~~s~~' => 1. MSet(LOCAL(exten)=${ARG1}) [pbx_ael]
    2. Goto(${exten},1) [pbx_ael]
    3. Return() [pbx_ael]
    Include => 'ael-builtin-h-bubble' [pbx_ael]

    [ Context 'ael-iaxtel700' created by 'pbx_ael' ]
    '_91700XXXXXXX' => 1. Dial(IAX2/${IAXINFO-AEL}@iaxtel.com/${EXTEN:1}@iaxtel) [pbx_ael]

    [ Context 'ael-iaxprovider' created by 'pbx_ael' ]

    [ Context 'ael-trunkint' created by 'pbx_ael' ]
    '_9011.' => 1. Gosub(ael-dundi-e164,~~s~~,1(${EXTEN:4})) [pbx_ael]
    2. Dial(${OUTBOUND-TRUNK}/${EXTEN:${OUTBOUND-TRUNKMSD}}) [pbx_ael]
    Include => 'ael-dundi-e164-lookup' [pbx_ael]

    [ Context 'ael-trunkld' created by 'pbx_ael' ]
    '_91NXXNXXXXXX' => 1. Gosub(ael-dundi-e164,~~s~~,1(${EXTEN:1})) [pbx_ael]
    2. Dial(${OUTBOUND-TRUNK}/${EXTEN:${OUTBOUND-TRUNKMSD}}) [pbx_ael]
    Include => 'ael-dundi-e164-lookup' [pbx_ael]

    [ Context 'ael-trunklocal' created by 'pbx_ael' ]
    '_9NXXXXXX' => 1. Dial(${OUTBOUND-TRUNK}/${EXTEN:${OUTBOUND-TRUNKMSD}}) [pbx_ael]

    [ Context 'ael-trunktollfree' created by 'pbx_ael' ]
    '_91800NXXXXXX' => 1. Dial(${OUTBOUND-TRUNK}/${EXTEN:${OUTBOUND-TRUNKMSD}}) [pbx_ael]
    '_91866NXXXXXX' => 1. Dial(${OUTBOUND-TRUNK}/${EXTEN:${OUTBOUND-TRUNKMSD}}) [pbx_ael]
    '_91877NXXXXXX' => 1. Dial(${OUTBOUND-TRUNK}/${EXTEN:${OUTBOUND-TRUNKMSD}}) [pbx_ael]
    '_91888NXXXXXX' => 1. Dial(${OUTBOUND-TRUNK}/${EXTEN:${OUTBOUND-TRUNKMSD}}) [pbx_ael]

    [ Context 'ael-international' created by 'pbx_ael' ]
    Include => 'ael-longdistance' [pbx_ael]
    Include => 'ael-trunkint' [pbx_ael]
    Ignore pattern => '9' [pbx_ael]

    [ Context 'ael-longdistance' created by 'pbx_ael' ]
    Include => 'ael-local' [pbx_ael]
    Include => 'ael-trunkld' [pbx_ael]
    Ignore pattern => '9' [pbx_ael]

    [ Context 'ael-local' created by 'pbx_ael' ]
    Include => 'ael-default' [pbx_ael]
    Include => 'ael-trunklocal' [pbx_ael]
    Include => 'ael-iaxtel700' [pbx_ael]
    Include => 'ael-trunktollfree' [pbx_ael]
    Include => 'ael-iaxprovider' [pbx_ael]
    Ignore pattern => '9' [pbx_ael]

    [ Context 'ael-std-exten-ael' created by 'pbx_ael' ]
    'a' => 1. VoiceMailMain(${ext}) [pbx_ael]
    2. Return() [pbx_ael]
    'sw_28_' => 10. Goto(sw_28_.,10) [pbx_ael]
    'sw_28_BUSY' => 10. Voicemail(${ext},b) [pbx_ael]
    11. Goto(~~s~~,7) [pbx_ael]
    '~~s~~' => 1. MSet(LOCAL(ext)=${ARG1}) [pbx_ael]
    2. MSet(LOCAL(dev)=${ARG2}) [pbx_ael]
    3. MSet(LOCAL(~~EXTEN~~)=${EXTEN}) [pbx_ael]
    4. MSet(LOCAL(~~EXTEN~~)=${~~EXTEN~~}) [pbx_ael]
    5. Dial(${dev}/${ext},20) [pbx_ael]
    6. Goto(sw_28_${DIALSTATUS},10) [pbx_ael]
    7. NoOp(Finish switch_ael-std-exten-ael_28) [pbx_ael]
    8. Return() [pbx_ael]
    '_sw_28_.' => 10. Voicemail(${ext},u) [pbx_ael]
    11. Goto(~~s~~,7) [pbx_ael]
    Include => 'ael-builtin-h-bubble' [pbx_ael]

    [ Context 'ael-demo' created by 'pbx_ael' ]
    '#' => 1. Playback(demo-thanks) [pbx_ael]
    2. Hangup() [pbx_ael]
    '1000' => 1. Goto(ael-default,s,1) [pbx_ael]
    '2' => 1. Background(demo-moreinfo) [pbx_ael]
    2. Goto(s,instructions) [pbx_ael]
    '3' => 1. Set(LANGUAGE()=fr) [pbx_ael]
    2. Goto(s,restart) [pbx_ael]
    '500' => 1. Playback(demo-abouttotry) [pbx_ael]
    2. Dial(IAX2/guest@misery.digium.com/s@default) [pbx_ael]
    3. Playback(demo-nogo) [pbx_ael]
    4. Goto(s,instructions) [pbx_ael]
    '600' => 1. Playback(demo-echotest) [pbx_ael]
    2. Echo() [pbx_ael]
    3. Playback(demo-echodone) [pbx_ael]
    4. Goto(s,instructions) [pbx_ael]
    '8500' => 1. VoicemailMain() [pbx_ael]
    2. Goto(s,instructions) [pbx_ael]
    'i' => 1. Playback(invalid) [pbx_ael]
    's' => 1. Wait(1) [pbx_ael]
    2. Answer() [pbx_ael]
    3. Set(TIMEOUT(digit)=5) [pbx_ael]
    4. Set(TIMEOUT(response)=10) [pbx_ael]
    [restart] 5. Background(demo-congrats) [pbx_ael]
    [instructions] 6. MSet(x=$[0]) [pbx_ael]
    7. GotoIf($[ ${x} < 3]?8:12) [pbx_ael]
    8. Background(demo-instruct) [pbx_ael]
    9. WaitExten() [pbx_ael]
    10. MSet(x=$[${x} + 1]) [pbx_ael]
    11. Goto(7) [pbx_ael]
    12. NoOp(Finish for_ael-demo_30) [pbx_ael]
    't' => 1. Goto(#,1) [pbx_ael]
    '_1234' => 1. Gosub(ael-std-exten-ael,~~s~~,1(${EXTEN}, "IAX2")) [pbx_ael]

    [ Context 'ael-default' created by 'pbx_ael' ]
    Include => 'ael-demo' [pbx_ael]

    [ Context 'ael-builtin-h-bubble' created by 'pbx_ael' ]
    'h' => 1. Goto(9991) [pbx_ael]
    9991. Set(~~parentcxt~~=${STACK_PEEK(1,c,1)}) [pbx_ael]
    9992. GotoIf($["${~~parentcxt~~}"=""]?9996) [pbx_ael]
    9993. GotoIf(${DIALPLAN_EXISTS(${~~parentcxt~~},h,1)}?9994:9996) [pbx_ael]
    9994. StackPop() [pbx_ael]
    9995. Goto(${~~parentcxt~~},h,1) [pbx_ael]
    9996. NoOp() [pbx_ael]

    [ Context 'parkedcalls' created by 'res_parking' ]
    '700' => 1. Park() [res_parking]
    '701' => 1. ParkedCall(default,701) [res_parking/default]
    '702' => 1. ParkedCall(default,702) [res_parking/default]
    '703' => 1. ParkedCall(default,703) [res_parking/default]
    '704' => 1. ParkedCall(default,704) [res_parking/default]
    '705' => 1. ParkedCall(default,705) [res_parking/default]
    '706' => 1. ParkedCall(default,706) [res_parking/default]
    '707' => 1. ParkedCall(default,707) [res_parking/default]
    '708' => 1. ParkedCall(default,708) [res_parking/default]
    '709' => 1. ParkedCall(default,709) [res_parking/default]
    '710' => 1. ParkedCall(default,710) [res_parking/default]
    '711' => 1. ParkedCall(default,711) [res_parking/default]
    '712' => 1. ParkedCall(default,712) [res_parking/default]
    '713' => 1. ParkedCall(default,713) [res_parking/default]
    '714' => 1. ParkedCall(default,714) [res_parking/default]
    '715' => 1. ParkedCall(default,715) [res_parking/default]
    '716' => 1. ParkedCall(default,716) [res_parking/default]
    '717' => 1. ParkedCall(default,717) [res_parking/default]
    '718' => 1. ParkedCall(default,718) [res_parking/default]
    '719' => 1. ParkedCall(default,719) [res_parking/default]
    '720' => 1. ParkedCall(default,720) [res_parking/default]

    [ Context 'DLPN_loopS' created by 'pbx_config' ]
    Include => 'default' [pbx_config]
    Include => 'parkedcalls' [pbx_config]
    Include => 'conferences' [pbx_config]
    Include => 'ringgroups' [pbx_config]
    Include => 'voicemenus' [pbx_config]
    Include => 'queues' [pbx_config]
    Include => 'voicemailgroups' [pbx_config]
    Include => 'directory' [pbx_config]
    Include => 'pagegroups' [pbx_config]
    Include => 'page_an_extension' [pbx_config]

    [ Context 'DLPN_Redcom' created by 'pbx_config' ]
    Include => 'CallingRule_475951' [pbx_config]
    Include => 'CallingRule_475950' [pbx_config]
    Include => 'default' [pbx_config]
    Include => 'parkedcalls' [pbx_config]
    Include => 'conferences' [pbx_config]
    Include => 'ringgroups' [pbx_config]
    Include => 'voicemenus' [pbx_config]
    Include => 'queues' [pbx_config]
    Include => 'voicemailgroups' [pbx_config]
    Include => 'directory' [pbx_config]
    Include => 'pagegroups' [pbx_config]
    Include => 'page_an_extension' [pbx_config]

    [ Context 'ringroups-custom-2' created by 'pbx_config' ]
    's' => 1. NoOp(IncomingGroup) [pbx_config]
    2. Dial(SIP/100,20,${DIALOPTIONS}i) [pbx_config]
    3. Dial(SIP/101,20,${DIALOPTIONS}i) [pbx_config]
    4. Dial(SIP/102,20,${DIALOPTIONS}i) [pbx_config]
    5. Dial(SIP/103,20,${DIALOPTIONS}i) [pbx_config]
    6. Dial(SIP/104,20,${DIALOPTIONS}i) [pbx_config]
    7. Hangup() [pbx_config]

    [ Context 'DID_trunk_1_timeinterval_all' created by 'pbx_config' ]
    '_X.' => 1. Goto(ringroups-custom-2,s,1) [pbx_config]

    [ Context 'DID_trunk_2_timeinterval_all' created by 'pbx_config' ]
    '_X.' => 1. Goto(ringroups-custom-2,s,1) [pbx_config]

    [ Context 'ringroups-custom-1' created by 'pbx_config' ]
    's' => 1. NoOp(boss) [pbx_config]
    2. Dial(SIP/100,10,${DIALOPTIONS}i) [pbx_config]
    3. Dial(SIP/101,10,${DIALOPTIONS}i) [pbx_config]
    4. Hangup() [pbx_config]

    [ Context 'CallingRule_475950' created by 'pbx_config' ]
    '_XXXXXX' => 1. Macro(trunkdial-failover-0.3,${trunk_1}/${EXTEN:0},${trunk_2}/${EXTEN:0},trunk_1,trunk_2,475950) [pbx_config]

    [ Context 'CallingRule_475951' created by 'pbx_config' ]
    '_8XXXXXXXXXX' => 1. Macro(trunkdial-failover-0.3,${trunk_2}/${EXTEN:0},${trunk_1}/${EXTEN:0},trunk_2,trunk_1,475951) [pbx_config]

    [ Context 'DID_trunk_2_default' created by 'pbx_config' ]

    [ Context 'DID_trunk_2' created by 'pbx_config' ]
    Include => 'DID_trunk_2_timeinterval_all,*,mon-sun,*,*' [pbx_config]
    Include => 'DID_trunk_2_default' [pbx_config]

    [ Context 'DID_trunk_1_default' created by 'pbx_config' ]

    [ Context 'DID_trunk_1' created by 'pbx_config' ]
    Include => 'DID_trunk_1_timeinterval_all,*,mon-sun,*,*' [pbx_config]
    Include => 'DID_trunk_1_default' [pbx_config]

    [ Context 'macro-q_logout' created by 'pbx_config' ]
    's' => 1. Verbose(2, Logged ${thisActiveMember} out of ${thisQueue} queue) [pbx_config]
    2. RemoveQueueMember(${thisQueue},${thisActiveMember}) [pbx_config]
    3. Playback(silence/1) [pbx_config]
    4. ExecIf($["${RQMSTATUS}" = "REMOVED"]?Playback(agent-loggedoff):Playback(an-error-has-occurred)) [pbx_config]

    [ Context 'macro-q_login' created by 'pbx_config' ]
    's' => 1. Verbose(2, Logging ${thisActiveMember} into the ${thisQueue} queue) [pbx_config]
    2. AddQueueMember(${thisQueue},${thisActiveMember}) [pbx_config]
    3. Playback(silence/1) [pbx_config]
    4. ExecIf($["${AQMSTATUS}" = "ADDED"]?Playback(agent-loginok):Playback(an-error-has-occurred)) [pbx_config]

    [ Context 'macro-member-loginlogout' created by 'pbx_config' ]
    's' => 1. Verbose(2, Logging queue member in or out of the request queue) [pbx_config]
    2. Set(thisQueue=${thisQueueXtn}) [pbx_config]
    3. Set(queueMembers=${QUEUE_MEMBER_LIST(${thisQueue})}) [pbx_config]
    4. Set(field=1) [pbx_config]
    5. Set(logged_in=0) [pbx_config]
    6. Set(thisQueueMember=${CUT(queueMembers,\,,${field})}) [pbx_config]
    7. While($[${EXISTS(${thisQueueMember})}]) [pbx_config]
    8. GotoIf($["${thisQueueMember}" != "${thisActiveMember}"]?check_next) [pbx_config]
    9. Set(logged_in=1) [pbx_config]
    10. ExitWhile() [pbx_config]
    [check_next] 11. Set(field=$[${field} + 1]) [pbx_config]
    12. Set(thisQueueMember=${CUT(queueMembers,\,,${field})}) [pbx_config]
    13. EndWhile() [pbx_config]
    14. MacroIf($[${logged_in} = 0]?q_login:q_logout) [pbx_config]

    [ Context 'queue-member-manager' created by 'pbx_config' ]
    'handle_member' => 1. Verbose(2, Looping through queues to log in or out queue members) [pbx_config]
    2. Set(thisActiveMember=${CHANNEL(channeltype)}/${CHANNEL(peername)}) [pbx_config]
    3. Set(queue_field=2) [pbx_config]
    4. Set(thisQueueXtn=${CUT(QUEUES,\,,${queue_field})}) [pbx_config]
    5. While($[${EXISTS(${thisQueueXtn})}]) [pbx_config]
    6. Macro(member-loginlogout) [pbx_config]
    7. Set(queue_field=$[${queue_field} + 1]) [pbx_config]
    8. Set(thisQueueXtn=${CUT(QUEUES,\,,${queue_field})}) [pbx_config]
    9. EndWhile() [pbx_config]

    [ Context 'macro-trunkdial-failover-0.3' created by 'pbx_config' ]
    '1-CHANUNAVAIL' => 1. Dial(${ARG2}) [pbx_config]
    2. Hangup() [pbx_config]
    '1-CONGESTION' => 1. Dial(${ARG2}) [pbx_config]
    2. Hangup() [pbx_config]
    '1-dial' => 1. Dial(${ARG1}) [pbx_config]
    2. Gotoif(${LEN(${ARG2})} > 0 ?1-${DIALSTATUS},1:1-out,1) [pbx_config]
    '1-fmsetcid' => 1. Set(CALLERID(num)=${FMCIDNUM}) [pbx_config]
    2. Set(CALLERID(name)=${FMCIDNAME}) [pbx_config]
    3. Goto(s,4) [pbx_config]
    '1-out' => 1. Hangup() [pbx_config]
    '1-setgbobname' => 1. Set(CALLERID(name)=${GLOBAL_OUTBOUNDCIDNAME}) [pbx_config]
    2. Goto(s,3) [pbx_config]
    's' => 1. GotoIf($[${LEN(${FMCIDNUM})} > 6]?1-fmsetcid,1) [pbx_config]
    2. GotoIf($[${LEN(${GLOBAL_OUTBOUNDCIDNAME})} > 1]?1-setgbobname,1) [pbx_config]
    3. Set(CALLERID(num)=${IF($[${LEN(${CID_${CALLERID(num)}})} > 2]?${CID_${CALLERID(num)}}:)}) [pbx_config]
    4. Set(CALLERID(all)=${IF($[${LEN(${ARG5})} > 2]?${ARG5}:)}) [pbx_config]
    5. GotoIf($[${LEN(${CALLERID(num)})} > 6]?1-dial,1) [pbx_config]
    6. Set(CALLERID(all)=${IF($[${LEN(${CID_${ARG3}})} > 6]?${CID_${ARG3}}:${GLOBAL_OUTBOUNDCID})}) [pbx_config]
    7. Set(CALLERID(all)=${IF($[${LEN(${ARG5})} > 2]?${ARG5}:)}) [pbx_config]
    8. Goto(1-dial,1) [pbx_config]

    [ Context 'macro-local-callingrule-cid-0.1' created by 'pbx_config' ]
    's' => 1. Set(CALLERID(all)=${IF($[${LEN(${ARG4})} > 2]?${ARG4}:)}) [pbx_config]
    2. Goto(${ARG1},${ARG2},${ARG3}) [pbx_config]

    [ Context 'asterisk_guitools' created by 'pbx_config' ]
    'executecommand' => 1. System(${command}) [pbx_config]
    2. Hangup() [pbx_config]
    'play_file' => 1. Answer() [pbx_config]
    2. Playback(${var1}) [pbx_config]
    3. Hangup() [pbx_config]
    'record_vmenu' => 1. Answer() [pbx_config]
    2. Playback(vm-intro) [pbx_config]
    3. Record(${var1},0,500,k) [pbx_config]
    4. Playback(vm-saved) [pbx_config]
    5. Playback(vm-goodbye) [pbx_config]
    6. Hangup() [pbx_config]

    [ Context 'pagegroups' created by 'pbx_config' ]

    [ Context 'page_an_extension' created by 'pbx_config' ]

    [ Context 'directory' created by 'pbx_config' ]
    '7000' => 1. Directory(default,default,) [pbx_config]

    [ Context 'voicemailgroups' created by 'pbx_config' ]

    [ Context 'voicemenus' created by 'pbx_config' ]

    [ Context 'queues' created by 'pbx_config' ]

    [ Context 'ringgroups' created by 'pbx_config' ]
    '6400' => 1. Goto(ringroups-custom-1,s,1) [pbx_config]
    '6444' => 1. Goto(ringroups-custom-2,s,1) [pbx_config]

    [ Context 'conferences' created by 'pbx_config' ]
    '6300' => 1. MeetMe(${EXTEN},) [pbx_config]

    [ Context 'macro-pagingintercom' created by 'pbx_config' ]
    's' => 1. SIPAddHeader(Alert-Info: ${PAGING_HEADER}) [pbx_config]
    2. Page(${ARG1},${ARG2}) [pbx_config]
    3. Hangup() [pbx_config]

    [ Context 'macro-stdexten-followme' created by 'pbx_config' ]
    'a' => 1. VoicemailMain(${ORIG_ARG1}) [pbx_config]
    's' => 1. Answer() [pbx_config]
    2. Set(ORIG_ARG1=${ARG1}) [pbx_config]
    3. Dial(${ARG2},${RINGTIME},${DIALOPTIONS}) [pbx_config]
    4. Set(__FMCIDNUM=${CALLERID(num)}) [pbx_config]
    5. Set(__FMCIDNAME=${CALLERID(name)}) [pbx_config]
    6. Followme(${ORIG_ARG1},${FOLLOWMEOPTIONS}) [pbx_config]
    7. Voicemail(${ORIG_ARG1},u) [pbx_config]
    's-BUSY' => 1. Voicemail(${ORIG_ARG1},b) [pbx_config]
    2. Goto(default,s,1) [pbx_config]
    's-NOANSWER' => 1. Voicemail(${ORIG_ARG1},u) [pbx_config]
    '_s-.' => 1. Goto(s-NOANSWER,1) [pbx_config]

    [ Context 'macro-stdexten' created by 'pbx_config' ]
    'a' => 1. VoicemailMain(${ORIG_ARG1}) [pbx_config]
    's' => 1. Set(__DYNAMIC_FEATURES=${FEATURES}) [pbx_config]
    2. Set(ORIG_ARG1=${ARG1}) [pbx_config]
    3. GotoIf($["${FOLLOWME_${ARG1}}" = "1"]?6:4) [pbx_config]
    4. Dial(${ARG2},${RINGTIME},${DIALOPTIONS}) [pbx_config]
    5. Goto(s-${DIALSTATUS},1) [pbx_config]
    6. Macro(stdexten-followme,${ARG1},${ARG2}) [pbx_config]
    's-BUSY' => 1. Voicemail(${ORIG_ARG1},b) [pbx_config]
    2. Goto(default,s,1) [pbx_config]
    's-NOANSWER' => 1. Voicemail(${ORIG_ARG1},u) [pbx_config]
    2. Goto(default,s,1) [pbx_config]
    '_s-.' => 1. Goto(s-NOANSWER,1) [pbx_config]

    [ Context 'ani' created by 'pbx_config' ]
    '_X.' => 40000. NoOp(ANI: ${EXTEN}) [pbx_config]
    40001. Wait(0.25) [pbx_config]
    40002. Answer() [pbx_config]
    40003. Playback(vm-from) [pbx_config]
    40004. SayDigits(${CALLERID(ani)}) [pbx_config]
    40005. Wait(1.25) [pbx_config]
    40006. SayDigits(${CALLERID(ani)}) [pbx_config]
    40007. Return() [pbx_config]

    [ Context 'time' created by 'pbx_config' ]
    '_X.' => 30000. NoOp(Time: ${EXTEN} ${timezone}) [pbx_config]
    30001. Wait(0.25) [pbx_config]
    30002. Answer() [pbx_config]
    30003. Set(FUTURETIME=$[${EPOCH} + 12]) [pbx_config]
    30004. SayUnixTime(${FUTURETIME},Zulu,HNS) [pbx_config]
    30005. SayPhonetic(z) [pbx_config]
    30006. SayUnixTime(${FUTURETIME},${timezone},HNS) [pbx_config]
    30007. Playback(spy-local) [pbx_config]
    30008. WaitUntil(${FUTURETIME}) [pbx_config]
    30009. Playback(beep) [pbx_config]
    30010. Return() [pbx_config]

    [ Context 'default' created by 'pbx_config' ]
    '100' => hint: SIP/100 [pbx_config]
    1. Dial(${HINT}) [pbx_config]
    '101' => hint: SIP/101 [pbx_config]
    1. Dial(${HINT}) [pbx_config]
    '102' => hint: SIP/102 [pbx_config]
    1. Dial(${HINT}) [pbx_config]
    '103' => hint: SIP/103 [pbx_config]
    1. Dial(${HINT}) [pbx_config]
    '104' => hint: SIP/104 [pbx_config]
    1. Dial(${HINT}) [pbx_config]
    '105' => hint: SIP/105 [pbx_config]
    1. Dial(${HINT}) [pbx_config]
    '106' => hint: SIP/106 [pbx_config]
    1. Dial(${HINT}) [pbx_config]
    '107' => hint: SIP/107 [pbx_config]
    1. Dial(${HINT}) [pbx_config]
    '108' => hint: SIP/108 [pbx_config]
    1. Dial(${HINT}) [pbx_config]
    '109' => hint: SIP/109 [pbx_config]
    1. Dial(${HINT}) [pbx_config]
    '110' => hint: SIP/110 [pbx_config]
    1. Dial(${HINT}) [pbx_config]
    '111' => hint: SIP/111 [pbx_config]
    1. Dial(${HINT}) [pbx_config]
    '112' => hint: SIP/112 [pbx_config]
    1. Dial(${HINT}) [pbx_config]
    '113' => hint: SIP/113 [pbx_config]
    1. Dial(${HINT}) [pbx_config]
    '114' => hint: SIP/114 [pbx_config]
    1. Dial(${HINT}) [pbx_config]
    '115' => hint: SIP/115 [pbx_config]
    1. Dial(${HINT}) [pbx_config]
    '116' => hint: SIP/116 [pbx_config]
    1. Dial(${HINT}) [pbx_config]
    '117' => hint: SIP/117 [pbx_config]
    1. Dial(${HINT}) [pbx_config]
    '118' => hint: SIP/118 [pbx_config]
    1. Dial(${HINT}) [pbx_config]
    '119' => hint: SIP/119 [pbx_config]
    1. Dial(${HINT}) [pbx_config]
    '120' => hint: SIP/120 [pbx_config]
    1. Dial(${HINT}) [pbx_config]
    '2345' => 1. VoiceMailMain(${CALLERID(num)}@default) [pbx_config]

    [ Context 'public' created by 'pbx_config' ]
    Include => 'demo' [pbx_config]

    [ Context 'page' created by 'pbx_config' ]
    '_X.' => 1. Macro(page,SIP/${EXTEN}) [pbx_config]

    [ Context 'demo' created by 'pbx_config' ]
    '#' => 1. Playback(demo-thanks) [pbx_config]
    2. Hangup() [pbx_config]
    '1000' => 1. Goto(default,s,1) [pbx_config]
    '1234' => 1. Playback(transfer,skip) [pbx_config]
    2. Gosub(${EXTEN},stdexten(${GLOBAL(CONSOLE)})) [pbx_config]
    3. Goto(default,s,1) [pbx_config]
    '1235' => 1. Voicemail(1234,u) [pbx_config]
    '1236' => 1. Dial(Console/dsp) [pbx_config]
    2. Voicemail(1234,b) [pbx_config]
    '2' => 1. BackGround(demo-moreinfo) [pbx_config]
    2. Goto(s,instruct) [pbx_config]
    '3' => 1. Set(CHANNEL(language)=fr) [pbx_config]
    2. Goto(s,restart) [pbx_config]
    '500' => 1. Playback(demo-abouttotry) [pbx_config]
    2. Dial(IAX2/guest@pbx.digium.com/s@default) [pbx_config]
    3. Playback(demo-nogo) [pbx_config]
    4. Goto(s,6) [pbx_config]
    '600' => 1. Playback(demo-echotest) [pbx_config]
    2. Echo() [pbx_config]
    3. Playback(demo-echodone) [pbx_config]
    4. Goto(s,6) [pbx_config]
    '76245' => 1. Macro(page,SIP/Grandstream1) [pbx_config]
    '7999' => 1. Set(TIMEOUT(absolute)=60) [pbx_config]
    2. Page(Local/Grandstream1@page&Local/Xlite1@page&Local/1234@page/n,d) [pbx_config]
    '8500' => 1. VoicemailMain() [pbx_config]
    2. Goto(s,6) [pbx_config]
    'i' => 1. Playback(invalid) [pbx_config]
    's' => 1. Wait(1) [pbx_config]
    2. Answer() [pbx_config]
    3. Set(TIMEOUT(digit)=5) [pbx_config]
    4. Set(TIMEOUT(response)=10) [pbx_config]
    [restart] 5. BackGround(demo-congrats) [pbx_config]
    [instruct] 6. BackGround(demo-instruct) [pbx_config]
    7. WaitExten() [pbx_config]
    't' => 1. Goto(#,1) [pbx_config]
    '_7XXX' => 1. Macro(page,SIP/${EXTEN}) [pbx_config]
    Include => 'stdexten' [pbx_config]

    [ Context 'macro-page' created by 'pbx_config' ]
    's' => 1. ChanIsAvail(${ARG1},s) [pbx_config]
    2. GoToIf($[${AVAILSTATUS} = "1"]?autoanswer:fail) [pbx_config]
    [autoanswer] 3. Set(_ALERT_INFO="RA") [pbx_config]
    4. SIPAddHeader(Call-Info: Answer-After=0) [pbx_config]
    5. NoOp() [pbx_config]
    6. Dial(${ARG1}) [pbx_config]
    [fail] 7. Hangup() [pbx_config]

    [ Context 'stdPrivacyexten' created by 'pbx_config' ]
    'a' => 1. VoicemailMain(${mbx}) [pbx_config]
    2. Return() [pbx_config]
    'stdexten-BUSY' => 1. Voicemail(${mbx},b) [pbx_config]
    2. NoOp(Finish stdPrivacyexten BUSY) [pbx_config]
    3. Return() [pbx_config]
    'stdexten-DONTCALL' => 1. Goto(${dontcntx},s,1) [pbx_config]
    'stdexten-NOANSWER' => 1. Voicemail(${mbx},u) [pbx_config]
    2. NoOp(Finish stdPrivacyexten NOANSWER) [pbx_config]
    3. Return() [pbx_config]
    'stdexten-TORTURE' => 1. Goto(${tortcntx},s,1) [pbx_config]
    '_stde[x]te[n]-.' => 1. Goto(stdexten-NOANSWER,1) [pbx_config]
    '_X.' => 60000. NoOp(Start stdPrivacyexten) [pbx_config]
    60001. Set(LOCAL(ext)=${ARG1}) [pbx_config]
    60002. Set(LOCAL(dev)=${ARG2}) [pbx_config]
    60003. Set(LOCAL(dontcntx)=${ARG3}) [pbx_config]
    60004. Set(LOCAL(tortcntx)=${ARG4}) [pbx_config]
    60005. Set(LOCAL(cntx)=${ARG5}) [pbx_config]
    60006. Set(LOCAL(mbx)="${ext}"$["${cntx}" ? "@${cntx}" :: ""]) [pbx_config]
    60007. Dial(${dev},20,p) [pbx_config]
    60008. Goto(stdexten-${DIALSTATUS},1) [pbx_config]

    [ Context 'stdexten' created by 'pbx_config' ]
    'a' => 1. VoicemailMain(${mbx}) [pbx_config]
    2. Return() [pbx_config]
    'stdexten-BUSY' => 1. Voicemail(${mbx},b) [pbx_config]
    2. Return() [pbx_config]
    'stdexten-NOANSWER' => 1. Voicemail(${mbx},u) [pbx_config]
    2. Return() [pbx_config]
    '_stde[x]te[n]-.' => 1. Goto(stdexten-NOANSWER,1) [pbx_config]
    '_X.' => 50000. NoOp(Start stdexten) [pbx_config]
    50001. Set(LOCAL(ext)=${EXTEN}) [pbx_config]
    50002. Set(LOCAL(dev)=${ARG1}) [pbx_config]
    50003. Set(LOCAL(cntx)=${ARG2}) [pbx_config]
    50004. Set(LOCAL(mbx)=${ext}${IF($[!${ISNULL(${cntx})}]?@${cntx})}) [pbx_config]
    50005. Dial(${dev},20) [pbx_config]
    50006. Goto(stdexten-${DIALSTATUS},1) [pbx_config]

    [ Context 'macro-trunkdial' created by 'pbx_config' ]
    's' => 1. Dial(${ARG1}) [pbx_config]
    2. Goto(s-${DIALSTATUS},1) [pbx_config]
    's-BUSY' => 1. Hangup() [pbx_config]
    's-NOANSWER' => 1. Hangup() [pbx_config]
    '_s-.' => 1. NoOp() [pbx_config]

    [ Context 'outbound-freenum2' created by 'pbx_config' ]
    'fn-BUSY' => 1. Busy() [pbx_config]
    '_f[n]-.' => 1. NoOp(ISN: ${DIALSTATUS}) [pbx_config]
    2. Congestion() [pbx_config]
    '_X!' => 1. Verbose(2,Performing ISN lookup for ${EXTEN}) [pbx_config]
    2. Set(SUFFIX=${CUT(EXTEN,*,2-)}) [pbx_config]
    3. GotoIf($["${FILTER(0-9,${SUFFIX})}" != "${SUFFIX}"]?fn-CONGESTION,1) [pbx_config]
    4. Set(TIMEOUT(absolute)=10800) [pbx_config]
    5. Set(isnresult=${ENUMLOOKUP(${EXTEN},sip,,1,freenum.org)}) [pbx_config]
    6. GotoIf($["${isnresult}" != ""]?from) [pbx_config]
    7. Set(DIALSTATUS=CONGESTION) [pbx_config]
    8. Goto(fn-CONGESTION,1) [pbx_config]
    [from] 9. Set(__SIPFROMUSER=${CALLERID(num)}) [pbx_config]
    10. GotoIf($["${GLOBAL(FREENUMDOMAIN)}" = ""]?dial) [pbx_config]
    11. Set(__SIPFROMDOMAIN=${GLOBAL(FREENUMDOMAIN)}) [pbx_config]
    [dial] 12. Dial(SIP/${isnresult},40) [pbx_config]
    13. Goto(fn-${DIALSTATUS},1) [pbx_config]

    [ Context 'outbound-freenum' created by 'pbx_config' ]
    '_X*X!' => 1. Goto(outbound-freenum2,${EXTEN},1) [pbx_config]
    '_XX*X!' => 1. Goto(outbound-freenum2,${EXTEN},1) [pbx_config]
    '_XXX*X!' => 1. Goto(outbound-freenum2,${EXTEN},1) [pbx_config]
    '_XXXX*X!' => 1. Goto(outbound-freenum2,${EXTEN},1) [pbx_config]
    '_XXXXX*X!' => 1. Goto(outbound-freenum2,${EXTEN},1) [pbx_config]
    '_XXXXXX*X!' => 1. Goto(outbound-freenum2,${EXTEN},1) [pbx_config]

    [ Context 'local' created by 'pbx_config' ]
    Include => 'default' [pbx_config]
    Include => 'trunklocal' [pbx_config]
    Include => 'iaxtel700' [pbx_config]
    Include => 'trunktollfree' [pbx_config]
    Include => 'iaxprovider' [pbx_config]
    Include => 'parkedcalls' [pbx_config]
    Ignore pattern => '9' [pbx_config]

    [ Context 'longdistance' created by 'pbx_config' ]
    Include => 'local' [pbx_config]
    Include => 'trunkld' [pbx_config]
    Ignore pattern => '9' [pbx_config]

    [ Context 'international' created by 'pbx_config' ]
    Include => 'longdistance' [pbx_config]
    Include => 'trunkint' [pbx_config]
    Ignore pattern => '9' [pbx_config]

    [ Context 'trunktollfree' created by 'pbx_config' ]
    '_91800NXXXXXX' => 1. Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}}) [pbx_config]
    '_91866NXXXXXX' => 1. Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}}) [pbx_config]
    '_91877NXXXXXX' => 1. Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}}) [pbx_config]
    '_91888NXXXXXX' => 1. Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}}) [pbx_config]

    [ Context 'trunklocal' created by 'pbx_config' ]
    '_9NXXXXXX' => 1. Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}}) [pbx_config]

    [ Context 'trunkld' created by 'pbx_config' ]
    '_91NXXNXXXXXX' => 1. Macro(dundi-e164,${EXTEN:1}) [pbx_config]
    2. Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}}) [pbx_config]

    [ Context 'trunkint' created by 'pbx_config' ]
    '_9011.' => 1. Macro(dundi-e164,${EXTEN:4}) [pbx_config]
    2. Dial(${GLOBAL(TRUNK)}/${FILTER(0-9,${EXTEN:${GLOBAL(TRUNKMSD)}})}) [pbx_config]

    [ Context 'iaxprovider' created by 'pbx_config' ]

    [ Context 'iaxtel700' created by 'pbx_config' ]
    '_91700XXXXXXX' => 1. Dial(IAX2/${GLOBAL(IAXINFO)}@iaxtel.com/${EXTEN:1}@iaxtel) [pbx_config]

    [ Context 'macro-dundi-e164' created by 'pbx_config' ]
    's' => 1. Goto(${ARG1},1) [pbx_config]
    Include => 'dundi-e164-lookup' [pbx_config]

    [ Context 'dundi-e164-lookup' created by 'pbx_config' ]
    Include => 'dundi-e164-local' [pbx_config]
    Include => 'dundi-e164-switch' [pbx_config]

    [ Context 'dundi-e164-switch' created by 'pbx_config' ]
    Alt. Switch => 'DUNDi/e164' [pbx_config]

    [ Context 'dundi-e164-local' created by 'pbx_config' ]
    Include => 'dundi-e164-canonical' [pbx_config]
    Include => 'dundi-e164-customers' [pbx_config]
    Include => 'dundi-e164-via-pstn' [pbx_config]

    [ Context 'dundi-e164-via-pstn' created by 'pbx_config' ]

    [ Context 'dundi-e164-customers' created by 'pbx_config' ]

    [ Context 'dundi-e164-canonical' created by 'pbx_config' ]

    -= 159 extensions (376 priorities) in 79 contexts. =-
  • Почему не проходит внутренний звонок?

    @slavabars Автор вопроса
    если отключить голосовую почту - звонок на этот номер пройдет.
  • Почему не проходит внутренний звонок?

    @slavabars Автор вопроса
    лог звонка с 100 на 111
    <------------>
    -- Executing [111@DLPN_Redcom:1] Gosub("SIP/100-00000017", "111,stdexten(SIP/111)") in new stack
    [Jun 26 07:51:09] NOTICE[1770][C-0000006b]: pbx.c:4911 pbx_extension_helper: No such label 'stdexten' in extension '111' in context 'DLPN_Redcom'
    [Jun 26 07:51:09] WARNING[1770][C-0000006b]: pbx.c:12202 pbx_parseable_goto: Priority 'stdexten' must be a number > 0, or valid label
    [Jun 26 07:51:09] ERROR[1770][C-0000006b]: app_stack.c:575 gosub_exec: Gosub address is invalid: '111,stdexten(SIP/111)'
    == Spawn extension (DLPN_Redcom, 111, 1) exited non-zero on 'SIP/100-00000017'
  • Как в Twig вывести вывод метода класса?

    @slavabars Автор вопроса
    Сделал по первому варианту