Quantcast
Channel: IP АТС Asterisk
Viewing all 1052 articles
Browse latest View live

FreePBX 13 Ring Groups

$
0
0

FreePBX 13 Ring Groups

Группа екстеншенов для приема звонков. Используйте там, где не требуется функционал Queues

freepbx13-ring-groups

ring group dialplan - extensions_additional.conf

ring group dialplan - extensions_additional.conf

В отличии от очереди (queue), в Asterisk нет такого объекта или модуля, как Ring Group.
Для вызова группы, данным модулем, генерируется соответствующий диалплан.

[ext-group]
include => ext-group-custom
exten => 666,1,GotoIf($["${__RINGINGSENT}" = "TRUE"]?cid)
exten => 666,n,Playtones(ring)
exten => 666,n,Progress
exten => 666,n(cid),Macro(user-callerid,)
exten => 666,n,Macro(blkvm-setifempty,)
exten => 666,n,GotoIf($["${GOSUB_RETVAL}" = "TRUE"]?skipov)
exten => 666,n,Macro(blkvm-set,reset)
exten => 666,n,Set(__NODEST=)
exten => 666,n(skipov),Set(RRNODEST=${NODEST})
exten => 666,n(skipvmblk),Set(__NODEST=${EXTEN})
exten => 666,n,GosubIf($[${DB_EXISTS(RINGGROUP/666/changecid)} = 1 & "${DB(RINGGROUP/666/changecid)}" != "default" & "${DB(RINGGROUP/666/changecid)}" != ""]?sub-rgsetcid,s,1())
exten => 666,n,Gosub(sub-record-check,s,1(rg,666,dontcare))
exten => 666,n,Set(RingGroupMethod=ringall)
exten => 666,n(DIALGRP),Macro(dial,20,${DIAL_OPTIONS},5000-5001-5002)
exten => 666,n,Gosub(sub-record-cancel,s,1())
exten => 666,n,Set(RingGroupMethod=)
exten => 666,n,GotoIf($["foo${RRNODEST}" != "foo"]?nodest)
exten => 666,n,Set(__NODEST=)
exten => 666,n,Macro(blkvm-clr,)
exten => 666,n,Goto(app-blackhole,hangup,1)
exten => 666,n(nodest),Noop(SKIPPING DEST, CALL CAME FROM Q/RG: ${RRNODEST})

exten => h,1,Macro(hangupcall,)

;--== end of [ext-group] ==--;

Обратите внимание на инклюд: include ⇒ ext-group-custom
Это значит, что вы можете написать собственный алгоритм вызова группы номеров с блек джеком и шлюхамии использовать его как ринг группу freepbx.

Группа вызова:

Номер группы вызываемый в диалплане.

Group Description

Описание группы. Понятное название для группы вызова. Используется для идентификации в других модулях FreePBX.

Ring Strategy

Стратегия вызова пользователей групы.

  • ringall - звонят-все: Звонят все каналы, пока один кто либо не ответит (по умолчанию)
  • hunt - серийное-искание: Звонок поступает на первый доступный номер в списке.
  • memoryhunt - прогресс-серийное-искание: Звонит первый внутренний номер в списке, затем первый и второй, затем первый, второй и третий в списке, и так далее.
  • *-prim -прим: Этот режим работает так же, как huntи memoryhunt, за исключением того, что если первый внутренний номер из списка занят, следующие по списку не будут звонить. Также зависит от установок 'Не беспокоить' и 'Перенаправление' на первом внутреннем номере списка. Если DND, то поиск в группе на этом заканчивается. Если CF (перенаправление) не перенаправит, то поиск в группе продолжится.<br>
  • firstavailable - первый-доступный: звонит первый доступный номер
  • firstnotonphone - первый-на-телефоне: звонит первый телефон, у которого не снята трубка.
  • random - случайный выбор

Ring Time

(max 300 sec) Время в секундах в течение которого телефоны будут звонить. Для всех типов серийного искания в стратегиях звонков, это время звонка для каждого шага стратегий звонков.

Extension List

Список внутренних номеров группы по одному в каждой строке. Вы можете добавить внешний номер или номер удаленной системы. Чтобы обозначить такие екстеншены, добавьте в конец решетку #. Чтобы группа могла вызвать внешний номер, его формат должен совпадать с шаблоном набора из модуля Outbound Routes. Также добавляйте решетку, если в качестве екстеншенов используются такие объекты freepbx, как Queues или Follow-Me.

Extension Quick Pick

Выбор участников группы из списка существующих.

Announcement

Приветствие:Сообщение, которое будет воспроизведено для входящего респондента, прежде чем пойдет звонок в эту группу.Для создания такого приветствия используйте раздел меню System Recordings

Play Music On Hold?

Использовать Музыку в ожидании? Если выбран класс Музыки в ожидании вместо простого сигнала вызова (КПВ), то позвонивший будет слушать музыку, пока кто-то не поднимет трубку.

  • Ring - КПВ (по умолчанию)
  • Inherit - Наследовать из маршрута
  • Default - Класс MOH по умолчанию в системе.
  • none

CID Name Prefix

Префикс ИД имени: Опционально, можно использовать какой-то префикс для звонка в эту группу. Например, если это группа «Sales:», то, установив такой префикс для этой группы, можно видеть, если звонит John Doe, то мы увидим на дисплее Sales:John Doe.

Alert Info

Дополнительная информация ALERT_INFO добавляет указанное значение в SIP header Alert-Info. Если телефон поддерживает, будет выведено на дисплей

freepbx13-ring-groups

Send Progress

Отправлять прогресс вызова в вызывающий канал.

YesNo

Ignore CF Settings

Игнорировать установки предустановленной переадресации звонков (CF). Если отмечено, форвардинг звонка будет игнорироваться. Это относится к общим установкам CF, форвардингу на Занято и при Неответе. Внутренний номер, набранный с '#' на конце, например для доступа к опции Следуйте сюда, может быть не сработать.

YesNo

Skip Busy Agent

Пропускать занятых операторов. Если отмечено, оператор на вызове будет пропущен и линия возвратит статус Занято. Это служит для тех случаев, когда используются мультиканальные телефоны и телефоны с опцией ожидания второго звонка, которые не верно отрабатывают в различных стратегиях звонков с серийным исканием, таким образом звонок перейдёт следующему члену группы дозвона.

YesNo

Enable Call Pickup

Включить перехват вызова в группе. Это даёт возможность прямого перехвата входящего вызова используя номер группы. Если не отмечено, то отдельные внутренние номера, являющиеся членами группы, могут перехватывать вызовы, используя сервисный код прямого перехвата, который будет работать вне зависимости отмечено здесь или нет.

YesNo

Confirm Calls

Подтверждение звонков. Используйте это, если звонок идёт на внешний номер, который нуждается в подтверждении. Например, мобильный телефон может включить голосовую почту, которая перехватит этот вызов. Нажатием на 1 можно заблокировать такие действия. Опция действительна только при стратегии вызова звонят-все.

YesNo

Remote Announce

Объявление пользователю принимающему вызов: Сообщение воспроизводится для принявшего этот звонок, если включена опция Подтверждение звонков. Для создания такого приветствия используйте раздел меню Запись сообщений.

Too-Late Announce

Сообщение Уже-поздно: Сообщение воспроизводится для принявшего этот звонок, если звонок уже принят прежде чем он успел нажать 1. Для создания такого сообщения используйте модуль System Recordings .

Изменить конфигурацию Caller ID входящих вызовов

  • Mode Режим: По умолчанию: Передавать Callers ID если транк это разрешает.
  • Фиксированное значение Caller ID: Всегда передавать фиксированное значение Caller ID указанное ниже.
  • Фиксированное значение Caller ID для внешних вызовов: Передавать фиксированное значение Caller ID указанное ниже только в случае исходящих внешних звонков. Внутренние соединения не будут использовать этот Caller ID.
  • Использовать набранный номер: Передавать набранный Caller ID для перенаправленных звонков, пришедших снаружи. Внутренние соединения будут передавать Caller ID в обычном режиме. Для этого предполагается входящий маршрут по DID. Он будет блокироваться на транке, где провайдеры блокируют чужие Caller ID.
  • Форсировать набранный номер: Передаёт номер, который был набран как назначение (DID) в качестве Номера ИД, для звонков пришедших снаружи. Внутренние соединения будут передавать Caller ID в обычном режиме. Для этого предполагается входящий маршрут по DID. Он будет передаваться через транк, где провайдеры блокируют чужие Caller ID.

Fixed CID Value

Фиксированное значение Caller ID:</b><br><span>Фиксированное значение для замены Caller ID в зависимости от одного из режимов выше. Должен быть только в цифровом формате, или опционально - в формате Е164 с использованием «+» впереди номера.

Record Calls

Записывать вызовы. Можно выбрать из следующих возможностей: всегда записывать соединения, никогда не записывать соединения, или записывать по запросу во время разговора. Если включена опция не записывать соединения, то запись по запросу также невозможна.

ForceDont CareNever

Везде где возможен вызов екстеншена, во FreePBX добавлена опция включения записи. Если, например, требуется записывать все входящие и исходящие вызовы, достаточно включить запись в модулях Inbound Routesи Outbound Routes, соответственно.

Destination if no answer

Назначение, если никто не ответил. В выпадающем списке, выберете модуль FreePBX, который вы хотите использовать для failover


FreePBX 12 screenshot


FreePBX DISA

$
0
0

FreePBX DISA

DISA (что расшифровывается как Direct Inward System Access) позволяет внешнему абоненту донабирать разрешенные номера.

Настройки

  • DISA Name: Информативное имя для идентификации в секции наведения.
  • PIN: Код необходимый для доступа к донабору. Вы можете отставить это поле пустым,что не рекомендуется в целях безопасности.
  • Caller ID: Устанавливает CID для вызовов совершенных через DISA.
  • Response Timeout: Время ожидания ,если набран неверный номер.
  • Digit Timeout: Время ожидания набора следующей цифры.
  • Require Confirmation: До приглашения ввести пароль, требует нажатия цифры 1.
  • Context: Контекст ипользуемый для набора. По умолчанию from-internal. Используйте собственный контекст для установки ограничений набора извне.
  • Allow Hangup: Разрешает завершить предыдущий вызов набором кода и получить вызывной тон, для следующего звонка.

FreePBX

DISA - команда плана набора Asterisk

FreePBX 12 System Recordings

$
0
0

FreePBX 12 System Recordings

Модуль используется для записи или загрузки системных голосовых сообщений и последующего использования в других модулях.

  • Admin
    • System Recordings

Запись голосовых сообщений

Вариант 1: Запись нового системного сообщения с использованием веб-интерфейса и телефона.

  • Запись
    • Введите номер телефона с которого будет производится запись и нажмите Go.
    • Наберите "*77" и наговорите сообщение после тонального сигнала.
    • По окончанию записи нажмите "#".
    • Для прослушивания сообщения нажмите "1", чтобы перезаписать сообщение нажмите "*".
    • Если вы удовлетворены записанным сообщением, повесьте трубку.
    • Чтобы прослушать записанное сообщение ещё раз, наберите "*99".
    • В поле Name this Recording:введите название сообщения. Например "test".
    • Нажмите Saveдля сохранения.

Теперь в правом верхнем углу появится ссылка на записанное сообщение.

:!:Файл хранится в «/var/lib/asterisk/sounds/custom/(recording-name).wav»

Вариант 2: Загрузка файла.

Запишите .wav файл с помощью Windows Sound Recorder или Audacity.
Файл должен быть следующего формата: PCM Encoded, 16 Bits, at 8000Hz, mono.
В веб интерфейсе, выберете «Browse…» и загрузите файл.
В разделе Name введите имя сообщения (без пробелов, eg. «main_general_greeting») и кликните Save.

Редактирование созданного сообщения и кода доступа к нему

  • в правом верхнем углу кликните на требуемое сообщение.

  • Cnange Name: Редактировать имя.
  • Descriptive Name: Редактировать описание.
  • Link to Feature Code: Включить код доступа для перезаписи голосового сообщения с телефона.
  • Feature Code Password: Пароль для защиты кода доступа для перезаписи сообщения с телефона.

Использование встроенных сообщений - Built-In Recordings

Эта опция позволяет создать сообщение используя предустановленные голосовые файлы Asterisk

  • Кликните Built-In Recordings
  • Выберете из выпадающего списка требуемый голосовой файл. Например "en/tt-monkeys".
  • Нажмите Go
  • В поле Change Nameвведите новое имя (обязательно). Например "test-monkeys"
  • Save

Теперь выбранный звуковой файл доступен для использования в модулях FreePBX.

FreePBX

Asterisk Dialplan - extensions.conf

$
0
0

Asterisk Dialplan - extensions.conf

Диалплан направляет каждый звонок от его источника, с помощью приложений (Dial, Voicemail, Background, ConfBridge и тд), в пункт назначения.

Наиболее важным для понимания Asterisk является план набора (dialplan). Все вызовы, будь-то голосовая почта, конференция, меню автосекретаря или вызов телефона, определяются логикой и концепцией диалплана.

Настройка производится в файле /etc/asterisk/extensions.conf .

Введение в расширения (extensions) и контексты (context)

Каналам назначаются контексты. Контексты определяют правила набора для каналов
План набора состоит из одного или нескольких контекстов. Каждый контекст это просто набор расширений (екстеншенов). Каждый екстеншен в контексте имеет уникальное имя.

Контексты ипользуются для выполнения основных функций АТС:

  • Безопасность: Можно разрешить междугородные/международные вызовы только конкретным абонентам.
  • Маршрутизация вызовов: Маршрутизация вызовов в зависимости от номера абонента.
  • Автосекретарь: Проигрывание приветствия и приглашение ввести добавочный номер.
  • Многоуровневые голосовые меню: Голосовые меню для службы поддержки, отдела продаж и т.д.
  • Авторизация: Запрос пароля для доступа к некоторым екстеншенам.
  • Обратный вызов: Позволяет уменьшить затраты на междугородние/международные вызовы.
  • Списки доступа: Занесение в черные списки надоедливых абонентов, не давая им возможности связаться с Вами.
  • Виртуальные АТС: Вы можете создать «виртуальную АТС» в пределах Вашей основной АТС.
  • Дневной/Ночной режим работы: Вы можете изменять поведение Вашей АТС в зависимости от времени суток.
  • Макросы: Можно создавать скрипты для решения повторяющихся задач в плане набора.

Что такое екстеншен?

В традиционных АТС екстеншен связан с интерфейсом (портом). В Asterisk екстеншен определяется как перечень приложений (applications) и их аргументов, выполняемых в определённом порядке, Порядок выполнения определяется приоритетами (priority). Когда екстеншен набран приоритеты выполняются до разъединения вызова, или перенаправления на другой екстеншен. Каждый шаг записывается следующим образом:

exten => <exten>,<priority>,<application>, [(<args>)]

Пример простого екстеншена

exten => 100,1,Wait(5)
exten => 100,2,Answer
exten => 100,3,Playback(demo-congrats)
exten => 100,n,Hangup

Этот екстеншен состоит из 4-х действий.

Первым выполняется приложение Wait c приоритетом 1 - ждать 5 секунд (время задаётся аргументом (5).
Вторым приложение Answer - поднять трубку.
Затем Playback - проиграть звуковой файл; аргумент задает имя файла (demo-congrats) в директории по умолчанию.
Последним выполняется приложение Hangup - повесить трубку. Приоритет 'n' означает next (следующий) и может использоваться вместо любого приоритета кроме 1-го.

Например:

[default]
exten => 100,1,Wait(5)
exten => 100,n,Answer
exten => 100,n,Playback(demo-congrats)
exten => 100,n,Hangup

Использование приоритета 'n' позволяет легко редактировать отдельные строки не переписывая все приоритеты.

Набор номера

Чаще всего вызывается другой интерфейс. Вызов осуществляется командой Команда Asterisk Dial.

[default]
exten => 100,1,Dial(DAHDI/1,20)
exten => 100,2,Voicemail(u100@default)
exten => 100,102,Voicemail(b100@default)

Этот пример иллюстрирует разные варианты действий в случае, если на вызов не ответили. Сначала вызывается канал DAHDI/1, если через 20 секунд никто не ответил вызов пренаправляется на VoiceMail()с объявлением «абонент не отвечает»(u100), Если же абонент занят, вызов перейдет на приоритет N+101, в нашем случае это приоритет 102.

Маршрутизация по CallerID

Пример маршрутизации по номеру вызывающего абонента.

[default]
exten => 100/1234567,1,Congestion
exten => 100,1,Dial(DAHDI/1,20)
exten => 100,2,Voicemail(u100)
exten => 100,102,Voicemail(b100)

Если вызывается екстеншен 100 вызов направляется на интерфейс DAHDI/1, кроме случая если вызов осуществляет абонент 1234567. В этом случае вызов отклоняется. На примере видно, что идентификатор вызывающего абонента задается формой '/1234567'.

Ещё один пример маршрутизации, теперь по отсутствию CallerID.

[default]
exten => 100/,1,Zapateller
exten => 100,1,Wait(0)
exten => 100,2,Dial(DAHDI/1)

В данном примере если поступает звонок без CallerID, вызов блокируется с помощью приложения Zapateller()

Вызов группы телефонов

Часто требуется чтобы вызов по неответу перешел на другой телефон. Рассмотрим как это сделать на примере «оператор».

[operator]
exten => 0,1,Dial(DAHDI/1,15)
exten => 0,2,Dial(DAHDI/1&DAHDI/2&DAHDI/3,15)
exten => 0,3,Playback(companymailbox)
exten => 0,4,Voicemail(100)
exten => 0,5,Hangup

Вызов поступает на DAHDI/1, в случае если телефон занят или не отвечает в течении 15 секунд, звонок переходит на группу телефонов, включая и DAHDI/1. Если и на этот раз никто не поднимает трубку, вызов переходит на голосовую почту.



Интерактивное Голосовое меню

Голосовое меню как правило задается в собственном контексте.

[sales]
exten => s,1,Background(welcome-sales)
exten => 1,1,Goto(default,100,1)
exten => 2,1,Goto(default,101,1)
[mainmenu]
exten => s,1,Background(welcome-mainmenu)
exten => 1,1,Goto(sales,s,1)
exten => 2,1,Dial,DAHDI/2
exten => 9,1,Directory(default)
exten => 0,1,Dial,DAHDI/3

Объявление проигрывается на расширении 's' (смотри Asterisk Dialplan:Стандартные расширения). В объявлении предлагается набрать '1' для вызова отдела продаж (производится переход в контекст 'sales'). Набрать '2' - вызов DAHDI/2. Набор '9' - вызов каталога (смотри Directory ) и '0' вызов DAHDI/3


Использование переменных

В Asterisk существуют глобальные и специфичные для каналов переменные, используемые в качестве аргументов для команд. Переменные записываются в диалплане в виде ${foo}, где 'foo' это имя переменной. Имена должны начинаться с буквы и могут состоять из любых цифр и букв, но существуют предопределенные имена, вот некоторые из них:

${CONTEXT}Текущий контекст.
${EXTEN}Текущий екстеншен.
${EXTEN:x}Текущий екстеншен с удалением первых цифр(где х кол-во удаляемых цифр)
${PRIORITY}Текущий приоритет
${CALLERID}Текущий CallerID (имя и номер)
${CALLERIDNUM}Текущий номер Caller ID
${CALLERIDNAME}Текущее имя Caller ID
${RDNIS}перенаправление DNIS

Глобальные переменные назначаются в секции [globals] диалплана. Рассмотрим следующий пример:

[globals]
MARK => DAHDI/1
GREG => DAHDI/2&SIP/telephone
WIL => DAHDI/3
JUDY => DAHDI/4
[mainmenu]
exten => 1,1,Dial(${GREG}&${MARK})
exten => 2,1,Dial(${WIL}&${JUDY})
exten => 3,1,Dial(${JUDY}&${MARK})

Организуя диалплан таким образом, можно быстро и легко переназначать физические интерфейсы для конкретных пользователей, часто используемых в контекстах.

смотри подробнее Использование переменных в плане набора Asterisk

Вложенные контексты

Один контекст может включать другие контексты, обрабатываемые в порядке перечисления. Смотри также Порядок выбора нужного екстеншена при использовании шаблонов.

include => <context>[|<hours>|<weekdays>|<monthdays>|<months>]

Где <context> - включаемый контекст
опционально:
<hours> - часы в которые действителен контекст (например рабочее время 9:00-17:00)
<weekdays> -дни недели (mon-fri)
<monthdays> - дни
<month> - месяцы

Пример:

[local]
exten => _[0-79].,1,Dial(SIP/trunk/${EXTEN})
[long]
exten => _8.,1,Dial(SIP/trunk/${EXTEN})
[local_long]
include => local
include => long
[local_only]
include => local

В этом примере контекст 'local_long'' включает два других контекста для городской и междугородней связи, а контекст 'local_only' только для городской.

Дневной / Ночной режимы. Маршрутизация по времени

Вложенные контексты можно использовать для реализации дневного, ночного и празничного режимов. Рассмотрим следующий пример:

[newyears]
exten => s,1,Playback(happy-new-years)
[daytime]
exten => s,1,Dial(DAHDI/1,20)
[nighttime]
exten => s,1,Playback(after-hours-msg)
[default]
include => newyears||||1|jan
include => daytime|9:00-17:00|mon-fri
include => nighttime

В этом примере заданы дневной, ночной и праздничный режимы прихода звонков.

Исходящие вызовы

Направление исходящей связи можно реализовать определением короткого кода доступа (например '9'), или определить полностью шаблон набираемых номеров.

[international]
ignorepat => 9
exten => _9810.,1,Dial(DAHDI/g2/${EXTEN:1})
exten => _9810.,2,Congestion
include => longdistance

[longdistance]
ignorepat => 9
exten => _98[02-9]XXXXXXXXX,1,Dial(DAHDI/g2/${EXTEN:1})
exten => _98[02-9]XXXXXXXXX,2,Congestion
include => local

[local]
ignorepat => 9
exten => _9[02-79]XXXXXX,1,Dial(DAHDI/g2/${EXTEN:1})
exten => _9[02-79]XXXXXX,2,Congestion
include => default

В этом примере рассматриваются 3 контекста с различными правами доступа к Телефонной сети Общего Пользования .

Конструкция 'ignorepat ⇒ 9 ' говорит Астериску не отключать тон готовности после набора заданной цифры.

  • Контекст [international] позволяет набрать международный номер с любым количеством цифр.
  • Контекст [longdistance] - междугородний номер до 11-ти цифр.
  • Контекст [local] - городской номер длинной до 7-ми цифр.

Переменная ${EXTEN:1} удаляет префикс:

${123456789:1} - возвращает строку 23456789
${123456789:-4} - возвращает строку 6789
${123456789:0:3} - возвращает строку 123
${123456789:2:3} - возвращает строку 345
${123456789:-4:3} - возвращает строку 678

Шаблоны Patterns

Екстеншены могут сопоставляться шаблону, вместо однозначно заданных цифр. Шаблон должен начинаться с символа подчеркивания ( _ ) и может использовать любой из следующих символов:

  • X– любая цифра от 0-9
  • Z– любая цифра от 1-9
  • N– любая цифра от 2-9
  • [14-6]– цифры 1,4, 5 и 6
  • .– любые возможные символы.

Резервные транки и LCR (выбор направления с наименьшей стоимостью)

Весьма полезно настроить LCR (Least Coast Routing) и перенаправление в случае отказа внешней линии.

[tolllongdistance]
exten => _98XXXXXXXXXX,1,Dial(DAHDI/g2/${EXTEN:1})
exten => _98XXXXXXXXXX,2,Congestion
[low_rate_moscow]
exten => _98495XXXXXXX,1,Dial(IAX/trunk/${EXTEN:1})
exten => _98495XXXXXXX,2,Dial(DAHDI/g2/${EXTEN:1})
exten => _98495XXXXXXX,3,Congestion
[longdistance]
include => low_rate_moscow
include => tolllongdistance

В этом примере междугородние вызовы направляются на DAHDI интерфейс, но звонки в Москву направляются через более выгодного провайдера на IAX транк. В случае же недоступности IAX транка, вызовы перенаправляются через DAHDI.

Использование Макросов

Вам может потребоваться создать множество екстеншенов (расширений) очень похожих друг на друга. Чтобы упростить работу с диалпланом используются Макросы. Для создания макроса используется контекст имя которого начинается с «macro-» и далее уникальное имя макроса. Выполнение макроса начинается с ектеншена 's'. В макросах используются локальные переменные:

${MACRO_EXTEN} – Екстеншен вызываемый макросом ${MACRO_CONTEXT} – Контекст вызываемый макросом ${MACRO_PRIORITY} – активный приоритет вызываемый макросом ${MACRO_OFFSET} – если установлено вызывает смещение n + ${MACRO_OFFSET} ${ARGn} – аргумент 'n' в макросе.

[macro-oneline]
;
; Однолинейный телефон
;
; ${ARG1} – Телефон
;
exten => s,1,Dial(${ARG1},20)
exten => s,2,Voicemail(u${MACRO_EXTEN})
exten => s,3,Hangup
exten => s,102,Voicemail(b${MACRO_EXTEN})
exten => s,103,Hangup
[macro-twoline]
;
; Двухлинейный телефон
;
; ${ARG1} – Телефон (линия) 1
; ${ARG2} – Телефон (линия) 2
;
exten => s,1,Dial(${ARG1},20)
exten => s,2,Voicemail(u${MACRO_EXTEN})
exten => s,102,Dial(${ARG2},20)
exten => s,103,Voicemail(b${MACRO_EXTEN})

[default]
exten => 1000,1,Macro(oneline,DAHDI/1)
exten => 1001,1,Macro(oneline,SIP/1001)
exten => 1002,1,Macro(twoline,DAHDI/3,DAHDI/4)

Когда макросы [macro-oneline] и [macro-twoline] созданы, в контексте [default] надо написать только одну сроку для выполнения нескольких стандартных действий.

[from-phones1]
exten => _X.,1,Dial(SIP/sip_trunk/${EXTEN},180,)
exten => _X.,n,Macro(dialstatus,s,1)

exten => _X.,1,Dial(DAHDI/g2/${EXTEN},180,)
exten => _X.,n,Macro(dialstatus,s,1)

[macro-dialstatus]
exten => s,1,Answer
exten => s,n,Goto(s-${DIALSTATUS},1)
exten => s-NOANSWER,1,Hangup
exten => s-CONGESTION,1,Congestion
exten => s-CANCEL,1,Hangup
exten => s-BUSY,1,Playtones(425/375,0/375)
exten => s-BUSY,n,Busy(7)
exten => s-BUSY,n,Hangup
exten => s-CHANUNAVAIL,1,Hangup

Приложение Macro объявлено устаревшим, вместо него рекомендуется использовать GoSub.

Синтаксис Gosub

  Gosub([[context,]exten,]priority[(arg1[,...][,argN])])
[sub-test]
exten => _X.,1,Dial(${ARG1}/${ARG2},20,)
exten => _X.,n,Playback(tt-weasels)
exten => _X.,n,Hangup

[test]
exten => _X.,1,Gosub(sub-test,${EXTEN},1(SIP/trunk,${EXTEN}))

Запись разговоров

[macro-mixmonitor]
exten => s,1,Set(RECORD_FILENAME=${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}-${CALLERID(num)})
        same => n,MixMonitor(${RECORD_FILENAME}.wav,b)
        same =>  n,Dial(${ARG1},180,) 
[outbound_route1]
exten => _9.,1,Macro(mixmonitor,PJSIP/sipprovider/${EXTEN:1})

В данном примере вызов с префиксом '9', должен быть скоммутирован через SIP транк ITSP. Разговор будет записан в формате 'wav' и сохранен в директорию по умолчанию «/var/lib/asterisk/monitor/ГодМесяцДень-ЧасыМинутыСекунды-НомерВызывающего Абонента.wav

Структура same ⇒ позволяет сократить код, избежав многочисленных повторений «exten ⇒ s,» в данном случае.

Хорошая мысль поэкспериментировать и с другими переменными в имени файла, например ${UNIQUEID}.

Asterisk: настройка и установка

FreePBX 13 Extensions

$
0
0

FreePBX 13 Extensions

Добавление внутренних номеров. Во FreePBX, как и в традиционных АТС термин 'extensions' используется для обозначения внутренних номеров (хотя на примере Custom Extensions, видно, что номера могут быть не только внутренними, но и принадлежать другой АТС).

Сперва выберете технологию, которая будет использована для конфигурации номера:

freepbx13-extensions

Типы Екстеншенов:

  • Custom Extensions - Экстеншен неопределенной технологии, как правило используется для назначения внешнего номера, например, на дружественной АТС в сети. Технология (например: IAX2/iaxtrunk/<num>) задается параметром Dial, в настройках екстеншена.
  • DAHDI Extensions - Номер устройства DAHDI, например платы FXSили устройства TDM over IP типа Asteroid.
  • IAX2 Extensions - Номер подключаемый по протоколу Inter Asterisk Exchange (IAX).
  • PjSIP Extensions - SIP аккаунт с использованием драйвера res_pjsip.
  • chan_SIP - SIP аккаунт с использованием драйвера chan_sip.

После создания аккаунта по технологии chan_sip или res_pjsip, вы можете, после, изменить используемый драйвер в настройках екстеншена. FreePBX сгенерирует новый конфиг в соответствии с требованиями драйвера.

  • Virtial Extension - В отличии от Custom Extensions, не имеет опции Dial вообще. Можно использовать в качестве контейнера, каких-либо свойств, например виртуального факса или голосового почтового ящика, без привязки явного устройства.

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

Общие параметры Extensions

General

- Add Extension

freepbx13-basic-extensionsназначьте:

  • User Extension - используется для вызова екстеншена
  • Display Name - будет использовано в качестве CALLERID(name)
  • Outbound CallerID - используется в качестве CallerId для внешних вызовов, если это разрешено настройками исходящей маршрутизации
- User Manager Settings

freepbx13-extensions-user-manager User Managementмодуль управления пользователями FreePBX. Пользователь FreePBX (не путайте с администраторами, хотя этот пользователь может быть и администратором) назначается для доступа к User Control Panel, назначения виртуального факса для екстеншена и других очень полезных возможностей интерфейса FreePBX.
При создании екстеншена, вы можете не беспокоится о этих настройках. Если в дальнейшем понадобится что-то изменить, сделайте это через соответствующий модуль.

Advanced

-Assigned DID/CID

freepbx13-extensions-did-cid

DID или Direct Inward Dialing - прямой входящий набор. По сути дополнительное расширение диалплана, сопоставленное данному екстеншену, которое будет добавлено в Inbound Routes.

  • DID description - описание для DID
  • Add Inbound DID - номер прямого входящего набора.
  • Add Inbound CID - CallerID вызывающего абонента, если задано, DID будет действовать только для звонков с этого номера.

Если вы назначите данные параметры, в модуле Inbound Routes появится соответствующее правило:

Если вы назначите данные параметры, в модуле Inbound Routes появится соответствующее правило:

freepbx13-extensions-did-cid-inbound-routes


Вы можете задать столько DID для одного екстеншена, сколько вам требуется. Назначенные маршруты отобразятся в настройках екстешена:

freepbx13-extensions-did-cid-inbound-routes-list

- Edit Extensions

freepbx13-edit-extensions

  • CID Num Alias - Псевдоним CID. Если не задано, для внутренних вызовов в качестве CALLERID(num) екстеншена используется его номер. Если задать здесь другое значение, то будет использоваться оно. Здесь можно задать номер Ринг группыили очереди, например, чтобы пользователи перенабирали не конкретный номер, а группу телефонов тех. поддержки. Не используется для внешних вызовов.
  • SIP Alias - если хотите использовать прямой (direct) sip набор, здесь можно задать псевдоним, для вызова данного екстеншена.
- Extension Options

freepbx13-extension-options

  • Asterisk Dial Options - опции команды Asterisk Dialдля внутренних исходящих вызовов с данного екстеншена. По умолчанию глобальные дефолтные значения заданные в Advanced Settings. Задайте override значения, если требуется. Подробнее о опциях команды Dial
  • Ring Time - Таймаут вызова екстеншена. По умолчанию дефолтное значение из Advanced Settings
  • Ringer Volume Override - Переназначение громкости (только Sangoma Phones)
  • Call Forward Ring Time - Время вызова в секундах при Call Forward, Call Forward Busy, по истечению которого вызов будет перенаправлен в голосовую почту или - Optional Destinations. Если ни то, ни другое не задано, будет звонить до упора.
  • Outbound Concurrency Limit - кол-во одновременных вызовов через данный пир.
  • Call Waiting - Включить службу ожидания вызова. Если включено и телефон занят, вызывающему абоненту подается сигнал вызова, в ожидании освобождения телефона. Если выключено, будет дан отбой. Выключите Call Waiting, если екстеншен обслуживает очередь.

Большинство пользователей привыкли, получать сигнал занято. Иначе они считают, что им просто не отвечают. Обратите внимание, что все IP телефоны, тоже имеют такую опцию. Отключите ожидающий вызов и на аппаратах, если требуется. В CW Enabled by Defaultможно выключить call waiting по умолчанию для новых екстеншенов.

  • Call Screening - Служба представления, требует от внешнего вызывающего абонента назвать свое имя и проигрывает записанное имя вызываемому, прежде чем соединить их, давая возможность отказаться от приема вызова.
  • Pinless Dialing - Включить Пин код для исходящих вызовов.
  • Emergency CID - CallerID для транка помеченного, как emergency (т.е. для экстренных вызовов)
  • Queue State Detection - Если данный екстеншен обслуживает очередь, когда оттуда приходит вызов, очередь пытается определить состояние екстеншена, доступен он или нет.

В некоторых случаях, когда установлено FollowMeили использован виртуальный екстеншен, очередь будет считать его недоступным и екстеншен не будет вызван, несмотря на то, что может ответить. Чтобы избежать подобных коллизий, используйте 'Ignore State'. Однако для большинства сценариев рекомендуется 'Use State'.

asterisk -rx 'database show'

asterisk -rx 'database show'

Ни Virtual, ни Custom Extensions не имеют собственных конфигов. Где же храняться эти многочисленные настройки? А хранятся они во внутренней базе данных Asterisk - astdb. Откуда диалплан сгенерированный FreePBX в extensions_additional.confи берет их, подставляя в макросы.

# asterisk -rx 'database show' | grep 667
/AMPUSER/667/answermode                           : disabled
/AMPUSER/667/cfringtimer                          : 0
/AMPUSER/667/cidname                              : test
/AMPUSER/667/cidnum                               : 667
/AMPUSER/667/concurrency_limit                    : 3
/AMPUSER/667/device                               : 667
/AMPUSER/667/dialopts                             : Ttr
/AMPUSER/667/hint                                 : ,CustomPresence:667
/AMPUSER/667/intercom                             : enabled
/AMPUSER/667/noanswer                             :
/AMPUSER/667/outboundcid                          :
/AMPUSER/667/password                             :
/AMPUSER/667/queues/qnostate                      : usestate
/AMPUSER/667/recording                            :
/AMPUSER/667/recording/in/external                : dontcare
/AMPUSER/667/recording/in/internal                : dontcare
/AMPUSER/667/recording/ondemand                   : disabled
/AMPUSER/667/recording/out/external               : dontcare
/AMPUSER/667/recording/out/internal               : dontcare
/AMPUSER/667/recording/priority                   : 10
/AMPUSER/667/ringtimer                            : 0
/AMPUSER/667/rvolume                              :
/AMPUSER/667/voicemail                            : novm
/CW/667                                           : ENABLED

Это касается и ектеншенов с технологиями, для опций диалплана, не предусмотренных их драйверами.

- Recording Options

freepbx13-extensions-recording-options

  • Inbound External Calls - Записывать входящие внешние вызова
    • Force - Всегда, даже если B-leg Don't Care, No
    • Yes - Записывать.
    • Don't Care - Не записывать, но yes и forceзаставят.
    • No - Не записывать.
    • Never - Не записывать никогда.
  • Outbound External Calls - Внешние исходящие вызовы
  • Inbound Internal Calls - Входящие внутренние вызовы
  • Outbound Internal Calls -Внутренние исходящие вызовы
  • On Demand Recording - Запись по запросу (абонентским кодом)
  • Record Priority Policy - Политики определяют записывать вызов или нет, если настройки двух ектеншенов вступают в противоречие друг с другом. Более высокий приоритет определяет политику. Если приоритеты равны, используется глобальная настройка Call Recording Policy - caller или callee (вызывающий или вызываемый) . По умолчанию выше вызывающий. Например:
  • Yesпротив Never - never победил
  • Yesпротив No - пошли меряться члприоритетами
    • приоритеты равны - Вызывающий победил (по умолчанию)
  • Forceпротив Never - ?

en

en

Call recording policy priority relative to other extensions when there is a conflict between an extension wanting recording and the other not wanting it. The higher of the two determines the policy, on a tie the global policy (caller or callee) determines the policy.

FreePBX. Настройка внутренних номеров

Здесь назначается, все, что может рассматриваться как расширение (Extensions или внутренний номер) в классической АТС.

Добавление нового расширения (екстеншена)

Выберите один из протоколов SIP, IAX, DAHDI или тип Custom.

Edit Extension (Редактировать внутренний номер)

  • User Extension - Это уникальный номер, который может быть набран с любого другого екстеншена.
  • CID Num Alias - CID используется для внутренних вызовов и замещает номер екстеншена. На внешние вызовы не распространяется.
  • SIP Alias - CID Используется при прямых (direct) и анонимных SIP вызовах.

Extension Options (Опции внутреннего номера)

  • Outbound CID (Исходящий Caller ID) - CID для внешних вызовов. Когда екстеншен совершает вызов через транк, подставляется данный callerid, дальнейшие действия в отношении CID зависят от настроек Trunksи FreePBX 13. Исходящая маршрутизация. Outbound Routes.
  • Asterisk Dial Options - Опции команды Dial(). Если галочка override установлена, превалируют над глобальными настройками. Не распространяются на вызовы через транки.
  • Ring TimeВремя вызова абонента,прежде чем вызвающий абонент будет перенаправлен на голосовую почту (если назначено). По умолчанию задано общее время из Advanced Settings Ringtime Default
  • Call Forward Ring Time - Время в секундах до перевода вызова на номер предустановленной переадресации. Если установлено Always вызов не переводится, а просто продолжает звонить.
  • Outbound Concurrency Limit - Кол-во возможных одновременных вызовов для данного аккаунта. Важный параметр безопасности.
  • Call WaitingОжидающий вызов - Если выбрано Enable, при входящем вызове на занятый екстеншен вызов будет припаркован в течении Ring time, а затем переадресован на голосовую почту или другой номер. Если же выключено, будет дан отбой (установите disable для агентов очереди, например).
  • Emergency CIDИсходящий CallerID, применяемый на маршрутах FreePBX 13. Исходящая маршрутизация. Outbound Routes.отмеченных как emergency
  • Queue State Detection - Use State/Ignore State - если этот екстеншен обслуживает очередь FreePBX 13 Queues, использовать информацию о состоянии устройства для вызова из очереди.

Assigned DID/CID (назначенный прямой входящий набор)

  • DID DescriptionОписание этого DID
  • Add inbound DIDПрямой входящий набор, связанный с данным екстеншеном.
  • Add Inbound CID CallerID вызывающего абонента для прямого входящего набора. Позволяет, например, маршрутизировать по разному, вызовы на один DID, но с разных номеров.

Device Options (Основные опции устройства)

Это важнейшая группа опций екстеншена. Здесь определяются ключевые настройки SIP, IAX, DAHDI др. устройств.

  • Secret (пароль екстеншена) - Это пароль используемый устройством связи для аутентификации в Asterisk.
  • dtmfmodeРежим передачи тональных сигналов. По умолчанию rfc2833.Попробуйте in bandили auto, если испытываете проблемы.

  • canreinviteвключить/выключить прямой голосовой трафик между пирами. Directmedia

  • context - контекст определяет правила набора номеров (dialplan) для данного екстеншена. По умолчанию 'from-internal' контекст позволяющий набирать все, что определенно во FreePBX: Екстеншены, группы, исходящую маршруты итд.

См. также для более подробной информации о контекстах во FreePBX FreePBX custom contextи Файлы и стандартные контексты FreePBX

  • host - IP адрес VoIP устройства, по умолчанию 'dynamic', т.е. любой.
  • trustrpid - Если установлено «trustrpid=yes» в настройках пира sip.conf, тогда Asterisk возьмет номер из RPI header (вместо From header) из запроса полученного при входящем вызове.
  • sendrpid - Если установлено «sendrpid=yes» в настройках пира в sip.conf тогда Asterisk добавит RPI header, как показано в примере:

Remote-Party-ID: «Vasya Pupkin» <sip:1001@192.168.1.11>;privacy=off;screen=no

type - 'friend', user или 'peer'

peer: SIP пир, который Asterisk может использовать для совершения исходящих вызовов.
user: SIP пир, для входящих вызовов Asterisk .
friend: Запись, которая одновременно и user и peer. Этот тип наиболее подходит для телефонов и других устройств.

  • qualify - Посылать пакет OPTIONS каждые 2 секунды, если значение yes или указывается время в секундах.
  • qualifyfreq - Время в секундах между посылками qualify, если qualify=yes.

Для SIP пользователей этого типа Asterisk создаст два объекта, один типа peer и один типа user, с одинаковыми именами.

  • NAT - 'Yes' если телефон подключается из сети интернет и находится за NAT. См. также External IP

Yes - (force_rport,comedia) Всегда считать, что устройство за NAT

No - (no) Не использовать NAT.

<fc #fa8072>Force rport</fc> - (force_rport) Принудительно использовать rport, независимо от поступившей в SIP заголовке информации.

<fc #fa8072>comedia</fc> - (comedia) Использовать rport, если удаленная сторона требует этого, в том числе и для обработки RTP медиа трафика.

Automatic Force Both - (auto_force_rport,auto_comedia) См. ниже

Automatic Force rport - (auto_force_rport) Принудительно использовать rport если Asterisk обнаруживает, что входящий SIP запрос от удаленно точки пересекал NAT.

Automatic comedia - (auto_comedia) Принудительно использовать comedia если Asterisk обнаруживает, что входящий SIP запрос от удаленно точки пересекал NAT.

never - (no) Никогда не использовать NAT.

route - (force_rport) Подразумевать NAT.

  • transport - Транспортный протокол для данного SIP екстеншена. Если используется TCP и/или TLS, WS, то транспорт должен быть сконфигурирован в секции SIP [general] tcpenableсм также webrtc.

  • avpf - Аудио видео профиль медиа потоков для использования WebRTC.
  • icesupport - Включить поддержку ICE См. подробнее: Interactive Connectivity Establishment (ICE) в Asterisk
  • encryption - Включить/выключить SRTP. Если включено, а удаленный пир не поддерживает SRTP, вызов завершится с HANGUPCAUSE=58.
  • callgroup - Каждый екстеншен может состоять в одной или нескольких группах (1,3-5)
  • pickupgroup - Каждый екстеншен может состоять в одной или нескольких группах (1,3-5). Другие участники группы смогут перехватывать вызовы кодом Asterisk General Call PickupFreePBX Feature Codes
  • Disallow - 'All' отключить использование всех разрешенных кодеков.
  • Allow - Разрешить использование определенных кодеков. Используется совместно с 'Disallow'. Для указания нескольких кодеков используйте амперсанд: alaw&ulaw&g729
  • Dial - Технология и номер екстеншена. Например: SIP/1000
  • accountcode - аккаунт код для данного екстеншена.
  • Mailbox - Эта опция позволяет настроить голосовой почтовый ящик. Обычно имеет вид: № екстеншена@device.
  • deny - Диапазон IP адресов. с которых запрещено подключение к данному аккаунту. пример: 123.123.123.0/255.255.255.0
  • permit - IP с которых разрешено подключение. Высокоэффективная мера безопасности. Разделите удаленных абонентов и абонентов локальной сети. Пример: 192.168.0.0/255.255.255.0, 10.2.15.0/255.255.0.0
  • Record Incoming - Запись входящих звонков.
  • Record Outgoing - Запись исходящих вызовов.
  • Voicemail - Если выбрано 'Disabled' почта для данного екстеншена не используется.
  • Voicemail Password - пароль для доступа к голосовому почтовому ящику.
  • Email Address - Адрес для уведомлений о принятых сообщениях.

пример - секция Device Options

asterisk:cf:sip.conf

$
0
0

Настройка SIP в Asterisk 13 sip.conf

;
; SIP Configuration example for Asterisk
;
; Note: Please read the security documentation for Asterisk in order to
; 	understand the risks of installing Asterisk with the sample
;	configuration. If your Asterisk is installed on a public
;	IP address connected to the Internet, you will want to learn
;	about the various security settings BEFORE you start
;	Asterisk.
;
;	Especially note the following settings:
;		- allowguest (default enabled)
;		- permit/deny/acl - IP address filters
;		- contactpermit/contactdeny/contactacl - IP address filters for registrations
;		- context - Which set of services you offer various users
;
; SIP dial strings
; ----------------------------------------------------------
; In the dialplan (extensions.conf) you can use several
; syntaxes for dialing SIP devices.
;        SIP/devicename
;        SIP/username@domain   (SIP uri)
;        SIP/username[:password[:md5secret[:authname[:transport]]]]@host[:port]
;        SIP/devicename/extension
;        SIP/devicename/extension/IPorHost
;        SIP/username@domain//IPorHost
; And to alter the To: or the From: header, you can additionally append
; the following to any of the above strings:
;        [![touser[@todomain]][![fromuser][@fromdomain]]]
;
;
; Devicename
;        devicename is defined as a peer in a section below.
;
; username@domain
;        Call any SIP user on the Internet
;        (Don't forget to enable DNS SRV records if you want to use this)
;
; devicename/extension
;        If you define a SIP proxy as a peer below, you may call
;        SIP/proxyhostname/user or SIP/user@proxyhostname
;        where the proxyhostname is defined in a section below
;        This syntax also works with ATA's with FXO ports
;
; SIP/username[:password[:md5secret[:authname]]]@host[:port]
;        This form allows you to specify password or md5secret and authname
;        without altering any authentication data in config.
;        Examples:
;
;        SIP/*98@mysipproxy
;        SIP/sales:topsecret::account02@domain.com:5062
;        SIP/12345678::bc53f0ba8ceb1ded2b70e05c3f91de4f:myname@192.168.0.1
;
; IPorHost
;        The next server for this call regardless of domain/peer
;
; All of these dial strings specify the SIP request URI.
; In addition, you can specify a specific To: header by adding an
; exclamation mark after the dial string, like
;
;         SIP/sales@mysipproxy!sales@edvina.net
;
; (Specifying only @todomain without touser will create an invalid SIP
; request.)
;
; Similarly, you can specify the From header as well, after a second
; exclamation mark:
;
;         SIP/customer@mysipproxy!!customersupport@wearespindle.com
;
; A new feature for 1.8 allows one to specify a host or IP address to use
; when routing the call. This is typically used in tandem with func_srv if
; multiple methods of reaching the same domain exist. The host or IP address
; is specified after the third slash in the dialstring. Examples:
;
; SIP/devicename/extension/IPorHost
; SIP/username@domain//IPorHost
;
; CLI Commands
; -------------------------------------------------------------
; Useful CLI commands to check peers/users:
;   sip show peers               Show all SIP peers (including friends)
;   sip show registry            Show status of hosts we register with
;
;   sip set debug on             Show all SIP messages
;
;   sip reload                   Reload configuration file
;   sip show settings            Show the current channel configuration
;
; ------ Naming devices ------------------------------------------------------
;
; When naming devices, make sure you understand how Asterisk matches calls
; that come in.
;	1. Asterisk checks the SIP From: address username and matches against
;	   names of devices with type=user
;	   The name is the text between square brackets [name]
;	2. Asterisk checks the From: addres and matches the list of devices
;	   with a type=peer
;	3. Asterisk checks the IP address (and port number) that the INVITE
;	   was sent from and matches against any devices with type=peer
;
; Don't mix extensions with the names of the devices. Devices need a unique
; name. The device name is *not* used as phone numbers. Phone numbers are
; anything you declare as an extension in the dialplan (extensions.conf).
;
; When setting up trunks, make sure there's no risk that any From: username
; (caller ID) will match any of your device names, because then Asterisk
; might match the wrong device.
;
; Note: The parameter "username" is not the username and in most cases is
;       not needed at all. Check below. In later releases, it's renamed
;       to "defaultuser" which is a better name, since it is used in
;       combination with the "defaultip" setting.
; ----------------------------------------------------------------------------

; ** Old configuration options **
; The "call-limit" configuation option is considered old is replaced
; by new functionality. To enable callcounters, you use the new 
; "callcounter" setting (for extension states in queue and subscriptions)
; You are encouraged to use the dialplan groupcount functionality
; to enforce call limits instead of using this channel-specific method.
; You can still set limits per device in sip.conf or in a database by using
; "setvar" to set variables that can be used in the dialplan for various limits.

[general]
context=public                  ; Default context for incoming calls. Defaults to 'default'
;allowguest=no                  ; Allow or reject guest calls (default is yes)
				; If your Asterisk is connected to the Internet
				; and you have allowguest=yes
				; you want to check which services you offer everyone
				; out there, by enabling them in the default context (see below).
;match_auth_username=yes        ; if available, match user entry using the
                                ; 'username' field from the authentication line
                                ; instead of the From: field.
allowoverlap=no                 ; Disable overlap dialing support. (Default is yes)
;allowoverlap=yes               ; Enable RFC3578 overlap dialing support.
                                ; Can use the Incomplete application to collect the
                                ; needed digits from an ambiguous dialplan match.
;allowoverlap=dtmf              ; Enable overlap dialing support using DTMF delivery
                                ; methods (inband, RFC2833, SIP INFO) in the early
                                ; media phase.  Uses the Incomplete application to
                                ; collect the needed digits.
;allowtransfer=no               ; Disable all transfers (unless enabled in peers or users)
                                ; Default is enabled. The Dial() options 't' and 'T' are not
                                ; related as to whether SIP transfers are allowed or not.
;realm=mydomain.tld             ; Realm for digest authentication
                                ; defaults to "asterisk". If you set a system name in
                                ; asterisk.conf, it defaults to that system name
                                ; Realms MUST be globally unique according to RFC 3261
                                ; Set this to your host name or domain name
;domainsasrealm=no              ; Use domains list as realms
                                ; You can serve multiple Realms specifying several
                                ; 'domain=...' directives (see below). 
                                ; In this case Realm will be based on request 'From'/'To' header
                                ; and should match one of domain names.
                                ; Otherwise default 'realm=...' will be used.
;recordonfeature=automixmon	; Default feature to use when receiving 'Record: on' header
				; from an INFO message. Defaults to 'automon'. Works with
				; dynamic features. Feature must be usable on requesting
				; channel for it to work. Setting this value to a blank
				; will disable it.
;recordofffeature=automixmon	; Default feature to use when receiving 'Record: off' header
				; from an INFO message. Defaults to 'automon'. Works with
				; dynamic features. Feature must be usable on requesting
				; channel for it to work. Setting this value to a blank
				; will disable it.

; With the current situation, you can do one of four things:
;  a) Listen on a specific IPv4 address.      Example: bindaddr=192.0.2.1
;  b) Listen on a specific IPv6 address.      Example: bindaddr=2001:db8::1
;  c) Listen on the IPv4 wildcard.            Example: bindaddr=0.0.0.0
;  d) Listen on the IPv4 and IPv6 wildcards.  Example: bindaddr=::
; (You can choose independently for UDP, TCP, and TLS, by specifying different values for
; "udpbindaddr", "tcpbindaddr", and "tlsbindaddr".)
; (Note that using bindaddr=:: will show only a single IPv6 socket in netstat.
;  IPv4 is supported at the same time using IPv4-mapped IPv6 addresses.)
;
; You may optionally add a port number. (The default is port 5060 for UDP and TCP, 5061
; for TLS).
;   IPv4 example: bindaddr=0.0.0.0:5062
;   IPv6 example: bindaddr=[::]:5062
;
; The address family of the bound UDP address is used to determine how Asterisk performs
; DNS lookups. In cases a) and c) above, only A records are considered. In case b), only
; AAAA records are considered. In case d), both A and AAAA records are considered. Note,
; however, that Asterisk ignores all records except the first one. In case d), when both A
; and AAAA records are available, either an A or AAAA record will be first, and which one
; depends on the operating system. On systems using glibc, AAAA records are given
; priority.

udpbindaddr=0.0.0.0             ; IP address to bind UDP listen socket to (0.0.0.0 binds to all)
                                ; Optionally add a port number, 192.168.1.1:5062 (default is port 5060)

;rtpbindaddr=172.16.42.1        ; IP address to bind RTP listen sock to (default is disabled). When
                                ; disabled the udpbindaddr is used.

; When a dialog is started with another SIP endpoint, the other endpoint
; should include an Allow header telling us what SIP methods the endpoint
; implements. However, some endpoints either do not include an Allow header
; or lie about what methods they implement. In the former case, Asterisk
; makes the assumption that the endpoint supports all known SIP methods.
; If you know that your SIP endpoint does not provide support for a specific
; method, then you may provide a comma-separated list of methods that your
; endpoint does not implement in the disallowed_methods option. Note that 
; if your endpoint is truthful with its Allow header, then there is no need 
; to set this option. This option may be set in the general section or may
; be set per endpoint. If this option is set both in the general section and
; in a peer section, then the peer setting completely overrides the general
; setting (i.e. the result is *not* the union of the two options).
;
; Note also that while Asterisk currently will parse an Allow header to learn
; what methods an endpoint supports, the only actual use for this currently
; is for determining if Asterisk may send connected line UPDATE requests and
; MESSAGE requests. Its use may be expanded in the future.
;
; disallowed_methods = UPDATE

;
; Note that the TCP and TLS support for chan_sip is currently considered
; experimental.  Since it is new, all of the related configuration options are
; subject to change in any release.  If they are changed, the changes will
; be reflected in this sample configuration file, as well as in the UPGRADE.txt file.
;
tcpenable=no                    ; Enable server for incoming TCP connections (default is no)
tcpbindaddr=0.0.0.0             ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces)
                                ; Optionally add a port number, 192.168.1.1:5062 (default is port 5060)

;tlsenable=no                   ; Enable server for incoming TLS (secure) connections (default is no)
;tlsbindaddr=0.0.0.0            ; IP address for TLS server to bind to (0.0.0.0) binds to all interfaces)
                                ; Optionally add a port number, 192.168.1.1:5063 (default is port 5061)
                                ; Remember that the IP address must match the common name (hostname) in the
                                ; certificate, so you don't want to bind a TLS socket to multiple IP addresses.
                                ; For details how to construct a certificate for SIP see 
                                ; http://tools.ietf.org/html/draft-ietf-sip-domain-certs

;tcpauthtimeout = 30            ; tcpauthtimeout specifies the maximum number
				; of seconds a client has to authenticate.  If
				; the client does not authenticate beofre this
				; timeout expires, the client will be
                                ; disconnected. (default: 30 seconds)

;tcpauthlimit = 100             ; tcpauthlimit specifies the maximum number of
				; unauthenticated sessions that will be allowed
                                ; to connect at any given time. (default: 100)

;websocket_enabled = true       ; Set to false to prevent chan_sip from listening to websockets.  This
                                ; is neeeded when using chan_sip and res_pjsip_transport_websockets on
                                ; the same system.

;websocket_write_timeout = 100  ; Default write timeout to set on websocket transports.
                                ; This value may need to be adjusted for connections where
                                ; Asterisk must write a substantial amount of data and the
                                ; receiving clients are slow to process the received information.
                                ; Value is in milliseconds; default is 100 ms.

transport=udp                   ; Set the default transports.  The order determines the primary default transport.
                                ; If tcpenable=no and the transport set is tcp, we will fallback to UDP.

srvlookup=yes                   ; Enable DNS SRV lookups on outbound calls
                                ; Note: Asterisk only uses the first host
                                ; in SRV records
                                ; Disabling DNS SRV lookups disables the
                                ; ability to place SIP calls based on domain
                                ; names to some other SIP users on the Internet
                                ; Specifying a port in a SIP peer definition or
                                ; when dialing outbound calls will supress SRV
                                ; lookups for that peer or call.

;pedantic=yes                   ; Enable checking of tags in headers,
                                ; international character conversions in URIs
                                ; and multiline formatted headers for strict
                                ; SIP compatibility (defaults to "yes")

; See https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service for a description of these parameters.
;tos_sip=cs3                    ; Sets TOS for SIP packets.
;tos_audio=ef                   ; Sets TOS for RTP audio packets.
;tos_video=af41                 ; Sets TOS for RTP video packets.
;tos_text=af41                  ; Sets TOS for RTP text packets.

;cos_sip=3                      ; Sets 802.1p priority for SIP packets.
;cos_audio=5                    ; Sets 802.1p priority for RTP audio packets.
;cos_video=4                    ; Sets 802.1p priority for RTP video packets.
;cos_text=3                     ; Sets 802.1p priority for RTP text packets.

;maxexpiry=3600                 ; Maximum allowed time of incoming registrations (seconds)
;minexpiry=60                   ; Minimum length of registrations (default 60)
;defaultexpiry=120              ; Default length of incoming/outgoing registration
;submaxexpiry=3600              ; Maximum allowed time of incoming subscriptions (seconds), default: maxexpiry
;subminexpiry=60                ; Minimum length of subscriptions, default: minexpiry
;mwiexpiry=3600                 ; Expiry time for outgoing MWI subscriptions
;maxforwards=70			; Setting for the SIP Max-Forwards: header (loop prevention)
				; Default value is 70
;qualifyfreq=60                 ; Qualification: How often to check for the host to be up in seconds
				; and reported in milliseconds with sip show settings.
                                ; Set to low value if you use low timeout for NAT of UDP sessions
				; Default: 60
;qualifygap=100			; Number of milliseconds between each group of peers being qualified
				; Default: 100
;qualifypeers=1			; Number of peers in a group to be qualified at the same time
				; Default: 1
;keepalive=60                   ; Interval at which keepalive packets should be sent to a peer
				; Valid options are yes (60 seconds), no, or the number of seconds.
                                ; Default: 0
;notifymimetype=text/plain      ; Allow overriding of mime type in MWI NOTIFY
;buggymwi=no                    ; Cisco SIP firmware doesn't support the MWI RFC
                                ; fully. Enable this option to not get error messages
                                ; when sending MWI to phones with this bug.
;mwi_from=asterisk              ; When sending MWI NOTIFY requests, use this setting in
                                ; the From: header as the "name" portion. Also fill the
			        ; "user" portion of the URI in the From: header with this
			        ; value if no fromuser is set
			        ; Default: empty
;vmexten=voicemail              ; dialplan extension to reach mailbox sets the
                                ; Message-Account in the MWI notify message
                                ; defaults to "asterisk"

; Codec negotiation
;
; When Asterisk is receiving a call, the codec will initially be set to the
; first codec in the allowed codecs defined for the user receiving the call
; that the caller also indicates that it supports. But, after the caller
; starts sending RTP, Asterisk will switch to using whatever codec the caller
; is sending.
;
; When Asterisk is placing a call, the codec used will be the first codec in
; the allowed codecs that the callee indicates that it supports. Asterisk will
; *not* switch to whatever codec the callee is sending.
;
;preferred_codec_only=yes       ; Respond to a SIP invite with the single most preferred codec
                                ; rather than advertising all joint codec capabilities. This
                                ; limits the other side's codec choice to exactly what we prefer.

;disallow=all                   ; First disallow all codecs
;allow=ulaw                     ; Allow codecs in order of preference
;allow=ilbc                     ; see https://wiki.asterisk.org/wiki/display/AST/RTP+Packetization
				; for framing options
;autoframing=yes		; Set packetization based on the remote endpoint's (ptime)
				; preferences. Defaults to no.
;
; This option specifies a preference for which music on hold class this channel
; should listen to when put on hold if the music class has not been set on the
; channel with Set(CHANNEL(musicclass)=whatever) in the dialplan, and the peer
; channel putting this one on hold did not suggest a music class.
;
; This option may be specified globally, or on a per-user or per-peer basis.
;
;mohinterpret=default
;
; This option specifies which music on hold class to suggest to the peer channel
; when this channel places the peer on hold. It may be specified globally or on
; a per-user or per-peer basis.
;
;mohsuggest=default
;
;parkinglot=plaza               ; Sets the default parking lot for call parking
                                ; This may also be set for individual users/peers
                                ; Parkinglots are configured in features.conf
;language=en                    ; Default language setting for all users/peers
                                ; This may also be set for individual users/peers
;tonezone=se			; Default tonezone for all users/peers
                                ; This may also be set for individual users/peers

;relaxdtmf=yes                  ; Relax dtmf handling
;trustrpid = no                 ; If Remote-Party-ID should be trusted
;sendrpid = yes                 ; If Remote-Party-ID should be sent (defaults to no)
;sendrpid = rpid                ; Use the "Remote-Party-ID" header
                                ; to send the identity of the remote party
                                ; This is identical to sendrpid=yes
;sendrpid = pai                 ; Use the "P-Asserted-Identity" header
                                ; to send the identity of the remote party
;rpid_update = no               ; In certain cases, the only method by which a connected line
                                ; change may be immediately transmitted is with a SIP UPDATE request.
                                ; If communicating with another Asterisk server, and you wish to be able
                                ; transmit such UPDATE messages to it, then you must enable this option.
                                ; Otherwise, we will have to wait until we can send a reinvite to
                                ; transmit the information.
;trust_id_outbound = no         ; Controls whether or not we trust this peer with private identity
                                ; information (when the remote party has callingpres=prohib or equivalent).
                                ; no - RPID/PAI headers will not be included for private peer information
                                ; yes - RPID/PAI headers will include the private peer information. Privacy
                                ;       requirements will be indicated in a Privacy header for sendrpid=pai
                                ; legacy - RPID/PAI will be included for private peer information. In the
                                ;       case of sendrpid=pai, private data that would be included in them
                                ;       will be anonymized. For sendrpid=rpid, private data may be included
                                ;       but the remote party's domain will be anonymized. The way legacy
                                ;       behaves may violate RFC-3325, but it follows historic behavior.
                                ; This option is set to 'legacy' by default
;prematuremedia=no              ; Some ISDN links send empty media frames before 
                                ; the call is in ringing or progress state. The SIP 
                                ; channel will then send 183 indicating early media
                                ; which will be empty - thus users get no ring signal.
                                ; Setting this to "yes" will stop any media before we have
                                ; call progress (meaning the SIP channel will not send 183 Session
                                ; Progress for early media). Default is "yes". Also make sure that
                                ; the SIP peer is configured with progressinband=never. 
                                ;
                                ; In order for "noanswer" applications to work, you need to run
                                ; the progress() application in the priority before the app.

;progressinband=no              ; If we should generate in-band ringing. Always
                                ; use 'never' to never use in-band signalling, even in cases
                                ; where some buggy devices might not render it
                                ; Valid values: yes, no, never Default: no
;useragent=Asterisk PBX         ; Allows you to change the user agent string
                                ; The default user agent string also contains the Asterisk
                                ; version. If you don't want to expose this, change the
                                ; useragent string.
;promiscredir = no              ; If yes, allows 302 or REDIR to non-local SIP address
                                ; Note that promiscredir when redirects are made to the
                                ; local system will cause loops since Asterisk is incapable
                                ; of performing a "hairpin" call.
;usereqphone = no               ; If yes, ";user=phone" is added to uri that contains
                                ; a valid phone number
;dtmfmode = rfc2833             ; Set default dtmfmode for sending DTMF. Default: rfc2833
                                ; Other options:
                                ; info : SIP INFO messages (application/dtmf-relay)
                                ; shortinfo : SIP INFO messages (application/dtmf)
                                ; inband : Inband audio (requires 64 kbit codec -alaw, ulaw)
                                ; auto : Use rfc2833 if offered, inband otherwise

;compactheaders = yes           ; send compact sip headers.
;
;videosupport=yes               ; Turn on support for SIP video. You need to turn this
                                ; on in this section to get any video support at all.
                                ; You can turn it off on a per peer basis if the general
                                ; video support is enabled, but you can't enable it for
                                ; one peer only without enabling in the general section.
                                ; If you set videosupport to "always", then RTP ports will
                                ; always be set up for video, even on clients that don't
                                ; support it.  This assists callfile-derived calls and
                                ; certain transferred calls to use always use video when
                                ; available. [yes|NO|always]

;textsupport=no                 ; Support for ITU-T T.140 realtime text.
                                ; The default value is "no".

;maxcallbitrate=384             ; Maximum bitrate for video calls (default 384 kb/s)
                                ; Videosupport and maxcallbitrate is settable
                                ; for peers and users as well
;authfailureevents=no           ; generate manager "peerstatus" events when peer can't
                                ; authenticate with Asterisk. Peerstatus will be "rejected".
;alwaysauthreject = yes         ; When an incoming INVITE or REGISTER is to be rejected,
                                ; for any reason, always reject with an identical response
                                ; equivalent to valid username and invalid password/hash
                                ; instead of letting the requester know whether there was
                                ; a matching user or peer for their request.  This reduces
                                ; the ability of an attacker to scan for valid SIP usernames.
                                ; This option is set to "yes" by default.

;auth_options_requests = yes    ; Enabling this option will authenticate OPTIONS requests just like
                                ; INVITE requests are.  By default this option is disabled.

;accept_outofcall_message = no  ; Disable this option to reject all MESSAGE requests outside of a
                                ; call.  By default, this option is enabled.  When enabled, MESSAGE
                                ; requests are passed in to the dialplan.

;outofcall_message_context = messages ; Context all out of dialog msgs are sent to. When this
                                      ; option is not set, the context used during peer matching
                                      ; is used. This option can be defined at both the peer and
                                      ; global level.

;auth_message_requests = yes    ; Enabling this option will authenticate MESSAGE requests.
                                ; By default this option is enabled.  However, it can be disabled
                                ; should an application desire to not load the Asterisk server with
                                ; doing authentication and implement end to end security in the
                                ; message body.

;g726nonstandard = yes          ; If the peer negotiates G726-32 audio, use AAL2 packing
                                ; order instead of RFC3551 packing order (this is required
                                ; for Sipura and Grandstream ATAs, among others). This is
                                ; contrary to the RFC3551 specification, the peer _should_
                                ; be negotiating AAL2-G726-32 instead :-(
;outboundproxy=proxy.provider.domain            ; send outbound signaling to this proxy, not directly to the devices
;outboundproxy=proxy.provider.domain:8080       ; send outbound signaling to this proxy, not directly to the devices
;outboundproxy=proxy.provider.domain,force      ; Send ALL outbound signalling to proxy, ignoring route: headers
;outboundproxy=tls://proxy.provider.domain      ; same as '=proxy.provider.domain' except we try to connect with tls
;outboundproxy=192.0.2.1                        ; IPv4 address literal (default port is 5060)
;outboundproxy=2001:db8::1                      ; IPv6 address literal (default port is 5060)
;outboundproxy=192.168.0.2.1:5062               ; IPv4 address literal with explicit port
;outboundproxy=[2001:db8::1]:5062               ; IPv6 address literal with explicit port
;                                               ; (could also be tcp,udp) - defining transports on the proxy line only
;                                               ; applies for the global proxy, otherwise use the transport= option

;supportpath=yes		; This activates parsing and handling of Path header as defined in RFC 3327. This enables
				; Asterisk to route outgoing out-of-dialog requests via a set of proxies by using a pre-loaded
				; route-set defined by the Path headers in the REGISTER request.
				; NOTE: There are multiple things to consider with this setting:
				;  * As this influences routing of SIP requests make sure to not trust Path headers provided
				;    by the user's SIP client (the proxy in front of Asterisk should remove existing user
				;    provided Path headers).
				;  * When a peer has both a path and outboundproxy set, the path will be added to Route: header
				;    but routing to next hop is done using the outboundproxy.
				;  * If set globally, not only will all peers use the Path header, but outbound REGISTER
				;    requests from Asterisk will add path to the Supported header.

;rtsavepath=yes                 ; If using dynamic realtime, store the path headers

;matchexternaddrlocally = yes     ; Only substitute the externaddr or externhost setting if it matches
                                ; your localnet setting. Unless you have some sort of strange network
                                ; setup you will not need to enable this.

;dynamic_exclude_static = yes   ; Disallow all dynamic hosts from registering
                                ; as any IP address used for staticly defined
                                ; hosts.  This helps avoid the configuration
                                ; error of allowing your users to register at
                                ; the same address as a SIP provider.

;contactdeny=0.0.0.0/0.0.0.0           ; Use contactpermit and contactdeny to
;contactpermit=172.16.0.0/255.255.0.0  ; restrict at what IPs your users may
                                       ; register their phones.
;contactacl=named_acl_example          ; Use named ACLs defined in acl.conf

;rtp_engine=asterisk            ; RTP engine to use when communicating with the device

;
; If regcontext is specified, Asterisk will dynamically create and destroy a
; NoOp priority 1 extension for a given peer who registers or unregisters with
; us and have a "regexten=" configuration item.
; Multiple contexts may be specified by separating them with '&'. The
; actual extension is the 'regexten' parameter of the registering peer or its
; name if 'regexten' is not provided.  If more than one context is provided,
; the context must be specified within regexten by appending the desired
; context after '@'.  More than one regexten may be supplied if they are
; separated by '&'.  Patterns may be used in regexten.
;
;regcontext=sipregistrations
;regextenonqualify=yes          ; Default "no"
                                ; If you have qualify on and the peer becomes unreachable
                                ; this setting will enforce inactivation of the regexten
                                ; extension for the peer
;legacy_useroption_parsing=yes	; Default "no"      ; If you have this option enabled and there are semicolons
                                                    ; in the user field of a sip URI, the field be truncated
                                                    ; at the first semicolon seen. This effectively makes
                                                    ; semicolon a non-usable character for peer names, extensions,
                                                    ; and maybe other, less tested things.  This can be useful
                                                    ; for improving compatability with devices that like to use
                                                    ; user options for whatever reason.  The behavior is similar to
                                                    ; how SIP URI's were typically handled in 1.6.2, hence the name.

;send_diversion=no              ; Default "yes"     ; Asterisk normally sends Diversion headers with certain SIP
                                                    ; invites to relay data about forwarded calls. If this option
                                                    ; is disabled, Asterisk won't send Diversion headers unless
                                                    ; they are added manually.

; The shrinkcallerid function removes '(', ' ', ')', non-trailing '.', and '-' not
; in square brackets.  For example, the caller id value 555.5555 becomes 5555555
; when this option is enabled.  Disabling this option results in no modification
; of the caller id value, which is necessary when the caller id represents something
; that must be preserved.  This option can only be used in the [general] section.
; By default this option is on.
;
;shrinkcallerid=yes     ; on by default


;use_q850_reason = no ; Default "no"
                      ; Set to yes add Reason header and use Reason header if it is available.

; When the Transfer() application sends a REFER SIP message, extra headers specified in
; the dialplan by way of SIPAddHeader are sent out with that message. 1.8 and earlier did not
; add the extra headers. To revert to 1.8- behavior, call SIPRemoveHeader with no arguments
; before calling Transfer() to remove all additional headers from the channel. The setting
; below is for transitional compatibility only.
;
;refer_addheaders=yes	; on by default

;autocreatepeer=no             ; Allow any UAC not explicitly defined to register
                               ; WITHOUT AUTHENTICATION. Enabling this options poses a high
                               ; potential security risk and should be avoided unless the
                               ; server is behind a trusted firewall.
                               ; If set to "yes", then peers created in this fashion
                               ; are purged during SIP reloads.
                               ; When set to "persist", the peers created in this fashion
                               ; are not purged during SIP reloads.

;
; ----------------------- TLS settings ------------------------------------------------------------
;tlscertfile=</path/to/certificate.pem> ; Certificate chain (*.pem format only) to use for TLS connections
                                        ; The certificates must be sorted starting with the subject's certificate
                                        ; and followed by intermediate CA certificates if applicable. If the
                                        ; file name ends in _rsa, for example "asterisk_rsa.pem", the files
                                        ; "asterisk_dsa.pem" and/or "asterisk_ecc.pem" are loaded
                                        ; (certificate, intermediates, private key), to support multiple
                                        ; algorithms for server authentication (RSA, DSA, ECDSA). If the chains
                                        ; are different, at least OpenSSL 1.0.2 is required.
                                        ; Default is to look for "asterisk.pem" in current directory

;tlsprivatekey=</path/to/private.pem> ; Private key file (*.pem format only) for TLS connections.
                                      ; If no tlsprivatekey is specified, tlscertfile is searched for
                                      ; for both public and private key.

;tlscafile=</path/to/certificate>
;        If the server your connecting to uses a self signed certificate
;        you should have their certificate installed here so the code can
;        verify the authenticity of their certificate.

;tlscapath=</path/to/ca/dir>
;        A directory full of CA certificates.  The files must be named with
;        the CA subject name hash value.
;        (see man SSL_CTX_load_verify_locations for more info)

;tlsdontverifyserver=[yes|no]
;        If set to yes, don't verify the servers certificate when acting as
;        a client.  If you don't have the server's CA certificate you can
;        set this and it will connect without requiring tlscafile to be set.
;        Default is no.

;tlscipher=<SSL cipher string>
;        A string specifying which SSL ciphers to use or not use
;        A list of valid SSL cipher strings can be found at:
;                http://www.openssl.org/docs/apps/ciphers.html#CIPHER_STRINGS
;
;tlsclientmethod=tlsv1     ; values include tlsv1, sslv3, sslv2.
                           ; Specify protocol for outbound client connections.
                           ; If left unspecified, the default is the general-
                           ; purpose version-flexible SSL/TLS method (sslv23).
                           ; With that, the actual protocol version used will
                           ; be negotiated to the highest version mutually
                           ; supported by Asterisk and the remote server, i.e.
                           ; TLSv1.2. The supported protocols are listed at
                           ; http://www.openssl.org/docs/ssl/SSL_CTX_new.html
                           ; SSLv2 and SSLv3 are disabled within Asterisk.
                           ; Your distribution might have changed that list
                           ; further.
;
; -------------------------- SIP timers ----------------------------------------------------
; These timers are used primarily in INVITE transactions.
; The default for Timer T1 is 500 ms or the measured run-trip time between
; Asterisk and the device if you have qualify=yes for the device.
;
;t1min=100                      ; Minimum roundtrip time for messages to monitored hosts
                                ; Defaults to 100 ms
;timert1=500                    ; Default T1 timer
                                ; Defaults to 500 ms or the measured round-trip
                                ; time to a peer (qualify=yes).
;timerb=32000                   ; Call setup timer. If a provisional response is not received
                                ; in this amount of time, the call will autocongest
                                ; Defaults to 64*timert1

; -------------------------- RTP timers ----------------------------------------------------
; These timers are currently used for both audio and video streams. The RTP timeouts
; are only applied to the audio channel.
; The settings are settable in the global section as well as per device
;
;rtptimeout=60                  ; Terminate call if 60 seconds of no RTP or RTCP activity
                                ; on the audio channel
                                ; when we're not on hold. This is to be able to hangup
                                ; a call in the case of a phone disappearing from the net,
                                ; like a powerloss or grandma tripping over a cable.
;rtpholdtimeout=300             ; Terminate call if 300 seconds of no RTP or RTCP activity
                                ; on the audio channel
                                ; when we're on hold (must be > rtptimeout)
;rtpkeepalive=<secs>            ; Send keepalives in the RTP stream to keep NAT open
                                ; (default is off - zero)

; -------------------------- SIP Session-Timers (RFC 4028)------------------------------------
; SIP Session-Timers provide an end-to-end keep-alive mechanism for active SIP sessions.
; This mechanism can detect and reclaim SIP channels that do not terminate through normal
; signaling procedures. Session-Timers can be configured globally or at a user/peer level.
; The operation of Session-Timers is driven by the following configuration parameters:
;
; * session-timers    - Session-Timers feature operates in the following three modes:
;                            originate : Request and run session-timers always
;                            accept    : Run session-timers only when requested by other UA
;                            refuse    : Do not run session timers in any case
;                       The default mode of operation is 'accept'.
; * session-expires   - Maximum session refresh interval in seconds. Defaults to 1800 secs.
; * session-minse     - Minimum session refresh interval in seconds. Defualts to 90 secs.
; * session-refresher - The session refresher (uac|uas). Defaults to 'uas'.
;                            uac - Default to the caller initially refreshing when possible
;                            uas - Default to the callee initially refreshing when possible
;
; Note that, due to recommendations in RFC 4028, Asterisk will always honor the other
; endpoint's preference for who will handle refreshes. Asterisk will never override the
; preferences of the other endpoint. Doing so could result in Asterisk and the endpoint
; fighting over who sends the refreshes. This holds true for the initiation of session
; timers and subsequent re-INVITE requests whether Asterisk is the caller or callee, or
; whether Asterisk is currently the refresher or not.
;
;session-timers=originate
;session-expires=600
;session-minse=90
;session-refresher=uac
;
; -------------------------- SIP DEBUGGING ---------------------------------------------------
;sipdebug = yes                 ; Turn on SIP debugging by default, from
                                ; the moment the channel loads this configuration.
                                ; NOTE: You cannot use the CLI to turn it off. You'll
                                ; need to edit this and reload the config.
;recordhistory=yes              ; Record SIP history by default
                                ; (see sip history / sip no history)
;dumphistory=yes                ; Dump SIP history at end of SIP dialogue
                                ; SIP history is output to the DEBUG logging channel


; -------------------------- STATUS NOTIFICATIONS (SUBSCRIPTIONS) ----------------------------
; You can subscribe to the status of extensions with a "hint" priority
; (See extensions.conf.sample for examples)
; chan_sip support two major formats for notifications: dialog-info and SIMPLE
;
; You will get more detailed reports (busy etc) if you have a call counter enabled
; for a device.
;
; If you set the busylevel, we will indicate busy when we have a number of calls that
; matches the busylevel treshold.
;
; For queues, you will need this level of detail in status reporting, regardless
; if you use SIP subscriptions. Queues and manager use the same internal interface
; for reading status information.
;
; Note: Subscriptions does not work if you have a realtime dialplan and use the
; realtime switch.
;
;allowsubscribe=no              ; Disable support for subscriptions. (Default is yes)
;subscribecontext = default     ; Set a specific context for SUBSCRIBE requests
                                ; Useful to limit subscriptions to local extensions
                                ; Settable per peer/user also
;notifyringing = no             ; Control when subscriptions get notified of ringing state.
                                ; Specify 'no' to not send any ringing notifications.
                                ; Specify 'yes' to always send ringing notifications (default).
                                ; Specify 'notinuse' to only send ringing notifications for
                                ; extensions that are not currently in use. This is useful as a
                                ; visual indication of who is available to pick up an incoming call
;notifyhold = yes               ; Notify subscriptions on HOLD state (default: no)
                                ; Turning on notifyringing and notifyhold will add a lot
                                ; more database transactions if you are using realtime.
;notifycid = yes                ; Control whether caller ID information is sent along with
                                ; dialog-info+xml notifications (supported by snom phones).
                                ; Note that this feature will only work properly when the
                                ; incoming call is using the same extension and context that
                                ; is being used as the hint for the called extension.  This means
                                ; that it won't work when using subscribecontext for your sip
                                ; user or peer (if subscribecontext is different than context).
                                ; This is also limited to a single caller, meaning that if an
                                ; extension is ringing because multiple calls are incoming,
                                ; only one will be used as the source of caller ID.  Specify
                                ; 'ignore-context' to ignore the called context when looking
                                ; for the caller's channel.  The default value is 'no.' Setting
                                ; notifycid to 'ignore-context' also causes call-pickups attempted
                                ; via SNOM's NOTIFY mechanism to set the context for the call pickup
                                ; to PICKUPMARK.
;callcounter = yes              ; Enable call counters on devices. This can be set per
                                ; device too.

; ---------------------------------------- T.38 FAX SUPPORT ----------------------------------
;
; This setting is available in the [general] section as well as in device configurations.
; Setting this to yes enables T.38 FAX (UDPTL) on SIP calls; it defaults to off.
;
; t38pt_udptl = yes            ; Enables T.38 with FEC error correction.
; t38pt_udptl = yes,fec        ; Enables T.38 with FEC error correction.
; t38pt_udptl = yes,redundancy ; Enables T.38 with redundancy error correction.
; t38pt_udptl = yes,none       ; Enables T.38 with no error correction.
;
; In some cases, T.38 endpoints will provide a T38FaxMaxDatagram value (during T.38 setup) that
; is based on an incorrect interpretation of the T.38 recommendation, and results in failures
; because Asterisk does not believe it can send T.38 packets of a reasonable size to that
; endpoint (Cisco media gateways are one example of this situation). In these cases, during a
; T.38 call you will see warning messages on the console/in the logs from the Asterisk UDPTL
; stack complaining about lack of buffer space to send T.38 FAX packets. If this occurs, you
; can set an override (globally, or on a per-device basis) to make Asterisk ignore the
; T38FaxMaxDatagram value specified by the other endpoint, and use a configured value instead.
; This can be done by appending 'maxdatagram=<value>' to the t38pt_udptl configuration option,
; like this:
;
; t38pt_udptl = yes,fec,maxdatagram=400 ; Enables T.38 with FEC error correction and overrides
;                                       ; the other endpoint's provided value to assume we can
;                                       ; send 400 byte T.38 FAX packets to it.
;
; FAX detection will cause the SIP channel to jump to the 'fax' extension (if it exists)
; based one or more events being detected. The events that can be detected are an incoming
; CNG tone or an incoming T.38 re-INVITE request.
;
; faxdetect = yes		; Default 'no', 'yes' enables both CNG and T.38 detection
; faxdetect = cng		; Enables only CNG detection
; faxdetect = t38		; Enables only T.38 detection
;
; ---------------------------------------- OUTBOUND SIP REGISTRATIONS  ------------------------
; Asterisk can register as a SIP user agent to a SIP proxy (provider)
; Format for the register statement is:
;       register => [peer?][transport://]user[@domain][:secret[:authuser]]@host[:port][/extension][~expiry]
;
;
;
; domain is either
;	- domain in DNS
; 	- host name in DNS
;	- the name of a peer defined below or in realtime
; The domain is where you register your username, so your SIP uri you are registering to
; is username@domain
;
; If no extension is given, the 's' extension is used. The extension needs to
; be defined in extensions.conf to be able to accept calls from this SIP proxy
; (provider).
;
; A similar effect can be achieved by adding a "callbackextension" option in a peer section.
; this is equivalent to having the following line in the general section:
;
;        register => fromuser:secret:username@host/callbackextension
;
; and more readable because you don't have to write the parameters in two places
; (note that the "port" is ignored - this is a bug that should be fixed).
;
; Note that a register= line doesn't mean that we will match the incoming call in any
; other way than described above. If you want to control where the call enters your
; dialplan, which context, you want to define a peer with the hostname of the provider's
; server. If the provider has multiple servers to place calls to your system, you need
; a peer for each server.
;
; Beginning with Asterisk version 1.6.2, the "user" portion of the register line may
; contain a port number. Since the logical separator between a host and port number is a
; ':' character, and this character is already used to separate between the optional "secret"
; and "authuser" portions of the line, there is a bit of a hoop to jump through if you wish
; to use a port here. That is, you must explicitly provide a "secret" and "authuser" even if
; they are blank. See the third example below for an illustration.
;
;
; Examples:
;
;register => 1234:password@mysipprovider.com
;
;     This will pass incoming calls to the 's' extension
;
;
;register => 2345:password@sip_proxy/1234
;
;    Register 2345 at sip provider 'sip_proxy'.  Calls from this provider
;    connect to local extension 1234 in extensions.conf, default context,
;    unless you configure a [sip_proxy] section below, and configure a
;    context.
;    Tip 1: Avoid assigning hostname to a sip.conf section like [provider.com]
;    Tip 2: Use separate inbound and outbound sections for SIP providers
;           (instead of type=friend) if you have calls in both directions
;
;register => 3456@mydomain:5082::@mysipprovider.com
;
;    Note that in this example, the optional authuser and secret portions have
;    been left blank because we have specified a port in the user section
;
;register => tls://username:xxxxxx@sip-tls-proxy.example.org
;
;    The 'transport' part defaults to 'udp' but may also be 'tcp' or 'tls'.
;    Using 'udp://' explicitly is also useful in case the username part
;    contains a '/' ('user/name').

;registertimeout=20             ; retry registration calls every 20 seconds (default)
;registerattempts=10            ; Number of registration attempts before we give up
                                ; 0 = continue forever, hammering the other server
                                ; until it accepts the registration
                                ; Default is 0 tries, continue forever
;register_retry_403=yes         ; Treat 403 responses to registrations as if they were
                                ; 401 responses and continue retrying according to normal
                                ; retry rules.

; ---------------------------------------- OUTBOUND MWI SUBSCRIPTIONS -------------------------
; Asterisk can subscribe to receive the MWI from another SIP server and store it locally for retrieval
; by other phones. At this time, you can only subscribe using UDP as the transport.
; Format for the mwi register statement is:
;       mwi => user[:secret[:authuser]]@host[:port]/mailbox
;
; Examples:
;mwi => 1234:password@mysipprovider.com/1234
;mwi => 1234:password@myportprovider.com:6969/1234
;mwi => 1234:password:authuser@myauthprovider.com/1234
;mwi => 1234:password:authuser@myauthportprovider.com:6969/1234
;
; MWI received will be stored in the 1234 mailbox of the SIP_Remote context.
; It can be used by other phones by following the below:
; mailbox=1234@SIP_Remote
; ---------------------------------------- NAT SUPPORT ------------------------
;
; WARNING: SIP operation behind a NAT is tricky and you really need
; to read and understand well the following section.
;
; When Asterisk is behind a NAT device, the "local" address (and port) that
; a socket is bound to has different values when seen from the inside or
; from the outside of the NATted network. Unfortunately this address must
; be communicated to the outside (e.g. in SIP and SDP messages), and in
; order to determine the correct value Asterisk needs to know:
;
; + whether it is talking to someone "inside" or "outside" of the NATted network.
;   This is configured by assigning the "localnet" parameter with a list
;   of network addresses that are considered "inside" of the NATted network.
;   IF LOCALNET IS NOT SET, THE EXTERNAL ADDRESS WILL NOT BE SET CORRECTLY.
;   Multiple entries are allowed, e.g. a reasonable set is the following:
;
;      localnet=192.168.0.0/255.255.0.0 ; RFC 1918 addresses
;      localnet=10.0.0.0/255.0.0.0      ; Also RFC1918
;      localnet=172.16.0.0/12           ; Another RFC1918 with CIDR notation
;      localnet=169.254.0.0/255.255.0.0 ; Zero conf local network
;
; + the "externally visible" address and port number to be used when talking
;   to a host outside the NAT. This information is derived by one of the
;   following (mutually exclusive) config file parameters:
;
;   a. "externaddr = hostname[:port]" specifies a static address[:port] to
;      be used in SIP and SDP messages.
;      The hostname is looked up only once, when [re]loading sip.conf .
;      If a port number is not present, use the port specified in the "udpbindaddr"
;      (which is not guaranteed to work correctly, because a NAT box might remap the
;      port number as well as the address).
;      This approach can be useful if you have a NAT device where you can
;      configure the mapping statically. Examples:
;
;        externaddr = 12.34.56.78          ; use this address.
;        externaddr = 12.34.56.78:9900     ; use this address and port.
;        externaddr = mynat.my.org:12600   ; Public address of my nat box.
;        externtcpport = 9900   ; The externally mapped tcp port, when Asterisk is behind a static NAT or PAT. 
;                               ; externtcpport will default to the externaddr or externhost port if either one is set. 
;        externtlsport = 12600  ; The externally mapped tls port, when Asterisk is behind a static NAT or PAT.
;                               ; externtlsport port will default to the RFC designated port of 5061.	
;
;   b. "externhost = hostname[:port]" is similar to "externaddr" except
;      that the hostname is looked up every "externrefresh" seconds
;      (default 10s). This can be useful when your NAT device lets you choose
;      the port mapping, but the IP address is dynamic.
;      Beware, you might suffer from service disruption when the name server
;      resolution fails. Examples:
;
;        externhost=foo.dyndns.net       ; refreshed periodically
;        externrefresh=180               ; change the refresh interval
;
;   Note that at the moment all these mechanism work only for the SIP socket.
;   The IP address discovered with externaddr/externhost is reused for
;   media sessions as well, but the port numbers are not remapped so you
;   may still experience problems.
;
; NOTE 1: in some cases, NAT boxes will use different port numbers in
; the internal<->external mapping. In these cases, the "externaddr" and
; "externhost" might not help you configure addresses properly.
;
; NOTE 2: when using "externaddr" or "externhost", the address part is
; also used as the external address for media sessions. Thus, the port
; information in the SDP may be wrong!
;
; In addition to the above, Asterisk has an additional "nat" parameter to
; address NAT-related issues in incoming SIP or media sessions.
; In particular, depending on the 'nat= ' settings described below, Asterisk
; may override the address/port information specified in the SIP/SDP messages,
; and use the information (sender address) supplied by the network stack instead.
; However, this is only useful if the external traffic can reach us.
; The following settings are allowed (both globally and in individual sections):
;
;   nat = no                ; Do no special NAT handling other than RFC3581
;   nat = force_rport       ; Pretend there was an rport parameter even if there wasn't
;   nat = comedia           ; Send media to the port Asterisk received it from regardless
;                           ; of where the SDP says to send it.
;   nat = auto_force_rport  ; Set the force_rport option if Asterisk detects NAT (default)
;   nat = auto_comedia      ; Set the comedia option if Asterisk detects NAT
;
; The nat settings can be combined. For example, to set both force_rport and comedia
; one would set nat=force_rport,comedia. If any of the comma-separated options is 'no',
; Asterisk will ignore any other settings and set nat=no. If one of the "auto" settings
; is used in conjunction with its non-auto counterpart (nat=comedia,auto_comedia), then
; the non-auto option will be ignored.
;
; The RFC 3581-defined 'rport' parameter allows a client to request that Asterisk send
; SIP responses to it via the source IP and port from which the request originated
; instead of the address/port listed in the top-most Via header. This is useful if a
; client knows that it is behind a NAT and therefore cannot guess from what address/port
; its request will be sent. Asterisk will always honor the 'rport' parameter if it is
; sent. The force_rport setting causes Asterisk to always send responses back to the
; address/port from which it received requests; even if the other side doesn't support
; adding the 'rport' parameter.
;
; 'comedia RTP handling' refers to the technique of sending RTP to the port that the
; the other endpoint's RTP arrived from, and means 'connection-oriented media'. This is
; only partially related to RFC 4145 which was referred to as COMEDIA while it was in
; draft form. This method is used to accomodate endpoints that may be located behind
; NAT devices, and as such the address/port they tell Asterisk to send RTP packets to
; for their media streams is not the actual address/port that will be used on the nearer
; side of the NAT.
;
; IT IS IMPORTANT TO NOTE that if the nat setting in the general section differs from
; the nat setting in a peer definition, then the peer username will be discoverable
; by outside parties as Asterisk will respond to different ports for defined and
; undefined peers. For this reason it is recommended to ONLY DEFINE NAT SETTINGS IN THE
; GENERAL SECTION. Specifically, if nat=force_rport in one section and nat=no in the
; other, then valid peers with settings differing from those in the general section will
; be discoverable.
;
; In addition to these settings, Asterisk *always* uses 'symmetric RTP' mode as defined by
; RFC 4961; Asterisk will always send RTP packets from the same port number it expects
; to receive them on.
;
; The IP address used for media (audio, video, and text) in the SDP can also be overridden by using
; the media_address configuration option. This is only applicable to the general section and
; can not be set per-user or per-peer.
;
; Note that this does not change the listen address for RTP, it only changes the
; advertised address in the SDP. The Asterisk RTP engine will still listen on 
; the standard IP address.
;
; media_address = 172.16.42.1
;
; Through the use of the res_stun_monitor module, Asterisk has the ability to detect when the
; perceived external network address has changed.  When the stun_monitor is installed and
; configured, chan_sip will renew all outbound registrations when the monitor detects any sort
; of network change has occurred. By default this option is enabled, but only takes effect once
; res_stun_monitor is configured.  If res_stun_monitor is enabled and you wish to not
; generate all outbound registrations on a network change, use the option below to disable
; this feature.
;
; subscribe_network_change_event = yes ; on by default
;
; ICE/STUN/TURN usage can be enabled globally or on a per-peer basis using the icesupport
; configuration option. When set to yes ICE support is enabled. When set to no it is disabled.
; It is disabled by default.
;
; icesupport = yes

; ---------------------------------- MEDIA HANDLING --------------------------------
; By default, Asterisk tries to re-invite media streams to an optimal path. If there's
; no reason for Asterisk to stay in the media path, the media will be redirected.
; This does not really work well in the case where Asterisk is outside and the
; clients are on the inside of a NAT. In that case, you want to set directmedia=nonat.
;
;directmedia=yes                ; Asterisk by default tries to redirect the
                                ; RTP media stream to go directly from
                                ; the caller to the callee.  Some devices do not
                                ; support this (especially if one of them is behind a NAT).
                                ; The default setting is YES. If you have all clients
                                ; behind a NAT, or for some other reason want Asterisk to
                                ; stay in the audio path, you may want to turn this off.

                                ; This setting also affect direct RTP
                                ; at call setup (a new feature in 1.4 - setting up the
                                ; call directly between the endpoints instead of sending
                                ; a re-INVITE).

                                ; Additionally this option does not disable all reINVITE operations.
                                ; It only controls Asterisk generating reINVITEs for the specific
                                ; purpose of setting up a direct media path. If a reINVITE is
                                ; needed to switch a media stream to inactive (when placed on
                                ; hold) or to T.38, it will still be done, regardless of this 
                                ; setting. Note that direct T.38 is not supported.

;directmedia=nonat              ; An additional option is to allow media path redirection
                                ; (reinvite) but only when the peer where the media is being
                                ; sent is known to not be behind a NAT (as the RTP core can
                                ; determine it based on the apparent IP address the media
                                ; arrives from).

;directmedia=update             ; Yet a third option... use UPDATE for media path redirection,
                                ; instead of INVITE. This can be combined with 'nonat', as
                                ; 'directmedia=update,nonat'. It implies 'yes'.

;directmedia=outgoing           ; When sending directmedia reinvites, do not send an immediate
                                ; reinvite on an incoming call leg. This option is useful when
                                ; peered with another SIP user agent that is known to send
                                ; immediate direct media reinvites upon call establishment. Setting
                                ; the option in this situation helps to prevent potential glares.
                                ; Setting this option implies 'yes'.

;directrtpsetup=yes             ; Enable the new experimental direct RTP setup. This sets up
                                ; the call directly with media peer-2-peer without re-invites.
                                ; Will not work for video and cases where the callee sends
                                ; RTP payloads and fmtp headers in the 200 OK that does not match the
                                ; callers INVITE. This will also fail if directmedia is enabled when
                                ; the device is actually behind NAT.

;directmediadeny=0.0.0.0/0      ; Use directmediapermit and directmediadeny to restrict 
;directmediapermit=172.16.0.0/16; which peers should be able to pass directmedia to each other
                                ; (There is no default setting, this is just an example)
                                ; Use this if some of your phones are on IP addresses that
                                ; can not reach each other directly. This way you can force 
                                ; RTP to always flow through asterisk in such cases.
;directmediaacl=acl_example     ; Use named ACLs defined in acl.conf

;ignoresdpversion=yes           ; By default, Asterisk will honor the session version
                                ; number in SDP packets and will only modify the SDP
                                ; session if the version number changes. This option will
                                ; force asterisk to ignore the SDP session version number
                                ; and treat all SDP data as new data.  This is required
                                ; for devices that send us non standard SDP packets
                                ; (observed with Microsoft OCS). By default this option is
                                ; off.

;sdpsession=Asterisk PBX        ; Allows you to change the SDP session name string, (s=)
                                ; Like the useragent parameter, the default user agent string
                                ; also contains the Asterisk version.
;sdpowner=root                  ; Allows you to change the username field in the SDP owner string, (o=)
                                ; This field MUST NOT contain spaces
;encryption=no                  ; Whether to offer SRTP encrypted media (and only SRTP encrypted media)
                                ; on outgoing calls to a peer. Calls will fail with HANGUPCAUSE=58 if
                                ; the peer does not support SRTP. Defaults to no.
;encryption_taglen=80           ; Set the auth tag length offered in the INVITE either 32/80 default 80
;
;avpf=yes                       ; Enable inter-operability with media streams using the AVPF RTP profile.
				; This will cause all offers and answers to use AVPF (or SAVPF). This
				; option may be specified at the global or peer scope.
;force_avp=yes			; Force 'RTP/AVP', 'RTP/AVPF', 'RTP/SAVP', and 'RTP/SAVPF' to be used for
				; media streams when appropriate, even if a DTLS stream is present.
; ---------------------------------------- REALTIME SUPPORT ------------------------
; For additional information on ARA, the Asterisk Realtime Architecture,
; please read https://wiki.asterisk.org/wiki/display/AST/Realtime+Database+Configuration
;
;rtcachefriends=yes             ; Cache realtime friends by adding them to the internal list
                                ; just like friends added from the config file only on a
                                ; as-needed basis? (yes|no)

;rtsavesysname=yes              ; Save systemname in realtime database at registration
                                ; Default= no

;rtupdate=yes                   ; Send registry updates to database using realtime? (yes|no)
                                ; If set to yes, when a SIP UA registers successfully, the ip address,
                                ; the origination port, the registration period, and the username of
                                ; the UA will be set to database via realtime.
                                ; If not present, defaults to 'yes'. Note: realtime peers will
                                ; probably not function across reloads in the way that you expect, if
                                ; you turn this option off.
;rtautoclear=yes                ; Auto-Expire friends created on the fly on the same schedule
                                ; as if it had just registered? (yes|no|<seconds>)
                                ; If set to yes, when the registration expires, the friend will
                                ; vanish from the configuration until requested again. If set
                                ; to an integer, friends expire within this number of seconds
                                ; instead of the registration interval.

;ignoreregexpire=yes            ; Enabling this setting has two functions:
                                ;
                                ; For non-realtime peers, when their registration expires, the
                                ; information will _not_ be removed from memory or the Asterisk database
                                ; if you attempt to place a call to the peer, the existing information
                                ; will be used in spite of it having expired
                                ;
                                ; For realtime peers, when the peer is retrieved from realtime storage,
                                ; the registration information will be used regardless of whether
                                ; it has expired or not; if it expires while the realtime peer
                                ; is still in memory (due to caching or other reasons), the
                                ; information will not be removed from realtime storage

; ---------------------------------------- SIP DOMAIN SUPPORT ------------------------
; Incoming INVITE and REFER messages can be matched against a list of 'allowed'
; domains, each of which can direct the call to a specific context if desired.
; By default, all domains are accepted and sent to the default context or the
; context associated with the user/peer placing the call.
; REGISTER to non-local domains will be automatically denied if a domain
; list is configured.
;
; Domains can be specified using:
; domain=<domain>[,<context>]
; Examples:
; domain=myasterisk.dom
; domain=customer.com,customer-context
;
; In addition, all the 'default' domains associated with a server should be
; added if incoming request filtering is desired.
; autodomain=yes
;
; To disallow requests for domains not serviced by this server:
; allowexternaldomains=no

;domain=mydomain.tld,mydomain-incoming
                                ; Add domain and configure incoming context
                                ; for external calls to this domain
;domain=1.2.3.4                 ; Add IP address as local domain
                                ; You can have several "domain" settings
;allowexternaldomains=no        ; Disable INVITE and REFER to non-local domains
                                ; Default is yes
;autodomain=yes                 ; Turn this on to have Asterisk add local host
                                ; name and local IP to domain list.

; fromdomain=mydomain.tld       ; When making outbound SIP INVITEs to
                                ; non-peers, use your primary domain "identity"
                                ; for From: headers instead of just your IP
                                ; address. This is to be polite and
                                ; it may be a mandatory requirement for some
                                ; destinations which do not have a prior
                                ; account relationship with your server.

; ----------------------------- Advice of Charge CONFIGURATION --------------------------
; snom_aoc_enabled = yes;     ; This options turns on and off support for sending AOC-D and
                              ; AOC-E to snom endpoints.  This option can be used both in the
                              ; peer and global scope.  The default for this option is off.


; ----------------------------- JITTER BUFFER CONFIGURATION --------------------------
; jbenable = yes              ; Enables the use of a jitterbuffer on the receiving side of a
                              ; SIP channel. Defaults to "no". An enabled jitterbuffer will
                              ; be used only if the sending side can create and the receiving
                              ; side can not accept jitter. The SIP channel can accept jitter,
                              ; thus a jitterbuffer on the receive SIP side will be used only
                              ; if it is forced and enabled.

; jbforce = no                ; Forces the use of a jitterbuffer on the receive side of a SIP
                              ; channel. Defaults to "no".

; jbmaxsize = 200             ; Max length of the jitterbuffer in milliseconds.

; jbresyncthreshold = 1000    ; Jump in the frame timestamps over which the jitterbuffer is
                              ; resynchronized. Useful to improve the quality of the voice, with
                              ; big jumps in/broken timestamps, usually sent from exotic devices
                              ; and programs. Defaults to 1000.

; jbimpl = fixed              ; Jitterbuffer implementation, used on the receiving side of a SIP
                              ; channel. Two implementations are currently available - "fixed"
                              ; (with size always equals to jbmaxsize) and "adaptive" (with
                              ; variable size, actually the new jb of IAX2). Defaults to fixed.

; jbtargetextra = 40          ; This option only affects the jb when 'jbimpl = adaptive' is set.
                              ; The option represents the number of milliseconds by which the new jitter buffer
                              ; will pad its size. the default is 40, so without modification, the new
                              ; jitter buffer will set its size to the jitter value plus 40 milliseconds.
                              ; increasing this value may help if your network normally has low jitter,
                              ; but occasionally has spikes.

; jblog = no                  ; Enables jitterbuffer frame logging. Defaults to "no".

; ----------------------------------------------------------------------------------

[authentication]
; Global credentials for outbound calls, i.e. when a proxy challenges your
; Asterisk server for authentication. These credentials override
; any credentials in peer/register definition if realm is matched.
;
; This way, Asterisk can authenticate for outbound calls to other
; realms. We match realm on the proxy challenge and pick an set of
; credentials from this list
; Syntax:
;        auth = <user>:<secret>@<realm>
;        auth = <user>#<md5secret>@<realm>
; Example:
;auth=mark:topsecret@digium.com
;
; You may also add auth= statements to [peer] definitions
; Peer auth= override all other authentication settings if we match on realm

; -----------------------------------------------------------------------------
; DEVICE CONFIGURATION
;
; SIP entities have a 'type' which determines their roles within Asterisk.
; * For entities with 'type=peer':
;   Peers handle both inbound and outbound calls and are matched by ip/port, so for
;   The case of incoming calls from the peer, the IP address must match in order for
;   The invitation to work. This means calls made from either direction won't work if
;   The peer is unregistered while host=dynamic or if the host is otherise not set to
;   the correct IP of the sender.
; * For entities with 'type=user':
;   Asterisk users handle inbound calls only (meaning they call Asterisk, Asterisk can't
;   call them) and are matched by their authorization information (authname and secret).
;   Asterisk doesn't rely on their IP and will accept calls regardless of the host setting
;   as long as the incoming SIP invite authorizes successfully.
; * For entities with 'type=friend':
;   Asterisk will create the entity as both a friend and a peer. Asterisk will accept
;   calls from friends like it would for users, requiring only that the authorization
;   matches rather than the IP address. Since it is also a peer, a friend entity can
;   be called as long as its IP is known to Asterisk. In the case of host=dynamic,
;   this means it is necessary for the entity to register before Asterisk can call it.
; 
; Use remotesecret for outbound authentication, and secret for authenticating
; inbound requests. For historical reasons, if no remotesecret is supplied for an
; outbound registration or call, the secret will be used. 
;
; For device names, we recommend using only a-z, numerics (0-9) and underscore
;
; For local phones, type=friend works most of the time
;
; If you have one-way audio, you probably have NAT problems.
; If Asterisk is on a public IP, and the phone is inside of a NAT device
; you will need to configure nat option for those phones.
; Also, turn on qualify=yes to keep the nat session open
;
; Configuration options available
; --------------------
; context
; callingpres
; permit
; deny
; secret
; md5secret
; remotesecret
; transport
; dtmfmode
; directmedia
; nat
; callgroup
; pickupgroup
; language
; allow
; disallow
; autoframing
; insecure
; trustrpid
; trust_id_outbound
; progressinband
; promiscredir
; useclientcode
; accountcode
; setvar
; callerid
; amaflags
; callcounter
; busylevel
; allowoverlap
; allowsubscribe
; allowtransfer
; ignoresdpversion
; subscribecontext
; template
; videosupport
; maxcallbitrate
; rfc2833compensate
; Note: app_voicemail mailboxes must be in the form of mailbox@context.
; mailbox
; session-timers
; session-expires
; session-minse
; session-refresher
; t38pt_usertpsource
; regexten
; fromdomain
; fromuser
; host
; port
; qualify
; keepalive
; defaultip
; defaultuser
; rtptimeout
; rtpholdtimeout
; sendrpid
; outboundproxy
; rfc2833compensate
; callbackextension
; timert1
; timerb
; qualifyfreq
; t38pt_usertpsource
; contactpermit         ; Limit what a host may register as (a neat trick
; contactdeny           ; is to register at the same IP as a SIP provider,
; contactacl            ; then call oneself, and get redirected to that
;                       ; same location).
; directmediapermit
; directmediadeny
; directmediaacl
; unsolicited_mailbox
; use_q850_reason
; maxforwards
; encryption
; description		; Used to provide a description of the peer in console output
; dtlsenable
; dtlsverify
; dtlsrekey
; dtlscertfile
; dtlsprivatekey
; dtlscipher
; dtlscafile
; dtlscapath
; dtlssetup
; dtlsfingerprint
; ignore_requested_pref ; Ignore the requested codec and determine the preferred codec
;						; from the peer's configuration.
;

; -----------------------------------------------------------------------------
; DTLS-SRTP CONFIGURATION
;
; DTLS-SRTP support is available if the underlying RTP engine in use supports it.
;
; Note that all configuration options except dtlsenable can be set at the general level.
; If set they will be present on the user or peer unless overridden with a different value.
;
; dtlsenable = yes                   ; Enable or disable DTLS-SRTP support
; dtlsverify = yes                   ; Verify that provided peer certificate and fingerprint are valid
;				     ; A value of 'yes' will perform both certificate and fingerprint verification
;				     ; A value of 'no' will perform no certificate or fingerprint verification
;				     ; A value of 'fingerprint' will perform ONLY fingerprint verification
;				     ; A value of 'certificate' will perform ONLY certficiate verification
; dtlsrekey = 60                     ; Interval at which to renegotiate the TLS session and rekey the SRTP session
;                                    ; If this is not set or the value provided is 0 rekeying will be disabled
; dtlscertfile = file                ; Path to certificate file to present
; dtlsprivatekey = file              ; Path to private key for certificate file
; dtlscipher = <SSL cipher string>   ; Cipher to use for TLS negotiation
;                                    ; A list of valid SSL cipher strings can be found at:
;                                    ; http://www.openssl.org/docs/apps/ciphers.html#CIPHER_STRINGS
; dtlscafile = file                  ; Path to certificate authority certificate
; dtlscapath = path                  ; Path to a directory containing certificate authority certificates
; dtlssetup = actpass                ; Whether we are willing to accept connections, connect to the other party, or both.
;                                    ; Valid options are active (we want to connect to the other party), passive (we want to
;                                    ; accept connections only), and actpass (we will do both). This value will be used in
;                                    ; the outgoing SDP when offering and for incoming SDP offers when the remote party sends
;                                    ; actpass
; dtlsfingerprint = sha-1            ; The hash to use for the fingerprint in SDP (valid options are sha-1 and sha-256)

;[sip_proxy]
; For incoming calls only. Example: FWD (Free World Dialup)
; We match on IP address of the proxy for incoming calls
; since we can not match on username (caller id)
;type=peer
;context=from-fwd
;host=fwd.pulver.com

;[sip_proxy-out]
;type=peer                        ; we only want to call out, not be called
;remotesecret=guessit             ; Our password to their service
;defaultuser=yourusername         ; Authentication user for outbound proxies
;fromuser=yourusername            ; Many SIP providers require this!
;fromdomain=provider.sip.domain
;host=box.provider.com
;transport=udp,tcp                ; This sets the default transport type to udp for outgoing, and will
;                                 ; accept both tcp and udp. The default transport type is only used for
;                                 ; outbound messages until a Registration takes place.  During the
;                                 ; peer Registration the transport type may change to another supported
;                                 ; type if the peer requests so.

;usereqphone=yes                  ; This provider requires ";user=phone" on URI
;callcounter=yes                  ; Enable call counter
;busylevel=2                      ; Signal busy at 2 or more calls
;outboundproxy=proxy.provider.domain  ; send outbound signaling to this proxy, not directly to the peer
;port=80                          ; The port number we want to connect to on the remote side
                                  ; Also used as "defaultport" in combination with "defaultip" settings

; -- sample definition for a provider
;[provider1]
;type=peer
;host=sip.provider1.com
;fromuser=4015552299              ; how your provider knows you
;remotesecret=youwillneverguessit ; The password we use to authenticate to them
;secret=gissadetdu                ; The password they use to contact us
;callbackextension=123            ; Register with this server and require calls coming back to this extension
;transport=udp,tcp                ; This sets the transport type to udp for outgoing, and will
;                                 ;   accept both tcp and udp. Default is udp. The first transport
;                                 ;   listed will always be used for outgoing connections.
;unsolicited_mailbox=4015552299   ; If the remote SIP server sends an unsolicited MWI NOTIFY message the new/old
;                                 ;   message count will be stored in the configured virtual mailbox. It can be used
;                                 ;   by any device supporting MWI by specifying <configured value>@SIP_Remote as the
;                                 ;   mailbox.

;
; Because you might have a large number of similar sections, it is generally
; convenient to use templates for the common parameters, and add them
; the the various sections. Examples are below, and we can even leave
; the templates uncommented as they will not harm:

[basic-options](!)                ; a template
        dtmfmode=rfc2833
        context=from-office
        type=friend

[natted-phone](!,basic-options)   ; another template inheriting basic-options
        directmedia=no
        host=dynamic

[public-phone](!,basic-options)   ; another template inheriting basic-options
        directmedia=yes

[my-codecs](!)                    ; a template for my preferred codecs
        disallow=all
        allow=ilbc
        allow=g729
        allow=gsm
        allow=g723
        allow=ulaw
        ; Or, more simply:
        ;allow=!all,ilbc,g729,gsm,g723,ulaw

[ulaw-phone](!)                   ; and another one for ulaw-only
        disallow=all
        allow=ulaw
        ; Again, more simply:
        ;allow=!all,ulaw

; and finally instantiate a few phones
;
; [2133](natted-phone,my-codecs)
;        secret = peekaboo
; [2134](natted-phone,ulaw-phone)
;        secret = not_very_secret
; [2136](public-phone,ulaw-phone)
;        secret = not_very_secret_either
; ...
;

; Standard configurations not using templates look like this:
;
;[grandstream1]
;type=friend
;context=from-sip                ; Where to start in the dialplan when this phone calls
;recordonfeature=dynamicfeature1 ; Feature to use when INFO with Record: on is received.
;recordofffeature=dynamicfeature2 ; Feature to use when INFO with Record: off is received.
;callerid=John Doe <1234>        ; Full caller ID, to override the phones config
                                 ; on incoming calls to Asterisk
;description=Courtesy Phone      ; Description of the peer. Shown when doing 'sip show peers'.
;host=192.168.0.23               ; we have a static but private IP address
                                 ; No registration allowed
;directmedia=yes                 ; allow RTP voice traffic to bypass Asterisk
;dtmfmode=info                   ; either RFC2833 or INFO for the BudgeTone
;call-limit=1                    ; permit only 1 outgoing call and 1 incoming call at a time
                                 ; from the phone to asterisk (deprecated)
                                 ; 1 for the explicit peer, 1 for the explicit user,
                                 ; remember that a friend equals 1 peer and 1 user in
                                 ; memory
                                 ; There is no combined call counter for a "friend"
                                 ; so there's currently no way in sip.conf to limit
                                 ; to one inbound or outbound call per phone. Use
                                 ; the group counters in the dial plan for that.
                                 ;
;mailbox=1234@default            ; mailbox 1234 in voicemail context "default"
;disallow=all                    ; need to disallow=all before we can use allow=
;allow=ulaw                      ; Note: In user sections the order of codecs
                                 ; listed with allow= does NOT matter!
;allow=alaw
;allow=g723.1                    ; Asterisk only supports g723.1 pass-thru!
;allow=g729                      ; Pass-thru only unless g729 license obtained
;callingpres=allowed_passed_screen ; Set caller ID presentation
                                 ; See function CALLERPRES documentation for possible
                                 ; values.

;[xlite1]
; Turn off silence suppression in X-Lite ("Transmit Silence"=YES)!
; Note that Xlite sends NAT keep-alive packets, so qualify=yes is not needed
;type=friend
;regexten=1234                   ; When they register, create extension 1234
;callerid="Jane Smith" <5678>
;host=dynamic                    ; This device needs to register
;directmedia=no                  ; Typically set to NO if behind NAT
;disallow=all
;allow=gsm                       ; GSM consumes far less bandwidth than ulaw
;allow=ulaw
;allow=alaw
;mailbox=1234@default,1233@default ; Subscribe to status of multiple mailboxes

;[snom]
;type=friend                     ; Friends place calls and receive calls
;context=from-sip                ; Context for incoming calls from this user
;secret=blah
;subscribecontext=localextensions ; Only allow SUBSCRIBE for local extensions
;language=de                     ; Use German prompts for this user
;host=dynamic                    ; This peer register with us
;dtmfmode=inband                 ; Choices are inband, rfc2833, or info
;defaultip=192.168.0.59          ; IP used until peer registers
;mailbox=1234@context,2345@context ; Mailbox(-es) for message waiting indicator
;subscribemwi=yes                ; Only send notifications if this phone
                                 ; subscribes for mailbox notification
;vmexten=voicemail               ; dialplan extension to reach mailbox
                                 ; sets the Message-Account in the MWI notify message
                                 ; defaults to global vmexten which defaults to "asterisk"
;disallow=all
;allow=ulaw                      ; dtmfmode=inband only works with ulaw or alaw!


;[polycom]
;type=friend                     ; Friends place calls and receive calls
;context=from-sip                ; Context for incoming calls from this user
;secret=blahpoly
;host=dynamic                    ; This peer register with us
;dtmfmode=rfc2833                ; Choices are inband, rfc2833, or info
;defaultuser=polly               ; Username to use in INVITE until peer registers
;defaultip=192.168.40.123
                                 ; Normally you do NOT need to set this parameter
;disallow=all
;allow=ulaw                      ; dtmfmode=inband only works with ulaw or alaw!
;progressinband=no               ; Polycom phones don't work properly with "never"


;[pingtel]
;type=friend
;secret=blah
;host=dynamic
;insecure=port                   ; Allow matching of peer by IP address without
                                 ; matching port number
;insecure=invite                 ; Do not require authentication of incoming INVITEs
;insecure=port,invite            ; (both)
;qualify=1000                    ; Consider it down if it's 1 second to reply
                                 ; Helps with NAT session
                                 ; qualify=yes uses default value
;qualifyfreq=60                  ; Qualification: How often to check for the
                                 ; host to be up in seconds
                                 ; Set to low value if you use low timeout for
                                 ; NAT of UDP sessions
;
; Call group and Pickup group should be in the range from 0 to 63
;
;callgroup=1,3-4                 ; We are in caller groups 1,3,4
;pickupgroup=1,3-5               ; We can do call pick-p for call group 1,3,4,5
;namedcallgroup=engineering,sales,netgroup,protgroup ; We are in named call groups engineering,sales,netgroup,protgroup
;namedpickupgroup=sales          ; We can do call pick-p for named call group sales
;defaultip=192.168.0.60          ; IP address to use if peer has not registered
;deny=0.0.0.0/0.0.0.0            ; ACL: Control access to this account based on IP address
;permit=192.168.0.60/255.255.255.0
;permit=192.168.0.60/24          ; we can also use CIDR notation for subnet masks
;permit=2001:db8::/32            ; IPv6 ACLs can be specified if desired. IPv6 ACLs
                                 ; apply only to IPv6 addresses, and IPv4 ACLs apply
                                 ; only to IPv4 addresses.
;acl=named_acl_example           ; Use named ACLs defined in acl.conf

;[cisco1]
;type=friend
;secret=blah
;qualify=200                     ; Qualify peer is no more than 200ms away
;host=dynamic                    ; This device registers with us
;directmedia=no                  ; Asterisk by default tries to redirect the
                                 ; RTP media stream (audio) to go directly from
                                 ; the caller to the callee.  Some devices do not
                                 ; support this (especially if one of them is
                                 ; behind a NAT).
;defaultip=192.168.0.4           ; IP address to use until registration
;defaultuser=goran               ; Username to use when calling this device before registration
                                 ; Normally you do NOT need to set this parameter
;setvar=CUSTID=5678              ; Channel variable to be set for all calls from or to this device
;setvar=ATTENDED_TRANSFER_COMPLETE_SOUND=beep   ; This channel variable will
                                                ; cause the given audio file to
                                                ; be played upon completion of
                                                ; an attended transfer to the
                                                ; target of the transfer.

;[pre14-asterisk]
;type=friend
;secret=digium
;host=dynamic
;rfc2833compensate=yes          ; Compensate for pre-1.4 DTMF transmission from another Asterisk machine.
                                ; You must have this turned on or DTMF reception will work improperly.
;t38pt_usertpsource=yes         ; Use the source IP address of RTP as the destination IP address for UDPTL packets
                                ; if the nat option is enabled. If a single RTP packet is received Asterisk will know the
                                ; external IP address of the remote device. If port forwarding is done at the client side
                                ; then UDPTL will flow to the remote device.

FreePBX 13 входящая маршрутизация

$
0
0

FreePBX 13 входящая маршрутизация

Inbound Routes. Данный модуль обрабатывает входящие вызовы, получаемые из стандартных контекстов FreePBX - [from-trunk] и [from-pstn]. Вызовы могут распределяться по DID (Direct Inward Dialing) прямому входящему набору, или по CALLERID вызывающего абонента. В качестве наведенияуказываются модули FreePBX.
Ключевые (обязательные к заполнению) опции:
Description | DID Number | Set Destination

General: Add Incoming Route

freepbx13-inbound-routes-general

Description

Описание маршрута для отображения в модулях FreePBX. Используйте говорящее название, чтобы вам было легче идентифицировать маршрут среди других.

DID Number

Назначьте вызываемый DID номер.
Оставьте пустым, для приема вызовов с любым DID.
Также возможно задать шаблоны: (например: _2[345]XXXXX). Это ключевое поле, оно определяет совпадение с идентификатором вызываемого абонента, в транке.

CallerID Number

Назначение номера CallerID вызывающего абонента.
Если задано, вызовы будут приниматься
только с указанного CallerID. Оставьте пустым, если не требуется.

CID Priority Route

Определяет маршрут основываясь ТОЛЬКО на Caller ID, без указания номера DID.
Если включено, то все звонки с этого Caller ID будут направлены в этот маршрут,
даже если существуют маршруты с совпадающим DID.

YesNo

ALERT_INFO

Данное поле подставляется текст в заголовок SIP ALERT_INFO. Используется для маркировки вызова на SIP телефоне.

CID name prefix

Добавляет указанный префикс к Caller ID (name). т.е.:
Если добавлено «Sales:», а вызов поступает от VPupkin
отобразится «Sales:VPupkin» когда поступает вызов.

Music On Hold

Установите Музыку на удержании специфичную для данного маршрута.

Set Destination

Выберите пункт наведения из выпадающего списка модулей FreePBX

Advanced

Signal RINGING(Посылка КПВ)

Многие устройства или провайдеры требуют посылать RINGING (КПВ) до того, как получено ANSWER.

YesNo

Reject Reverse Charges

Поддержка запроса вызова за счет вызываемой стороны в PRI канале

YesNo

Pause Before Answer

Пауза перед ответом и направлением вызова по назначению. Это бесполезно на цифровых, но может пригодиться на аналоговых линиях

Privacy

freepbx13-inbound-routes-privacy

Privacy Manager

Если не получено CallerID, Privacy Manager потребует ввести номер вызывающего абонента.<br> Если Call Screening у абонента включен, звонящему будет предложено назвать свое имя.

Other

freepbx13-inbound-routes-other.png

Call Recording

Записывать входящие вызовы. Если выбрано 'never' запись по запросу (on demand) недоступна.

ForceYesDon't CareNoNever

  • Forceи Neverимеют приоритет над "Yes" или "No".
  • Yesи Noимеют равный приоритет.
    • Если несколько Yesили Noвстречаются на пути вызова, самая первая установка имеет приоритет над последующими.
    • Последующие Yesили Noне переопределяют заданные ранее "Yes" или "No".
  • Forceи Neverвсегда переопределяют установки заданные ранее.
    • Forceи Neverвсегда переопределяют друг друга. Т.е. если сначала было "Force", а затем "Never" вызов не будет записан.
    • Forceили Neverпереопределяют "Yes" или "No".
    • Yesи Noне переопределяют "Force" или "Never".
  • Don't Careне затрагивает заданные ранее установки.

см. также Extensions - Recording Options

Параметры FreePBX 12

Fax Destination

куда направить вызов, если опознан сигнал факса.

FreePBX

Asterisk CLI - интерфейс командной строки

$
0
0

Asterisk CLI - интерфейс командной строки

cli sip core reload restart show peers registry

asterisk -vvvvvv

Командная строка является мощным инструментом для мониторинга и управления работой Asterisk PBX. При запуске asterisk с флагом -r или -c, появиться следующие приглашение:

# asterisk   -vvvr
*CLI> 

Количество 'v' в параметрах задает порог отображаемой информации в консоли для данного подключения. Комбинация -vvvr задаст verbose level 8. Интерфейс командной строки Asterisk имеет свой конфиг - cli.conf

Введите core show helpи нажмите enter для получения полного списка команд:

Командная строка поддерживает вывод доступных команд по неполному вводу нажатием 'Tab':

Для получения дополнительной информации о конкретной команде, вы можете ввести core show help<command>. Например:

*CLI> core show help manager
                manager reload Reload manager configurations
    manager set debug [on|off] Show, enable, disable debugging of the manager code
          manager show command Show a manager interface command
         manager show commands List manager interface commands
        manager show connected List connected manager interface users
           manager show eventq List manager interface queued events
         manager show settings Show manager global settings
            manager show users List configured manager users
             manager show user Display information on a specific manager user
*CLI> 

Вот некоторые полезные команды:

Core

  • core set verbose <0-9> - порог отображаемой информации.
  • core reload - перечитать все конфиги
  • core restart gracefullyперезагрузить Asterisk по завершению всех текущих вызовов (свободные каналы закрываются)
  • core restart now Restart перезагрузить Asterisk немедленно
  • core restart when convenientперезагрузить Asterisk если нет разговоров

SIP

  • sip show peersпоказать существующие SIP екстеншены и их статус
  • sip show peer 100 отображает информацию о конкретном SIP екстеншене
  • sip show registryотображает состояние зарегистрированных транков

PJSIP

  • pjsip set logger {on|off|host} – Enable/Disable PJSIP Logger Output
  • pjsip show aors– Show PJSIP Aors
   Aor:  <Aor..............................................>  <MaxContact>
    Contact:  <Aor/ContactUri.................................>  <Status....>  <RTT(ms)..>
 =========================================================================================

      Aor:  1000                                                 1
    Contact:  1000/sip:1000@192.168.1.32:5060;transport=UDP;rin  Avail               9.645

      Aor:  1001                                                 1
  • pjsip show aor– Show PJSIP Aor
localhost*CLI> pjsip show aor 1000

      Aor:  <Aor..............................................>  <MaxContact>
    Contact:  <Aor/ContactUri.................................>  <Status....>  <RTT(ms)..>
 =========================================================================================

      Aor:  1000                                                 1
    Contact:  1000/sip:1000@192.168.1.32:5060;transport=UDP;rin  Avail              13.017


 ParameterName        : ParameterValue
 ==========================================================================================
 authenticate_qualify : false
 contact              : sip:1000@192.168.1.32:5060;transport=UDP;rinstance=56471484e9cd2c68
 default_expiration   : 3600
 mailboxes            :
 max_contacts         : 1
 maximum_expiration   : 7200
 minimum_expiration   : 60
 outbound_proxy       :
 qualify_frequency    : 60
 remove_existing      : true
 support_path         : false

DAHDI

  • dahdi show statusсостояние портов dahdi
  • dahdi show channelsпоказать существующие каналы
    • pri show spansотобразить объекты pri и их статус.

Кодеки

  • core show translation recalcрасчет перекодировки кодеков

core show translation recalc

core show translation recalc

*CLI> core show translation recalc
         Recalculating Codec Translation (number of sample seconds: 1)

         Translation times between formats (in microseconds) for one second of data
          Source Format (Rows) Destination Format (Columns)

            gsm  ulaw  alaw  g726 adpcm  slin lpc10  ilbc g726aal2  g722 slin16 testlaw slin12 slin24 slin32 slin44 slin48 slin96 slin192
      gsm     - 15000 15000 15000 15000  9000 15000 15000    15000 17250  17000   15000  17000  17000  17000  17000  17000  17000   17000
     ulaw 15000     -  9150 15000 15000  9000 15000 15000    15000 17250  17000   15000  17000  17000  17000  17000  17000  17000   17000
     alaw 15000  9150     - 15000 15000  9000 15000 15000    15000 17250  17000   15000  17000  17000  17000  17000  17000  17000   17000
     g726 15000 15000 15000     - 15000  9000 15000 15000    15000 17250  17000   15000  17000  17000  17000  17000  17000  17000   17000
    adpcm 15000 15000 15000 15000     -  9000 15000 15000    15000 17250  17000   15000  17000  17000  17000  17000  17000  17000   17000
     slin  6000  6000  6000  6000  6000     -  6000  6000     6000  8250   8000    6000   8000   8000   8000   8000   8000   8000    8000
    lpc10 15000 15000 15000 15000 15000  9000     - 15000    15000 17250  17000   15000  17000  17000  17000  17000  17000  17000   17000
     ilbc 15000 15000 15000 15000 15000  9000 15000     -    15000 17250  17000   15000  17000  17000  17000  17000  17000  17000   17000
 g726aal2 15000 15000 15000 15000 15000  9000 15000 15000        - 17250  17000   15000  17000  17000  17000  17000  17000  17000   17000
     g722 15600 15600 15600 15600 15600  9600 15600 15600    15600     -   9000   15600  17500  17000  17000  17000  17000  17000   17000
   slin16 14500 14500 14500 14500 14500  8500 14500 14500    14500  6000      -   14500   8500   8000   8000   8000   8000   8000    8000
  testlaw 15000 15000 15000 15000 15000  9000 15000 15000    15000 17250  17000       -  17000  17000  17000  17000  17000  17000   17000
   slin12 14500 14500 14500 14500 14500  8500 14500 14500    14500 14000   8000   14500      -   8000   8000   8000   8000   8000    8000
   slin24 14500 14500 14500 14500 14500  8500 14500 14500    14500 14500   8500   14500   8500      -   8000   8000   8000   8000    8000
   slin32 14500 14500 14500 14500 14500  8500 14500 14500    14500 14500   8500   14500   8500   8500      -   8000   8000   8000    8000
   slin44 14500 14500 14500 14500 14500  8500 14500 14500    14500 14500   8500   14500   8500   8500   8500      -   8000   8000    8000
   slin48 14500 14500 14500 14500 14500  8500 14500 14500    14500 14500   8500   14500   8500   8500   8500   8500      -   8000    8000
   slin96 14500 14500 14500 14500 14500  8500 14500 14500    14500 14500   8500   14500   8500   8500   8500   8500   8500      -    8000
  slin192 14500 14500 14500 14500 14500  8500 14500 14500    14500 14500   8500   14500   8500   8500   8500   8500   8500   8500       -

ещё

  • module show like mysqlотобразить загруженные модули содержащие в названии mysql
  • pri set debug {on|off} span 1 Enables PRI debugging on a span
  • rtp set debug {on|off|ip} Enable/Disable RTP debugging

Простые CLI приемы

Есть несколько трюков, которые помогут вам в интерфейсе командной строки Asterisk. Очень удобно завершение неполного ввода клавишей TAB. Если вы введете начало команды и нажмите клавишу Tab, Asterisk попытается завершить имя команды, или покажет возможные команды, которые начинаются с буквы, которые Вы ввели. Например, введите 'co', а затем нажмите клавишу Tab.

 localhost*CLI> co
 confbridge  config      core
 localhost*CLI> co

Теперь наберите 'cor', и нажмите TAB снова. На этот раз Asterisk завершит слово, т.к. 'core' является единственной командой, которая начинается с 'cor'. Этот трюк также работает с под-командами. Например, наберите 'core show' и нажмите TAB. (Возможно, вам придется дважды нажать вкладку, если вы не поставили пробел после слова 'show'.) Asterisk покажет вам все под-команды.

localhost*CLI> core show [Tab]
application     applications    calls           channel         channels
channeltype     channeltypes    codec           codecs          config
file            function        functions       hanguphandlers  help
hint            hints           image           license         profile
settings        sound           sounds          switches        sysinfo
taskprocessors  threads         translation     uptime          version
warranty
localhost*CLI> core show

Повторение предыдущих команд.

Для просмотра ранее введенных команд, нажмите стрелочку вверх, таким образом можно пролистать всю историю назад и вперед.

Run Linux Shell Commands from The Asterisk CLI

Восклицательный знак перед командой позволяет предавать команды оболочке Linux.

 localhost*CLI> !whoami
 root
 localhost*CLI>

Asterisk -rx

Иногда удобно дать команду, или получить информацию, не подключаясь непосредственно к консоли. Для этого используется ключ '-x'.
Например, получить список sip пиров:

# asterisk -rx 'sip show peers'

Команда может заключаться, как в одинарные, так и в двойные кавычки.

Также можно отфильтровать полученные данные командой grep:

 # asterisk -rx "sip show peers" | grep unreachebale

logger.conf

Консоль является объектом модуля логов в Asterisk. Что должно отображаться в консоли при подключении, настраивается в конфиге logger.conf

Asterisk: настройка и установка


IPMatika Yealink - Auto Provisioning - Hot Desking

$
0
0

IPMatika Yealink - Auto Provisioning - Hot Desking

Рассмотрим простой пример организации VoIP АТС с реализацией функций:
Auto Provisionig - в нашем примере, загрузка настроек телефона с TFTP сервера.
Hot Desking - за телефонными аппаратами не закреплен конкретный номер. Сотрудник нажимает запрограммированную кнопку на телефоне, вводит логин/пароль и авторизуется на своем SIP аккаунте.

Данная инструкция ориентирована на использование линейки VoIP телефонов Yealink(IPmatika) SIP-T2/T19P/T4

Список моделей.

  • Yealink SIP-T28P
  • Yealink SIP-T26P
  • Yealink SIP-T22P
  • Yealink SIP-T21P
  • Yealink SIP-T20P
  • Yealink SIP-T19P
  • Yealink SIP-T46G
  • Yealink SIP-T42G
  • Yealink SIP-T41P

Формат имени конфигурационного файла общих настроек (common) для каждой модели.

Phone Model Common CFG File
SIP-T28P y000000000000.cfg
SIP-T26P y000000000004.cfg
SIP-T22P y000000000005.cfg
SIP-T21P y000000000034.cfg
SIP-T20P y000000000007.cfg
SIP-T19P y000000000031.cfg
SIP-T46G y000000000028.cfg
SIP-T42G y000000000029.cfg
SIP-T41P y000000000036.cfg

Формат имени конфигурационного файла для каждого уникального устройства.

MAC_Address.cfg

Пример общего конфигурационного файла модели T19(P).

Может быть использован для всех вышеперечисленных моделей.

y000000000031.cfg

y000000000031.cfg

#!version:1.0.0.1

##File header "#!version:1.0.0.1" can not be edited or deleted, and must be placed in the first line.##

#######################################################################################
##                          Network                                                  ## 
#######################################################################################

#Configure the WAN port type; 0-DHCP (default), 1-PPPoE, 2-Static IP Address;
#Require reboot;
network.internet_port.type =     

#Configure the static IP address, subnet mask, gateway and DNS server;
#Require Reboot;
network.internet_port.ip =
network.internet_port.mask = 
network.internet_port.gateway =
network.primary_dns= 
network.secondary_dns = 

#Configure the duplex mode and the speed of the WAN port.
#0-Auto negotiate (default), 1-Full duplex 10Mbps, 2-Full duplex 100Mbps, 3-Half duplex 10Mbps, 4-Half duplex 100Mbps;
network.internet_port.speed_duplex = 

#Configure the username and password for PPPOE connection.
#Require reboot;
network.pppoe.user = 
network.pppoe.password = 

#Configure the PC port type; 0-Router, 1-Bridge (default);
#Require reboot;
network.bridge_mode =     

#Configure the IP address and mask when the PC port is configured as Router.
#Require reboot;
network.pc_port.ip = 
network.pc_port.mask = 

#Configure the duplex mode and the speed of the PC port when configured as Router.
#0-Auto negotiate (default), 1-Full duplex 10Mbps, 2-Full duplex 100Mbps, 3-Half duplex 10Mbps, 4-Half duplex 100Mbps;
network.pc_port.speed_duplex = 

#Enable or disable the DHCP server when the PC port is configured as Router; 0-Disabled, 1-Enabled (default);
#Require reboot;
network.pc_port.dhcp_server = 

#Define the DHCP IP address range. The default is from 10.0.0.10 to 10.0.0.100.
network.dhcp.start_ip =
network.dhcp.end_ip =

#Enable or disable the VLAN of WAN prot; 0-Disabled (default), 1-Enabled;
#Require reboot;
network.vlan.internet_port_enable =            

#Configure the VLAN ID, it ranges from 0 to 4094, the default value is 0.
#Require reboot;
network.vlan.internet_port_vid =  

#Configure the VLAN priority, it ranges from 0 (default) to 7. 
#Require reboot;            
network.vlan.internet_port_priority =        
        
#Enable or disable the VLAN of PC port; 0-Disabled (default), 1-Enabled; 
#Require reboot;
network.vlan.pc_port_enable =  

#Configure the VLAN ID, it ranges from 0 to 4094, the default value is 1. 
#Require reboot;
network.vlan.pc_port_vid =      

#Configure the VLAN priority, it ranges from 0 (default) to 7. 
#Require reboot;
network.vlan.pc_port_priority =    

#Enable or disable the DHCP to obtain the information of the VLAN; 0-Disabled; 1-Enabled (default);
#Require reboot;
network.vlan.dhcp_enable =

#Configure the DHCP option to obtain the information of the VLAN. It ranges from 0 to 255.
#Multiple options separated by a comma. It supports up to 5 options in all.
#Require reboot;
network.vlan.dhcp_option =

#Configure the transmit package mode when the VLAN of PC port is enabled; 
#0-The package is not treated and forwarded directly from PC port to the WAN port;
#1-The package is added the tag and forwarded from PC port to the WAN port, if the package is not the tag.
#Require reboot;
network.vlan.pc_port_mode =

#Configure the access type of the web server; 0-Disabled, 1-HTTP & HTTPS(default), 2-HTTP Only, 3-HTTPS Only;
#Require reboot;
network.web_server_type = 

#Configure the HTTP port (80 by default) and the HTTPS port (443 by default) of the web server. Both range from 1 to 65535.
#Require reboot;
network.port.http = 
network.port.https = 

#Configure the maximum local RTP port. It ranges from 0 to 65535, the default value is 11800.
#Require reboot;
network.port.max_rtpport = 

#Configure the minimum local RTP port. It ranges from 0 to 65535, the default value is 11780.
#Require reboot;
network.port.min_rtpport = 

#Configure the voice QOS. It ranges from 0 to 63, the default value is 46.
#Require reboot;
network.qos.rtptos = 

#Configure the SIP QOS. It ranges from 0 to 63, the default value is 26.
#Require reboot;
network.qos.signaltos = 

#Configure the 802.1x mode; 0-Disabled (default), 1-EAP-MD5, 2-EAP-TLS, 3-PEAP-MSCHAPV2;
#Require reboot;
network.802_1x.mode = 

#Configure the username and password for 802.1x authentication.
#Require reboot;
network.802_1x.identity = 
network.802_1x.md5_password = 

#Configure the access URL of the root and client certificates.
network.802_1x.root_cert_url =
network.802_1x.client_cert_url = 

#Enable or disable the VPN feature; 0-Disabled (default), 1-Enabled;
#Require reboot;
network.vpn_enable = 

#Enable or disable the LLDP feature; 0-Disabled, 1-Enabled (default);
#Require reboot;
network.lldp.enable = 

#Configure the interval(in seconds) the phone broadcasts the LLDP request. It ranges from 1 to 3600, the default value is 60.
#Require reboot;
network.lldp.packet_interval = 

#Enable or disable the SNMP feature; 0-Disabled (default), 1-Enabled;
#Require reboot;
network.snmp.enable =

#Configure the SNMP port.
#Require reboot;
network.snmp.port = 

#Configure the IP address(es) of the trusted SNMP server,multiple IP addresses must be separated by a space.
#Require reboot;
network.snmp.trust_ip =

#Enable or disable the span from WAN port to PC port feature; 0-Disabled (default), 1-Enabled;
#Require reboot;
network.span_to_pc_port =

#Configure the phone whether to add the MAC address to the User-Agent header; 0-Do not add, 1-Add;
#Require reboot;
network.sip.tag_mac_to_ua.enable =

#######################################################################################
##                Syslog Server                                                      ##          
#######################################################################################

#Configure the IP address of the syslog server.
#Require reboot;
syslog.server = 

#Configure the syslog level. It ranges from 0 to 6, the default value is 3.
#Require reboot;
syslog.log_level = 

#######################################################################################
##                 TR069                                                             ##
#######################################################################################

#The TR069 feature is only applicable to some designated firmware version.
#All settings of TR069 require reboot.
#Enable or disable the TR069 feature; 0-Disabled (default), 1-Enabled;
managementserver.enable = 

#Configure the username and password for the phone to authenticate with the ACS.
managementserver.username = 
managementserver.password = 

#Configure the access URL of the ACS.
managementserver.url = 

#Configure the username and password for the phone to authenticate the connection requests.
managementserver.connection_request_username = 
managementserver.connection_request_password = 

#Enable or disable the phone to inform its configuration to the ACS; 0-Disabled (default), 1-Enabled;
managementserver.periodic_inform_enable = 

#Configure the interval (in seconds) the phone to inform its configuration to the ACS. The default value is 60.
managementserver.periodic_inform_interval = 

#######################################################################################
##                 Auto Provisioning                                                 ##      
#######################################################################################

#Configure the auto provision mode;
#0-Disabled (default), 1-Power on, 4-Repeatedly, 5-Weekly, 6-Power on + Repeatedly, 7-Power on + Weekly; 
auto_provision.mode = 1

#Enable or disable the Plug and Play feature; 0-Disabled, 1-Enabled (default);
auto_provision.pnp_enable =  

#Configure the domain name of the PNP server.
auto_provision.pnp_domain_name =

#Configure the value (manufacturer of the device) of the PNP subscribe message. 
auto_provision.pnp_event_vendor =

#Configure the interval (in minutes) for the phone to check new configuration files. It ranges from 1 to 43200, the default value is 1440.
#It is only applicable to "Repeatedly" and "Power on + Repeatedly" modes.
auto_provision.schedule.periodic_minute = 

#Configure the start time of the day for the phone to check new configuration files. The default value is 00:00.
#It is only applicable to "Weekly" and "Power on + Weekly" modes. 
#If the desired start time of the day is seven forty-five a.m., the value format is 07:45.
auto_provision.schedule.time_from =

#Configure the end time of the day for the phone to check new configuration files.  The default time is 00:00.
#It is only applicable to "Weekly" and "Power on + Weekly" modes.
#If the desired end time of the day is seven forty-five p.m., the value format is 19:45.
auto_provision.schedule.time_to =

#Configure the day of week for the phone to check new configuration files. The default vaule is 0123456.
#0-Sunday,1-Monday,2-Tuesday,3-Wednesday,4-Thursday,5-Friday,6-Saturday;
#It is only applicable to "Weekly" and "Power on + Weekly" modes.
#If the desired week is Monday, Tuesday and Wednesday, the value format is 012.
auto_provision.schedule.dayofweek =

#Configure the URL of the auto provisioning server.
auto_provision.server.url = 10.10.10.1

#Configure the username and password for downloading.
auto_provision.server.username = 
auto_provision.server.password = 

#Configure the name of the common file.
#T28P: y000000000000.cfg, T26P: y000000000004.cfg, T22P: y000000000005.cfg, T20P: y000000000007.cfg;
auto_provision.common_file_name = 

#Enable or disable DHCP option mode; 0-Disabled, 1-Enabled (default);
auto_provision.dhcp_option.enable =

#Configure the value (manufacturer of the device) of DHCP option 60. 
auto_provision.dhcp_option.option60_value = 

#Configure the custom DHCP option number. It ranges from 128 to 254. 
auto_provision.dhcp_option.list_user_options = 

#Configure AES key (16 characters) for decrypting the common CFG file. 
auto_provision.aes_key_16.com = 

#Configure AES key (16 characters) for decrypting the MAC-Oriented CFG file.
auto_provision.aes_key_16.mac = 

#Configure the mode of downloading configuration files for the phone. The value is 0(default) or 1.
auto_provision.update_file_mode = 0

#######################################################################################
##	               Auto Provisioning Code                                            ##
#######################################################################################

#This feature allows user to trigger the auto provisioning by pressing a predefined string on the phone.
#Require reboot;
#"X" ranges from 1 to 50

#Configure the auto provisioning name.
#The valid value is a string, the maximum length is 100.
#autoprovision.X.name =                  

#Configure the auto provisioning code;
#The valid value is a string, the maximum length is 100.
#autoprovision.X.code =                   

#Configure the URL of the auto provisioning server.
#The valid value is a string, the maximum length is 256.
#autoprovision.X.url =                

#Configure the username and password for downloading.
#The valid value is a string, the maximum length is 100.
#autoprovision.X.user =                   
#autoprovision.X.password =            

#Configure AES key (16 characters) for decrypting the common CFG file and MAC-Oriented CFG file.
#autoprovision.X.com_aes =               
#autoprovision.X.mac_aes =               

autoprovision.1.name =        
autoprovision.1.code =        
autoprovision.1.url =         
autoprovision.1.user =        
autoprovision.1.password =    
autoprovision.1.com_aes =     
autoprovision.1.mac_aes =     

autoprovision.2.name =        
autoprovision.2.code =        
autoprovision.2.url =         
autoprovision.2.user =        
autoprovision.2.password =    
autoprovision.2.com_aes =     
autoprovision.2.mac_aes = 

#######################################################################################
##	                Phone Features                                                   ##
#######################################################################################

#Enable or disable the phone to escape the pound key as percent sign followed by 23 when dialing out; 0-Disabled, 1-Enabled (default); 
sip.use_23_as_pound = 

#Enable or disable the RFC2543 Hold feature; 0-Disabled (default), 1-Enabled;
sip.rfc2543_hold = 

#Enable or disable the phone to keep sending the SIP messages to the outbound server; 0-Disabled, 1-Enabled (default);
sip.use_out_bound_in_dialog = 

#Configure the registration random time (in seconds). It ranges from 0 (default) to 60. 
sip.reg_surge_prevention = 

#Enable or disable the WatchDog feature; 0-Disabled, 1-Enabled (default);
watch_dog.enable = 

#Enable or disable the transferee to display the missed call prompt when receiving a semi_attended transfer call;
#0-Disabled, 1-Enabled (default);
transfer.semi_attend_tran_enable =

#Enable or disable the phone to complete the blind or attended transfer through on-hook;
#0-Disabled,1-Enabled(default);
transfer.blind_tran_on_hook_enable =    
transfer.on_hook_trans_enable = 

#Define the way of DSS key when configuring as a transfer key; 0-Display Number, 1-Attended Transfer, 2-Blind Transfer (default);
transfer.dsskey_deal_type =

#Enable or disable the phone to enter the transfer to interface during two calls when pressing the transfer soft key or TRAN key; 0-Disable, 1-Enabled (default);
transfer.multi_call_trans_enable =

#Enable or disable the conference initiator to transfer the call when hanging up. 
#0-Disabled(default),1-Enabled;
transfer.tran_others_after_conf_enable =  


#######################################################################################
##         	                   Call Forward                                          ##               
#######################################################################################

#Configure the call forward key mode; 0-Phone mode (default), 1-Custom mode.
features.fwd_mode =

#Enable or disable the always forward feature; 0-Disabled (default), 1-Enabled;
forward.always.enable = 

#Configure the target number that the phone will forward the call to.
forward.always.target = 

#Configure the always forward on code and off code.
forward.always.on_code = 
forward.always.off_code = 

#Enable or disable the busy forward feature; 0-Disabled (default), 1-Enabled;
forward.busy.enable = 
forward.busy.target = 
forward.busy.on_code = 
forward.busy.off_code = 

#Enable or disable the no answer forward feature; 0-Disabled (default), 1-Enabled; 
#Configure the waiting ring times before forwarding. It ranges from 0 to 20, the default value is 2.
forward.no_answer.enable = 
forward.no_answer.target = 
forward.no_answer.timeout = 
forward.no_answer.on_code = 
forward.no_answer.off_code = 

#Enable or disable the phone to forward the call to the international number (the prefix is 00); 0-Disabled (default), 1-Enabled;
forward.international.enable = 

#######################################################################################
##         	                   DND                                                   ##               
#######################################################################################

#Configure the DND key mode; 0-Phone mode (default), 1-Custom mode.
features.dnd_mode = 

#Configure the DND on code and off code.
features.dnd.on_code = 
features.dnd.off_code =

#######################################################################################
##                                Voice                                              ##
#######################################################################################

#Enable or disable the voice activity detection feature; 0-Disbaled (default), 1-Enabled;
voice.vad = 

#Enable or disable the comfortable noise generator; 0-Disabled, 1-Enabled (default);
voice.cng = 

#Enable or disable the echo canceller; 0-Disabled, 1-Enabled (default);
voice.echo_cancellation =

#Configure the volume of the side tone. It ranges from -48 to 0, the default value is -3.
voice.side_tone= 

#Configure the sending volume of Speaker, Handset and Headset. It ranges from 1 to 53, the default values are 25, 35, 29.
#Require reboot;
voice.handfree_send =
voice.handset_send = 
voice.headset_send = 

#Configure the type of jitter buffer; 0-Fixed, 1-Adaptive (default); 
voice.jib.adaptive = 

#Configure the minimum delay, maximum delay and normal delay. The default values are 0, 300, 120.
voice.jib.min =
voice.jib.max = 
voice.jib.normal = 

#Define the voice tone, the valid values can be Custom (default) or voice tone of different countries. For example, United States, France, Germany and so on.
#voice.tone.country = Custom 
voice.tone.country =

#Customize the tone when the "voice.tone.country" is configured as Custom.  
#The value format: Frequency/Duration.
#Frequency ranges from 200 to 7000. When 0 is used to define the frequency, it means a pause between tones.
#A tone can be composited at most four different frequencies (the value format is: F1+F2+F3+F4).
#Duration is the time duration (in milliseconds) of ringing the tone. It ranges from 0 to 30000ms.
#At most eight tones can be configured for dial, ring, busy and so on, each tone is separated by a comma. 
#For example, voice.tone.dial = 100/200,200/150,300+400+500+1200/1000,0/1200,500+900/800,5000+2000+3000/6000,0/1500,3600/1800
voice.tone.dial = 
voice.tone.ring = 
voice.tone.busy = 
voice.tone.congestion = 
voice.tone.callwaiting = 
voice.tone.dialrecall = 
voice.tone.record= 
voice.tone.info = 
voice.tone.stutter = 
voice.tone.message = 
voice.tone.autoanswer = 

#Configure the receiving volume of Speaker, Handset and Headset. It ranges from 0 to 15, the default value is 8.
voice.handfree.spk_vol = 
voice.handset.spk_vol = 
voice.headset.spk_vol = 

#Configure the dial tone volume of Speaker, Handset and Headset. It ranges from 0 to 15, the default value is 8.
voice.handfree.tone_vol = 
voice.handset.tone_vol = 
voice.headset.tone_vol = 

#configure the preview call mode; 1-Ignore:the mixed of tone and RTP (default), 2-Force: discard the RTP and play the tone, 3-Skip: skip the tone to play the RTP;
voice.call_preview_mode=

#######################################################################################
##         	                   Security Settings                                     ##                   
#######################################################################################

#Enable or disable the phone to only accept the certificates in the Trusted Certificates list;
#0-Disabled, 1-Enabled (default);
security.trust_certificates = 

#Define the login username and password of the user, var and administrator.
#If you change the username of the administrator from "admin" to "admin1", your new administrator's username should be configured as: security.user_name.admin = admin1.
#If you change the password of the administrator from "admin" to "admin1pwd", your new administrator's password should be configured as: security.user_password = admin1:admin1pwd.

#The following examples change the user's username to "user23" and the user's password to "user23pwd".
#security.user_name.user = user23
#security.user_password = user23:user23pwd
#The following examples change the var's username to "var55" and the var's password to "var55pwd".
#security.user_name.var = var55
#security.user_password = var55:var55pwd

security.user_name.user = 
security.user_name.admin = 
security.user_name.var = 
security.user_password = 

#Enable or disable the 3-level permissions (open var); 0-Disabled (default), 1-Enabled;
#Require reboot;
security.var_enable = 

#######################################################################################
##                   Customize the softkey                                           ##                                 
#######################################################################################
#Customize the softkeys presented on the phone LCD screen when Callfailed, Callin, Connecting, Dialing, Ringback and Talking. 
#Before using these parameters, you should store the desired XML files to the provisioning server.
custom_softkey_call_failed.url = 
custom_softkey_call_in.url = 
custom_softkey_connecting.url = 
custom_softkey_dialing.url = 
custom_softkey_ring_back.url = 
custom_softkey_talking.url = 

#######################################################################################
##         	                  Memory Key (For T26P and T28P)                         ##              
#######################################################################################
#X ranges from 1 to 10;
#memorykey.x.line--Configure the desired line to apply the key feature. T26P line value ranges from 0 to 3. T28P line value ranges from 0 to 6.
#The value 0 of the "memorykey.x.line" stands for Auto, it means the first available line. 
#But, when the DSS key is configured as BLF, BLF List, Shared Line, Call Park, Pick Up, ACD or Voice Mail feature, the value 0 stands for line 1.
#memorykey.x.value--Enter the value of some features. E.g. When configuring the DSS key to be BLF, enter the number of the monitored user.
#memorykey.x.pickup_value--Enter the pickup code, this parameter is only appilicable to BLF.
#memorykey.x.type--Assign the desired feature to the memory key.
#Valid types are:  0-N/A(default for memory key)  1-Conference 		 2-Forward    3-Transfer      4-Hold        5-DND             6-Redial                        7-Call Return     8-SMS    
#                  9-Direct Pickup                10-Call Park     11-DTMF      12-Voicemail    13-SpeedDial  14-Intercom       15-Line(default for line key)   16-BLF            17-URL    
#                  18-Group Listening             19-Public Hold   20-Private   21-Shared Line  22-XML Group  23-Group Pickup   24-Paging                       25-Record         27-XML Browser    
#                  34-Hot Desking                 35-URL Record    38-LDAP      39-BLF List     40-Prefix     41-Zero Touch     42-ACD                          45-Local Group    46-Broadsoft Group 
#memorykey.x.xml_phonebook--Specify the desired remote phonebook/local group/BSFT phonebook for the DSS key. This parameter is only appilicable to the feature XML Group/Local Group/Broadsoft Group.  

#Configure Memory Key1
memorykey.1.line = 
memorykey.1.value = 
memorykey.1.pickup_value = 
memorykey.1.type =  
memorykey.1.xml_phonebook =   

#Configure Memory Key2
memorykey.2.line = 
memorykey.2.value = 
memorykey.2.pickup_value = 
memorykey.2.type =  
memorykey.2.xml_phonebook =   

#Configure Memory Key3
memorykey.3.line = 
memorykey.3.value = 
memorykey.3.pickup_value = 
memorykey.3.type =  
memorykey.3.xml_phonebook =  


#Configure Memory Key4
memorykey.4.line = 
memorykey.4.value = 
memorykey.4.pickup_value = 
memorykey.4.type =  
memorykey.4.xml_phonebook =  

#Configure Memory Key5
memorykey.5.line = 
memorykey.5.value = 
memorykey.5.pickup_value = 
memorykey.5.type =  
memorykey.5.xml_phonebook =  

#Configure Memory Key6
memorykey.6.line = 
memorykey.6.value = 
memorykey.6.pickup_value = 
memorykey.6.type =  
memorykey.6.xml_phonebook =  

#Configure Memory Key7
memorykey.7.line = 
memorykey.7.value = 
memorykey.7.pickup_value = 
memorykey.7.type =  
memorykey.7.xml_phonebook =  

#Configure Memory Key8
memorykey.8.line = 
memorykey.8.value = 
memorykey.8.pickup_value = 
memorykey.8.type =  
memorykey.8.xml_phonebook =  

#Configure Memory Key9
memorykey.9.line = 
memorykey.9.value = 
memorykey.9.pickup_value = 
memorykey.9.type =  
memorykey.9.xml_phonebook =  

#Configure Memory Key10
memorykey.10.line = 
memorykey.10.value = 
memorykey.10.pickup_value = 
memorykey.10.type =  
memorykey.10.xml_phonebook =          
                      
#######################################################################################
##         	                   Line Key                                              ##                 
#######################################################################################

#The x of the parameter "linekey.x.line" ranges from 1 to 6.
#The default value equals to the value of x. For example, the default value of the parameter "linekey.1.line" is 1.
#linekey.x.lable--Define the label for each line key.

#Configure Line Key1 
linekey.1.line =  
linekey.1.value = 
linekey.1.pickup_value = 
linekey.1.type = 
linekey.1.xml_phonebook =
linekey.1.label = 

#Configure Line Key2                        
linekey.2.line =                         
linekey.2.value =                         
linekey.2.pickup_value =                   
linekey.2.type =                         
linekey.2.xml_phonebook =                 
linekey.2.label =                        

#Configure Line Key3                         
linekey.3.line =                         
linekey.3.value =                         
linekey.3.pickup_value =                   
linekey.3.type =                         
linekey.3.xml_phonebook =                 
linekey.3.label =                        

#Configure Line Key4 (for T28P only)                        
linekey.4.line =                         
linekey.4.value =                         
linekey.4.pickup_value =                   
linekey.4.type =                         
linekey.4.xml_phonebook =                 
linekey.4.label =                         

#Configure Line Key5  (for T28P only)                       
linekey.5.line =                         
linekey.5.value =                         
linekey.5.pickup_value =                   
linekey.5.type =                          
linekey.5.xml_phonebook =                 
linekey.5.label =                         

#Configure Line Key6  (for T28P only)                       
linekey.6.line =                         
linekey.6.value =                         
linekey.6.pickup_value =                   
linekey.6.type =                         
linekey.6.xml_phonebook =                 
linekey.6.label =                        

##########################################################################################
##         	               Programmable Key                                             ##               
##########################################################################################
#X ranges from 1 to 15.
#programablekey.x.type--Customize the programmable key type.
#The valid types are: 
#0-N/A        2-Forward       5-DND              6-Redial               7-Call Return   8-SMS              9-Direct Pickup   13-Spead Dial 
#22-XML Group 23-Group Pickup 27-XML Browser     28-History             29-Directory    30-Menu            31-Switch Account 32-New SMS 
#33-Status    40-PTT          43-Local Phonebook 44-Broadsoft Phonebook 45-Local Group  46-Broadsoft Group 47-XML Phonebook  50-Keypad Lock
#PTT-add a specified prefix number before the dialed number.
#programablekey.x.line--Configure the desired line to apply the key feature. It ranges from 0 to 6.
#The value 0 of the "proramablekey.x.line" stands for Auto, it means the first available line. 
#But, when the programmable key is configured as Pick Up, the value 0 stands for line 1.

#programablekey.x.value =
#programablekey.x.xml_phonebook--Specify the desired remote phonebook/local group/BSFT phonebook for the programmable key. This parameter is only appilicable to the feature XML Group/Local Group/Broadsoft Group.
#programablekey.x.history_type =

#programablekey.x.label--This parameter is only available to the key 1 to key 4. 

programablekey.1.type = 34
programablekey.1.line = 
programablekey.1.value =
programablekey.1.xml_phonebook =
programablekey.1.history_type =
programablekey.1.label = цдс

##########################################################################################
##         	                        Expansion Key                                       ##               
##########################################################################################
#X ranges from 1 to 16, Y ranges from 1 to 40.
#expansion_module.x.key.y.type = 37 (Switch by default)
#expansion_module.x.key.y.line = 0 
#expansion_module.x.key.y.value = 
#expansion_module.x.key.y.pickup_value = 
#expansion_module.x.key.y.label =
#expansion_module.X.key.Y.xml_phonebook =

#Each expansion module1 key1
expansion_module.1.key.1.type = 
expansion_module.1.key.1.line = 
expansion_module.1.key.1.value = 
expansion_module.1.key.1.pickup_value = 
expansion_module.1.key.1.label =
expansion_module.1.key.1.xml_phonebook =

#Each expansion module1 key2
expansion_module.1.key.2.type =
expansion_module.1.key.2.line = 
expansion_module.1.key.2.value = 
expansion_module.1.key.2.pickup_value = 
expansion_module.1.key.2.label = 
expansion_module.1.key.2.xml_phonebook =

#Each expansion module2 key1
expansion_module.2.key.1.type = 
expansion_module.2.key.1.line = 
expansion_module.2.key.1.value = 
expansion_module.2.key.1.pickup_value = 
expansion_module.2.key.1.label =
expansion_module.2.key.1.xml_phonebook =
      
#######################################################################################
##           Automatic Call Distribute                                               ##
#######################################################################################
#Enable or disable the phone to automatically change the phone status to available; 0-Disabled (default), 1-Enabled;
acd.auto_available = 

#Configure the interval (in seconds) to automatically turn the state of the ACD agent to available. It ranges from 0 to 120, the default value is 60.
acd.auto_available_timer = 

#######################################################################################
#         	                   Action URL Settings                                   ##    
#######################################################################################

#action_url.setup_completed--Inform the server that the phone has completed the startup.              
#action_url.dnd_on-- Inform the server that the DND is activated on the phone. 
#The value format is: http://IP address of server/help.xml?variable name=variable value. 
#The valid variable values are: $mac--MAC address of phone, $ip--The current IP address of phone, $model--Phone model, $firmware--Phone firmware version. 
#$active_url--The SIP URI of the current account when the phone is in the incoming state, outgoing state or during conversation. 
#$active_user--The username of the current account when the phone is in the incoming state, outgoing state or during conversation.
#$active_host--The host name of the current account when the phone is in the incoming state, the outgoing state or during conversation. 
#$local--The SIP URI of the caller when outgoing calls or the SIP URI of the callee when receiving calls. 
#$remote--The SIP URI of the callee when outgoing calls or the SIP URI of the caller when receiving calls.
#$display_local--The display name of the caller when outgoing calls or the display name of the callee when receiving calls.
#$display_remote--The display name of the callee when outgoing calls or the display name of the caller when receiving calls.
#$call_id--The caller ID when in the incoming state, the outgoing state or during conversation.
#For example, action_url.log_on = http://192.168.1.20/help.xml?mac=$mac

action_url.setup_completed = 
action_url.log_on = 
action_url.log_off = 
action_url.register_failed = 
action_url.off_hook = 
action_url.on_hook = 
action_url.incoming_call = 
action_url.outgoing_call = 
action_url.call_established = 
action_url.dnd_on = 
action_url.dnd_off = 
action_url.always_fwd_on = 
action_url.always_fwd_off = 
action_url.busy_fwd_on = 
action_url.busy_fwd_off = 
action_url.no_answer_fwd_on = 
action_url.no_answer_fwd_off = 
action_url.transfer_call = 
action_url.blind_transfer_call =
action_url.attended_transfer_call = 
action_url.hold = 
action_url.unhold = 
action_url.mute = 
action_url.unmute = 
action_url.missed_call = 
action_url.call_terminated = 
action_url.busy_to_idle = 
action_url.idle_to_busy = 
action_url.ip_change =
action_url.answer_new_incoming_call =
action_url.reject_incoming_call = 
action_url.transfer_finished = 
action_url.transfer_failed = 
action_url.forward_incoming_call =

#######################################################################################
##         	                   Language Settings                                     ##       
#######################################################################################

#Specify the web language, the valid values are: English, Chinese_S, Turkish, Portuguese, Spanish, Italian, French, Russian, Deutsch and Czech.
lang.wui = 

#Specify the LCD language, the valid values are: English (default), Chinese_S, Chinese_T, German, French, Turkish, Italian, Polish, Spanish and Portuguese.
#lang.gui = English
lang.gui = 

#######################################################################################
##         	                   Time Settings                                         ##
#######################################################################################

#Configure the time zone and time zone name. The time zone ranges from -11 to +12, the default value is +8. 
#The default time zone name is China(Beijing).  
#Refer to Yealink IP Phones User Guide for more available time zones and time zone names. 
#local_time.time_zone = +8
#local_time.time_zone_name = China(Beijing) 
local_time.time_zone = +3
local_time.time_zone_name = 

#Configure the domain name or the IP address of the NTP server. The default value is cn.pool.ntp.org.
local_time.ntp_server1 = 10.10.10.1
local_time.ntp_server2 = 

#Configure the update interval (in seconds) when using the NTP server. The default value is 1000.
local_time.interval = 

#Configure the daylight saving time feature; 0-Disabled, 1-Enabled, 2-Automatic (default); 
local_time.summer_time = 0

#Configure the DST type when the DST feature is enabled; 0-By Date (default), 1-By Week;
local_time.dst_time_type = 

#Configure the start time of DST. The default value is 1/1/0.
#If the DST type is configured as By Date, the value format is Month/Day/Hour. For example, the value 5/20/10 means the start time is at 10:00 on May 20.  
#If the DST type is configured as By Week, the value format is Month/Day of Week/Day of Week Last in Month/Hour of Day. 
#For example, the value 1/4/2/5 means the start time is at 5 o'clock on Tuesday of the 4th week in January.
local_time.start_time = 

#Configure the end time of DST. The default value is 12/31/23. The value format is the same to the start time.
local_time.end_time = 

#Configure the offset time (in seconds). It ranges from -300 to 300, the default value is 60.
local_time.offset_time = 

#Configure the time format; 0-12 Hour, 1-24 Hour (default);
local_time.time_format = 

#Configure the date format; 0-WWW MMM DD (default), 1-DD-MMM-YY, 2-YYYY-MM-DD, 3-DD/MM/YYYY, 4-MM/DD/YY, 5-DD MMM YYYY, 6-WWW DD MMM;
local_time.date_format = 

#Enable or disable the DHCP Time; 0-Disabled (default), 1-Enabled;
local_time.dhcp_time = 1

#######################################################################################
##         	        Hot Desking                                                      ##
#######################################################################################
#Enable or disable the phone to show the following items on the login wizard during startup; 0-Disabled, 1-Enabled;  
#hotdesking.startup_register_name_enable = 1 (default)
#hotdesking.startup_username_enable = 1 (default)
#hotdesking.startup_password_enable = 0 (default)
#hotdesking.startup_sip_server_enable = 0 (default)
#hotdesking.startup_outbound_enable = 0 (default)

hotdesking.startup_register_name_enable = 0
hotdesking.startup_username_enable = 1
hotdesking.startup_password_enable = 1
hotdesking.startup_sip_server_enable = 0
hotdesking.startup_outbound_enable = 0

#Enable or disable the phone to show the following items on the login wizard when pressing the Hot Desking DSS key;
#0-Disabled, 1-Enabled;
#hotdesking.dsskey_register_name_enable = 1 (default)
#hotdesking.dsskey_username_enable = 1 (default)
#hotdesking.dsskey_password_enable = 0 (default)
#hotdesking.dsskey_sip_server_enable = 0 (default)
#hotdesking.dsskey_outbound_enable = 0 (default)

hotdesking.dsskey_register_name_enable = 0
hotdesking.dsskey_username_enable = 1
hotdesking.dsskey_password_enable = 1
hotdesking.dsskey_sip_server_enable = 0 
hotdesking.dsskey_outbound_enable = 0

#######################################################################################
##         	           Distinctive Ring Tones                                        ##  
#######################################################################################

#"X" ranges from 1 to 10; 
#Configure the text to map the keywords contained in the "Alert-info" header.
#distinctive_ring_tones.alert_info.X.text = family
distinctive_ring_tones.alert_info.1.text =

#Specify the ring tone for each text. It ranges from 1 to 8. The default value 1 stands for Ring1.wav.
#1-Ring1.wav, 2-Ring2.wav, 3-Ring3.wav, 4-Ring4.wav, 5-Ring5.wav, 6-Ring6.wav, 7-Ring7.wav, 8-Ring8.wav.
#distinctive_ring_tones.alert_info.X.ringer = 1
distinctive_ring_tones.alert_info.1.ringer = 

#######################################################################################
##         	               Auto Redial                                               ##
#######################################################################################

#Enable or disable the auto redial feature; 0-Disabled (default), 1-Enabled;
auto_redial.enable = 

#Configure the interval (in seconds) to wait before redial. It ranges from 1 to 300. The default value is 10.
auto_redial.interval = 

#Configure the auto redial times. It ranges from 1 to 300. The default value is 10.
auto_redial.times = 

#######################################################################################
##         	               Zero Touch                                                ##
#######################################################################################
#Enable or disable the Zero Touch feature; 0-Disabled (default), 1-Enabled; 
zero_touch.enable = 

#Configure the waiting time (in seconds) before canceling the Zero Touch. It ranges from 0 to 100, the default value is 5.
zero_touch.wait_time = 

#######################################################################################
##         	               Push XML                                                  ##
#######################################################################################

push_xml.server =

#Enable or disable the phone to display the push XML interface when receiving an incoming call; 0-Disabled (default), 1-Enabled;
push_xml.block_in_calling =  

#Enable or disable the phone to use the push XML via SIP Notify message; 0-Disabled (default), 1-Enabled;
push_xml.sip_notify = 

#######################################################################################
##         	              Dial Plan                                                  ##
#######################################################################################

#Configure the area code;
dialplan.area_code.code = 
dialplan.area_code.min_len = 1
dialplan.area_code.max_len = 15 

#When applying the rule to multiple lines, each line ID separated by a comma. 
#e.g. dialplan.area_code.line_id = 1,2,3
dialplan.area_code.line_id = 

#Configure the block out number. X ranges from 1 to 10.
#dialplan.block_out.number.x =
dialplan.block_out.number.1 =

#When applying the rule to multiple lines, mutiple lines must be separated by a comma. E.g. 1,2,3.
#dialplan.block_out.line_id.X =
dialplan.block_out.line_id.1 =

#Configure the replace rule. X ranges from 1 to 20.
#dialplan.item.X = Enabled,Prefix,Replaced,LineID
#Enabled: Enable or disable the replace rule. 0-Disabled, 1-Enabled; Prefix: Specify the numbers that need replacing; 
#Replaced: Specify the alternate numbers;
#LineID: Specify the line ID to apply the replace rule,multiple lines ID must be separated by a comma;
dialplan.item.1 =

#Configure the dialnow rule. X ranges from 1 to 20.
#dialnow.item.X = Dial-now rule,Line ID
#Dial-now rule: Specify the numbers that need replacing;
#Line ID:Specify the line ID to apply the replace rule,multiple lines must be separated by a comma;
dialnow.item.1 =
 
#######################################################################################
##         	    BSFT Phonebook                                                       ##
#######################################################################################

#Configuration of BW phonebook. X ranges from 1 to 6.
#bw_phonebook.data.X.server = 
#bw_phonebook.data.X.port = 
#bw_phonebook.data.X.username = 
#bw_phonebook.data.X.password = 
#bw_phonebook.data.X.name = 
 
bw_phonebook.data.1.server = 
bw_phonebook.data.1.port = 
bw_phonebook.data.1.username = 
bw_phonebook.data.1.password = 
bw_phonebook.data.1.name = 

#Configure the search parameter of Broadsoft phonebook version 1.0, mutiple parameters must be separated by a "&"symbol.
bw_phonebook.search_params_v1 =

#Configure the search parameter of Broadsoft phonebook version 2.0, mutiple parameters must be separated by a "&"symbol.
bw_phonebook.search_params_v2 =

#Configure the mode of search parameters; 0-AND, 1-OR (default); The vaule only works in Broadsoft phonebook verion 2.0;
bw_phonebook.search_mode_or =

#######################################################################################
##                    BSFT Call Log                                                  ##
#######################################################################################

#Configuration of the BW call log. X ranges from 1 to 3.  
#bw_call_log.data.X.server =   
#bw_call_log.data.X.port =     
#bw_call_log.data.X.username = 
#bw_call_log.data.X.password = 
#bw_call_log.data.X.name =     
        
bw_call_log.data.1.server =        
bw_call_log.data.1.port =          
bw_call_log.data.1.username =      
bw_call_log.data.1.password =      
bw_call_log.data.1.name =         

#Enable or disable the phone to access the BSFT call log/phonebook directly when pressing the History/Directory soft keys;
#0-Disabled (default), 1-Enabled;
#Require reboot;
bw.calllog_and_dir = 

#Specify whether to display the BSFT call log on the web user interface; 0-Disabled, 1-Enabled (default);
#Require reboot;
bw.behave_calllog = 

#Specify whether to display the BSFT directory on the web user interface; 0-Disabled, 1-Enable (default);
#Require reboot;
bw.behave_bw_dir = 

#Enable or disable the feature key synchronization; 0-Disabled (default), 1-Enabled;
bw.feature_key_sync = 

#######################################################################################
##         	    Remote phonebook                                                     ##
#######################################################################################

#Configure the access URL and dispaly name of the remote phonebook. X ranges from 1 to 5.
#remote_phonebook.data.X.url =   
#remote_phonebook.data.X.name =

remote_phonebook.data.1.url =   
remote_phonebook.data.1.name = 

#######################################################################################
##         	              LDAP Settings                                              ##
#######################################################################################
#Configure the search criteria for name and number lookups.
ldap.name_filter = 
ldap.number_filter = 

ldap.host = 0.0.0.0
ldap.port = 389

ldap.base = 
ldap.user = 
ldap.password = 

#Specify the maximum of the displayed search results. It ranges from 1 to 32000, the default value is 50.
ldap.max_hits = 

ldap.name_attr = 
ldap.numb_attr = 
ldap.display_name = 

#Configure the LDAP version. The valid value is 2 or 3 (default).
ldap.version = 

#Conifugre the search delay time. It ranges from 0 (default) to 2000.
ldap.search_delay = 

#Enable or disable the phone to query the contact name from the LDAP server when receiving an incoming call; 0-Disabled (default), 1-Enabled;
ldap.call_in_lookup = 

#Enable or disable the phone to sort the search results in alphabetical order; 0-Disabled (default), 1-Enabled; 
ldap.ldap_sort =  

#Enable or disable the phone to query the LDAP server when in the pre-dialing or the dialing state; 0-Disabled (default), 1-Enabled;
ldap.dial_lookup =  

#######################################################################################
##         	              Phone Features                                             ##
#######################################################################################

#Configure the return code when activating DND; 404-No Found, 480-Temporarily not available (default), 486-Busy here;
#features.dnd_refuse_code = 480
features.dnd_refuse_code = 

#Configure the return code when refusing a call. The valid values are 404, 480, 486 (default).
features.normal_refuse_code = 

#Enable or disable the call completion feature; 0-Disabled (default), 1-Enabled;
features.call_completion_enable = 

#Configure the LED flashing mode of the BLF key (line key). The value is 0(default) or 1.
features.blf_led_mode =

#Enable or disable the call waiting feature; 0-Disabled, 1-Enabled (default);
call_waiting.enable = 

#Enable or disable the playing of call waiting tone; 0-Disabled, 1-Enabled (default);
call_waiting.tone = 

#Enable or disable the intercom feature; 0-Disabled, 1-Enabled (default);
features.intercom.allow = 

#Enable or disable the phone to mute the Speaker when answering an intercom call; 0-Disabled (default), 1-Enabled;     
features.intercom.mute = 

#Enable or disable the phone to play the intercom warning tone; 0-Disabled, 1-Enabled (default); 
features.intercom.tone = 

#Enable or disable the phone to barge in an intercom call; 0-Disabled (default), 1-Enabled;
features.intercom.barge = 

#Enables or disables the IP phone to query the contact names from the remote phonebook when receiving incoming calls; 0-Disabled (default), 1-Enabled; 
features.remote_phonebook.enable =

#Set the interval (in seconds) for the phone to update the information of the remote phonebook. The default value is 3600. 
features.remote_phonebook.flash_time = 

#Configure the hotline number and delay time (in seconds). It ranges from 0 to 180, the default value is 4.
features.hotline_number = 
features.hotline_delay = 

#Enable or disable the phone to suppress the display of DTMF digits; 0-Disabled (default), 1-Enabled;
features.dtmf.hide = 

#Enables or disables the IP phone to display the DTMF digits for a short period before displaying as asterisks; 0-Disabled (default), 1-Enabled;
features.dtmf.hide_delay =

#Configure the repetition times of DTMF end packet. The valid values are 1, 2, 3 (default).
features.dtmf.repetition = 

#Configure DTMF sequences. It can be consisted of digits, alphabets, * and #.
features.dtmf.transfer = 

#Enable or disable the phone to send DTMF sequences during a call when pressing the transfer soft key or the TRAN key; 0-Disabled (default), 1-Enabled;
features.dtmf.replace_tran = 

#Enable or disable the headset prior feature; 0-Disabled (default), 1-Enabled;
features.headset_prior =

#Enable or disable the dual headset feature; 0-Disabled (default), 1-Enabled;
features.headset_training =

#Configure the delay time (in milliseconds) before transfering a call. The default value is 0.
features.hold_trans_delay =

#Enbale or disable the phone to play a local DTMF tone; 0-Disabled, 1-Enabled (default); 
features.play_local_dtmf_tone_enable =

#Enbale or disable the server to release the BLA line automatically; 0-Disabled (default), 1-Enabled;
features.auto_release_bla_line =

#Configure the delay time (in seconds) of playing busy tone when rejecting a call. The valid values are 0 (default), 3 and 5. 
features.busy_tone_delay = 

#Configure the phone whether to send a pound key when pressing double pound keys; 0-Send one pound key (default), 1-Do not send any pound key;
features.send_pound_key = 

#Define the "#" or "*" key as the send key; 0-Disabled, 1-# key(default), 2-* key;
features.pound_key.mode = 

#Enable or disable the phone to play tone when pressing the digit key; 0-Disabled, 1-Enabled (default);
features.send_key_tone = 
features.key_tone = 

#Enable or disable the phone to play a warning tone when there is a held call; 0-Disabled, 1-Enabled (default);
features.play_hold_tone.enable = 

#Configure the interval of playing a warning tone. The default value is 30s.
features.play_hold_tone.delay =

features.redial_tone = 

#Enable or disable the phone with active accounts to play tones in the dialing interface differently from the phone with no active accounts; 0-Disabled (default), 1-Enbaled;
features.partition_tone =

#Enable or disable the phone to encrypt the digits of the dialed number. The encrypted digits are displayed as asterisks on the LCD screen; 0-Disabled (default), 1-Enabled;
features.password_dial.enable =

#Configure the prefix numbers displayed before the encrypted digits.
features.password_dial.prefix =

#Configure the length of encrypted digits.
features.password_dial.length =

#Enable or disable the phone to diaplay the Save Call Log option on the web user interface; 0-Disabled, 1-Enabled (default);
features.history_save_display = 

#Enable or disable the phone to save the call history; 0-Disabled, 1-Enabled (default);   
features.save_call_history = 

#Configure the power Indicator LED to turn on ro turn off; 0-On (default), 1-Off;
features.power_led_on =

#Specifie the address(es) or enters Ў°anyЎ± from which Action URI will be accepted.
#For discontinuous IP addresses, each IP address is separated by comma, for example: 192.168.1.20,10.2.1.30
#For continuous IP addresses, the format likes *.*.*.* and the Ў°*Ў± stands for the values 0~255. For example: 10.10.*.* stands for the IP addresses that range from 10.10.0.0~10.10.255.255.
#If left blank, the IP phone cannot receive or handle any HTTP GET request.
#If set to Ў°anyЎ±, the IP phone accepts and handles HTTP GET requests from any IP address.
features.action_uri_limit_ip =

#Configure the delay time (in seconds)of auto answer. The time ranges from 1 to 4, the default value is 1s.
features.auto_answer_delay =

#Enable or disable the transfer DSS key to perform the blind transfer; 0-Disabled, 1-Enabled (default);
features.dsskey_blind_tran = 

#Configure the overtime (in minutes) of logging web user interface. It ranges from 1 to 1000, the default value is 5.
features.relog_offtime = 
 
#Enable or disable the phone to dial the IP address directly; 0-Disabled, 1-Enabled (default);
features.direct_ip_call_enable = 

#Configure the ringtone of emergency calls;
#features.emergency_ring = Emergency.wav
features.emergency_ring = 

#Enable or disable the phone to mute the call during an active call; 0-Disabled, 1-Enabled (default);
features.allow_mute =

#Specify the ring device when the phone is in the Headset mode; 0-use Speaker (default), 1-use Headset;
features.ringer_device.is_use_headset = 

#Enable or disable the phone to pick up the call using the group pickup soft key; 0-Disabled (default), 1-Enabled;
features.pickup.group_pickup_enable = 

#Configure the group pickup code.
features.pickup.group_pickup_code = 

#Enable or disable the phone to pick up the call using the directed pickup soft key; 0-Disabled (default), 1-Enabled;
features.pickup.direct_pickup_enable = 

#Configure the directed pickup code.
features.pickup.direct_pickup_code =

#Specify the way to notify the phone of the incoming call of the monitored user by visual or audio indicator;
#0-Disabled (default), 1-Enabled;
features.pickup.blf_visual_enable =
features.pickup.blf_audio_enable = 

#Configure the input type when the phone is in the dialing state, if the parameter "ldap.dial_lookup" is Enabled; 0-2aB, 1-123 (default), 2-abc, 3-ABC;
features.ldap.input_type = 

#Enable or disable the phone to play the warning tone when receiving a vocie mail. 0-Disabled; 1-Enabled(default).
features.voice_mail_tone_enable = 

#Configure the time (in seconds) the phone automatically dials out the dialed digits. It ranges from 1 to 14, the default value is 4.
phone_setting.inter_digit_time = 

#Configure the flash hook time (in milliseconds). It ranges from 0 to 799, the default value is 1.
phone_setting.flash_hook_timer = 

#Configure the keypad lock type; 0-Disabled (default), 1-Menu Key, 2-Function Key, 3-All Keys, 4-Lock&Answer;
phone_setting.lock = 

#Configure the unlock password for the phone. The default value is 123.
phone_setting.phone_lock.unlock_pin = 

#Configures the interval (in seconds) to automatically lock the IP phone. It ranges from 0 to 3600, the default value is 0.
phone_setting.phone_lock.lock_time_out = 

#Configure the ring tone for the phone. System ring tones are: Common, Ring1.wav (default), Ring2.wavЎ­Ў­Ring8.wav.
#If you set the custom ring tone (Busy.wav) for the phone, the value is: phone_setting.ring_type = Busy.wav
#If you set the system ring tone (Ring2.wav) for the phone, the value is: phone_setting.ring_type = Ring2.wav
phone_setting.ring_type = 

#Configure the contrast of the LCD screen. It ranges from 1 to 10,the default value is 6.
phone_setting.contrast =

#Configure the logo mode of the LCD screen; 0-Disabled (default), 1-System logo, 2-Custom logo;
phone_setting.lcd_logo.mode = 

#Configure the active backlight level. It ranges from 1 to 3, the default value is 2.
#The same level for different phones may result in different backlight intensities. 
phone_setting.active_backlight_level = 

#Configure the backlight time (in seconds). The valid values are: 0-Always on, 1-Always off, 15-15s, 30-30s (default), 60-60s, 120-120s.
phone_setting.backlight_time = 

#Configure the ring tone when the transfer fails. The valid values are: Ring1.wav.... Ring8.wav.
#phone_setting.ring_for_tranfailed = Ring1.wav 
phone_setting.ring_for_tranfailed =

#Enable or disable the phone to show the logon wizard during startup; 0-Disabled (default), 1-Enabled;
phone_setting.logon_wizard = 

#Enable or disable the phone to automatically dial out the dialed digits in the pre-dial interface; 0-Disabled (default), 1-Enabled;
phone_setting.predial_autodial = 

#Enable or disable the phone to deal the 180 SIP message after the 183 SIP message; 0-Disabled, 1-Enabled (default);
phone_setting.is_deal180 = 

#Configure the delay time (in seconds) for the dialnow rule. It ranges from 1 to 14, the default value is 1.
phone_setting.dialnow_delay = 

#Enable or disable customizing the softkey layout; 0-Disabled (default), 1-Enabled;
phone_setting.custom_softkey_enable =   

#Configure the using mode of the headset key. The value is 0 or 1(default).
phone_setting.headsetkey_mode = 

#Configure the emergency number, each separated by a comma. The default value is 112,911,110.
phone_setting.emergency.number =  

#Configure the phone whether to end the call when the network is unavailable; 0-End the call, 1-Do not end the call.
phone_setting.end_call_net_disconnect.enable = 

#If leaving the field blank, the phone will display the value sent from the server when receiveing the 403 message; otherwise display the value entered in the filed.
#The default value is blank.
phone_setting.show_code403 =

#######################################################################################
##                              Multicast                                            ##                                            
#######################################################################################
#Configure the codec of multicast paging.
multicast.codec = 

#Enbale or diable the phone to handle the incoming multicast paging calls when there is a multicast paging call on the phone; 0-Disabled, 1-Enabled (default);
#If enabled, the phone will answer the incoming multicast paging call with a higher priority and ignore that with a lower priority.
multicast.receive_priority.enable = 

#Configure the priority of multicast paging calls. It ranges from 0 to 10.
multicast.receive_priority.priority = 

#Configure the listening multicast IP address and port number for the phone. X ranges from 1 to 10.
#multicast.listen_address.X.ip_address = 
multicast.listen_address.1.ip_address =

#Configure the lable displayed on the LCD screen when receiving the multicast paging. X ranges from 1 to 10.
#multicast.listen_address.X.label = 
multicast.listen_address.1.label =

#######################################################################################
##                     Configure the access URL of firmware                          ##                                 
#######################################################################################
#Before using this parameter, you should store the desired firmware (x.70.x.x.rom) to the provisioning server.
firmware.url = 

#######################################################################################
##                     Configure the access URL of the customized  ringtones         ##                                  
#######################################################################################
#Before using this parameter, you should store the desired ring tone (x.wav) to the provisioning server.
#For more information, refer to Yealink Auto Provisioning User Guide.
ringtone.url =

#ringtone.delete = http://localhost/all,delete all the customized ring tones.
ringtone.delete =

#######################################################################################
##            Configure the access  URL of language file                             ##                                       
#######################################################################################
#Before using this parameter, you should store the desired language pack to the provisioning server.
#For more information, refer to Yealink Auto Provisioning User Guide.
gui_lang.url = 

#gui_lang.delete = http://localhost/all, delete all the customized languages.
gui_lang.delete =

#######################################################################################
##            Configure the access  URL of logo file                                 ##                                       
#######################################################################################
#Before using this parameter, you should store the desired logo file (x.dob) to the provisioning server.
#For more information, refer to Yealink Auto Provisioning User Guide.
lcd_logo.url =  

#lcd_logo.delete = http://localhost/all, delete all the customized logo.
lcd_logo.delete =

#######################################################################################
##                     Certificates                                                  ##  
#######################################################################################
#Before using this parameter, you should store the desired certificate to the provisioning server.
trusted_certificates.url =

#trusted_certificates.delete = http://localhost/all,delete all the trusted certificates. 
trusted_certificates.delete = 

#Before using this parameter, you should store the desired certificate to the provisioning server.
server_certificates.url = 

#server_certificates.delete = http://localhost/all, delete the server certificate. 
server_certificates.delete = 

#######################################################################################
##  Local Contact/DST Time/Dialnow Rule/Replace Rule                                 ##                                                     
#######################################################################################

#Before using these parameters, you should store the desired resource files to the provisioning server.
#For more information, refer to Yealink SIP-T2xP IP Phone Family Administrator Guide.
local_contact.data.url =
auto_dst.url =
dialplan_dialnow.url =
dialplan_replace_rule.url =

#######################################################################################
##      Customized Factory Configurations                                            ##
#######################################################################################
#Configure the access URL for downloading the customized factory configurations.
#Before using this parameter, you should store the desired factory configuration file to the provisioning server.
custom_factory_configuration.url =

#######################################################################################
##              Customized Configurations                                            ##
#######################################################################################
#Configure the access URL for downloading the configurations.
#Before using this parameter, you should store the desired configuration file to the provisioning server.
configuration.url =

#######################################################################################
##          Call List                                                                ##                                            
#######################################################################################
#Configure the access URL for downloading the call list.
#Before using this parameter, you should store the desired call list file to the provisioning server.
#Require reboot
call_list.url = 

#######################################################################################
##            OpenVPN                                                                ##                                            
#######################################################################################
#Configure the access URL for downloading the open VPN tar.
#Before using this parameter, you should store the desired VPN file to the provisioning server.
openvpn.url =

#######################################################################################
##     Configuration files for Var                                                   ##                                            
#######################################################################################
#Configure the access URL for downloading the files for var.
#Before using this parameter, you should store the desired files to the provisioning server.
#Require reboot
web_item_level.url = 

Использован минимум настроек:

Включить Auto Provisioning:

 auto_provision.mode = 1 

Адрес сервера Auto Provisioning (tftp):

 auto_provision.server.url = 10.10.10.1

Назначим кнопку для Hot Desking (код 34). Под кнопку использована softkey 3 (кнопка под дисплеем, по умолчанию DND)

 programablekey.3.type = 34

Назначим Time Offset (Московское время)

 local_time.time_zone = +3

Укажем NTP сервер:

 local_time.ntp_server1 = 10.10.10.1

Назначим опции для авторизации Hot Desking (в нашем примере это логин и пароль SIP аккаунта)

 hotdesking.startup_username_enable = 1
 hotdesking.startup_password_enable = 1

Пример конфигурационного файла телефона, где в качестве имени файла выступает MAC адрес телефона

Может быть использован для всех вышеперечисленных моделей.

mac_address.cfg

mac_address.cfg

#!version:1.0.0.1

##File header "#!version:1.0.0.1" can not be edited or deleted, and must be placed in the first line.##

#######################################################################################
##                           Account1 Settings                                       ##                                                                          
#######################################################################################

#Enable or disable the account1, 0-Disabled (default), 1-Enabled;
account.1.enable = 

#Configure the label displayed on the LCD screen for account1.
account.1.label = 

#Enable or disable to use the alert info URL; 0-Enabled (default), 1-Disabled;
account.1.alert_info_url_enable =

#Configure the display name of account1.
account.1.display_name = 

#Configure the username and password for register authentication.
account.1.auth_name = 
account.1.password = 

#Configure the register user name.
account.1.user_name = 

#Configure the SIP server address.
account.1.sip_server_host = 10.10.10.1

#Specify the port for the SIP server. The default value is 5060.
account.1.sip_server_port = 5061

#Enable or disable to use the outbound proxy server; 0-Disabled (default), 1-Enabled; 
account.1.outbound_proxy_enable = 1

#Specify the IP address or domain name of the outbound proxy server.
account.1.outbound_host = 10.10.10.1

#Specify the server port, the default value is 5060.
account.1.outbound_port = 5061

#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV;
account.1.transport = 0

#Enable or disable the timer to periodically refresh the DNS-SRV query result; 0-Disabled (default), 1-Enabled;
#Require reboot;
account.1.srv_ttl_timer_enable =

#Specify the service for SIP used to DNS-SRV query; 0-muti-service mixed, 1-SIP+D2U, 2-SIP+D2T, 3-SIPS+D2T;
#Require reboot;
account.1.dns_srv_type =

#Configure the address of the backup outbound proxy server.
account.1.backup_outbound_host = 192.168.1.202

#Specify the port, the default value is 5060.
account.1.backup_outbound_port = 5061

#Configure the voice mail number of account1.
voice_mail.number.1 = *97

#Configure the proxy server to account1.
account.1.proxy_require = 

#Enable or disable the phone to only accept the message from the server; 0-Disabled (default), 1-Enabled;
account.1.sip_trust_ctrl = 

#Enable or disable the anonymous call feature; 0-Disabled (default), 1-Enabled;
account.1.anonymous_call = 

#Configure the on code and off code of the anonymous call feature.
account.1.anonymous_call_oncode = 
account.1.anonymous_call_offcode = 

#Enable or disable the reject anonymous call feature; 0-Disabled (default), 1-Enabled;
account.1.reject_anonymous_call = 

#Configure the on code and off code of the reject anonymous call feature.
account.1.anonymous_reject_oncode = 
account.1.anonymous_reject_offcode = 

#Configure the SIP port for account1, the default value is 5060. 
account.1.sip_listen_port = 

#Configure the register expiry time (in seconds), the default value is 3600.
account.1.expires = 

#Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled;
account.1.100rel_enable = 

#Enable or disable the resource reservation; 0-Disabled (default), 1-Enabled;
account.1.precondition = 

#Enable or disable the phone to subscribe the register status; 0-Disabled (default), 1-Enabled;
account.1.subscribe_register = 

#Enable or disable the phone to subscribe the message waiting indicator; 0-Disabled (default), 1-Enabled;
account.1.subscribe_mwi = 

#Configure MWI subscribe expiry time (in seconds). It ranges from 0 to 84600, the default value is 3600.
account.1.subscribe_mwi_expires = 

#Configure the type of SIP header(s) to carry the caller ID; 0-FROM (default), 1-PAI 2-PAI-FROM, 3-PRID-PAI-FROM, 4-PAI-RPID-FROM, 5-RPID-FROM;
account.1.cid_source = 

#Configure the type of SIP header(s) to display on the caller's LCD screen; 0-RPID-FROM, 1-Dialed Digits(default), 2-RFC4916
account.1.cp_source = 

#Enable or disable the session timer, 0-Disabled (default), 1-Enabled;  
account.1.session_timer.enable =      

#Configure the refresh session timer interval (in seconds). It ranges from 1 to 9999.
account.1.session_timer.expires =      

#Configure the session timer refresher; 0-Uac (default), 1-Uas;
account.1.session_timer.refresher = 

#Enable or disable the "user=phone"; 0-Disabled (default), 1-Enabled;
account.1.enable_user_equal_phone = 

#Specify whether to encrypt the SIP messages; 0-Disabled (default), 1-Forced, 2-Negotiated;
account.1.srtp_encryption = 

#Configure the RTP packet time. The valid values are 0 (Disabled), 10, 20 (default), 30, 40, 50, 60.
account.1.ptime = 

#Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA;
account.1.shared_line = 

#Configure BLA number for account1 and the subscribe period (in seconds). It ranges from 60 to 7200, the default value is 300.
account.1.bla_number = 
account.1.bla_subscribe_period = 

#Enable or disable call pickup using dialog-info SIP header; 0-Disabled (default), 1-Enabled;
account.1.dialoginfo_callpickup = 

#Configure the directed and group pickup codes for account 1, the settings on a per-account basis take precedence over the settings on the phone.
account.1.group_pickup_code = 
account.1.direct_pickup_code = 

#Enable or disable the auto answer feature; 0-Disabled (default), 1-Enabled;
account.1.auto_answer = 

#Enable or disable the phone to record the missed call; 0-Disabled, 1-Enabled (default);
account.1.missed_calllog = 

#Enable or disable the phone to subscribe to the voicemail through the message waiting indicator; 0-Disabled (default), 1-Enabled;
account.1.subscribe_mwi_to_vm = 

#Enable or disable the phone to send the MAC address and line number in the Register message; 0-Disabled (default), 1-Enabled;    
account.1.register_mac = 
account.1.register_line = 

#Configure the interval (in seconds) the phone retries to register when account1 fails to register. It ranges from 0 to 1800, the default value is 30.
account.1.reg_fail_retry_interval = 

#Configure the conference type; 0-Local (default), 2-Network Conference;
account.1.conf_type = 

#Configure the conference URI (a SIP URI, or use part of the SIP URI). For example, "conference@domain.com" or "conference".
account.1.conf_uri = 

#Configure the BLF list URI (a SIP URI, or use part of the SIP URI). For example, "2300_blflist@domain.com" or "2300_blflist".
account.1.blf.blf_list_uri = 

#Configure the pickup code of BLF List.
account.1.blf_list_code = 

#Configure the barge-in code.
account.1.blf_list_barge_in_code = 

#Enable or disable the phone to handle unmatched notify messages; 0-Disabled (default) , 1-Enabled ;
account.1.out_dialog_blf_enable = 

#Configure the BLF subscribe period (in seconds), the default value is 1800.
account.1.blf.subscribe_period = 

#Configure the ACD subscribe period (in seconds). It ranges from 120 to 3600 (default).
account.1.subscribe_acd_expires = 

#Configure the SIP server type; 0-Default (default), 2-BroadSoft, 4-Cosmocom;
account.1.sip_server_type = 

#Enable or disable the SIP signal encode; 0-Disabled (default), 1-Enabled (RC 4);
account.1.enable_signal_encode = 

#Configure the key for encoding.
account.1.signal_encode_key = 

#Configure the URI of the Music On Hold server. 
account.1.music_server_uri =

#Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO;
account.1.dtmf.type = 

#Configure the RFC2833 payload. It ranges from 96 to 255, the default value is 101.
account.1.dtmf.dtmf_payload = 

#Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event;
account.1.dtmf.info_type = 

#Enable or disable the phone to obtain the balance for account1; 0-Disabled (default), 1-Enabled;
account.1.balance_enable = 

#Configure the access URL of the balance server for account1.
account.1.balance_link_url =

#Enable or disable the phone to send the account log-off message first and then send account register message when rebooting the phone; 0-Disabled (default), 1-Enabled;
account.1.unregister_on_reboot =

#Enbale or diable the simplified header field feature; 0-Disabled, 1-Enabled (default);
account.1.compact_header_enable =

#Configure the type of Music on Hold; 0-Send the INVITE request to Music on Hold Server then hold the call; 1-Hold the call then send the INVITE request to Music on Hold Server;
#Require reboot;
account.1.music_on_hold_type = 

#########################################################################
##                     NAT Settings                                    ##
#########################################################################

#Enable or disable the NAT traversal; 0-Disabled (default), 1-STUN;
account.1.nat.nat_traversal = 

#Configure the STUN server address.
account.1.nat.stun_server = 

#Configure the STUN server port, the default value is 3478.
account.1.nat.stun_port = 

#Enable or disable the NAT keep-alive; 0-Disabled, 1-Enabled (default);
account.1.nat.udp_update_enable = 

#Specify the keep-alive interval (in seconds), the default value is 30.
account.1.nat.udp_update_time = 

#Enable or disable the NAT Rport; 0-Disabled (default), 1-Enabled;
account.1.nat.rport = 

#Configure the session timer (in seconds), the default value of T1, T2, T3 is 0.5, 4, 5.
account.1.advanced.timer_t1 = 
account.1.advanced.timer_t2 = 
account.1.advanced.timer_t4 = 

#Configure the timeout (in seconds) for DNS query, the value ranges from 1 to 9, the default value is 8.
account.1.dns_query_timeout =

#Assign a ringtone for account1. The system ring tones are: common (default), Ring1.wav, Ring2.wav,Ў­Ў­Ring8.wav.
#If you configure the custom ring tone (Family.wav) for the account, the value format is: Family.wav
#If you configure the system ring tone (Ring2.wav) for the account, the value format is: Ring2.wav
account.1.ringtone.ring_type = 

#Audio codecs for account1 (Y ranges from 1 to 13).
#Enable or disable the specified codec; 0-Disabled, 1-Enabled;
#account.1.codec.Y.enable = 
#The type of the specified codec.
#account.1.codec.Y.payload_type = 
#The priority of the specified codec. It's available when the codec is enabled.
#account.1.codec.Y.priority = 
#The payload of the specified codec.
#account.1.codec.Y.rtpmap = 

account.1.codec.1.enable = 1
account.1.codec.1.payload_type = PCMU
account.1.codec.1.priority = 1
account.1.codec.1.rtpmap = 0

account.1.codec.2.enable = 1
account.1.codec.2.payload_type = PCMA
account.1.codec.2.priority = 2 
account.1.codec.2.rtpmap = 8

account.1.codec.3.enable = 0 
account.1.codec.3.payload_type = G723_53
account.1.codec.3.priority =0
account.1.codec.3.rtpmap = 4

account.1.codec.4.enable = 0
account.1.codec.4.payload_type = G723_63
account.1.codec.4.priority = 0
account.1.codec.4.rtpmap = 4

account.1.codec.5.enable = 1
account.1.codec.5.payload_type = G729
account.1.codec.5.priority = 3
account.1.codec.5.rtpmap = 18

account.1.codec.6.enable = 1
account.1.codec.6.payload_type = G722
account.1.codec.6.priority = 4
account.1.codec.6.rtpmap = 9

account.1.codec.7.enable = 0
account.1.codec.7.payload_type = iLBC
account.1.codec.7.priority =  0
account.1.codec.7.rtpmap = 102

account.1.codec.8.enable = 0
account.1.codec.8.payload_type = G726-16
account.1.codec.8.priority = 0
account.1.codec.8.rtpmap = 112

account.1.codec.9.enable = 0
account.1.codec.9.payload_type = G726-24
account.1.codec.9.priority = 0
account.1.codec.9.rtpmap = 102

account.1.codec.10.enable = 0
account.1.codec.10.payload_type = G726-32 
account.1.codec.10.priority = 0 
account.1.codec.10.rtpmap = 99

account.1.codec.11.enable = 0
account.1.codec.11.payload_type = G726-40
account.1.codec.11.priority = 0
account.1.codec.11.rtpmap = 104

account.1.codec.12.enable = 0
account.1.codec.12.payload_type = iLBC_13_3
account.1.codec.12.priority = 0 
account.1.codec.12.rtpmap = 97

account.1.codec.13.enable = 0
account.1.codec.13.payload_type = iLBC_15_2
account.1.codec.13.priority = 0 
account.1.codec.13.rtpmap = 97 

#Configure the ACD reason code of Broadsoft.(The valus of Y must be consecutive numbers.)
#account.1.bw_acd_reason_code.Y = 500(lunch time)
account.1.bw_acd_reason_code.1 =
account.1.bw_acd_reason_code.2 =

#######################################################################################
##                        Call Forward                                               ##                                       
#######################################################################################

#Configure the call forward key mode; 0-Phone mode (default), 1-Custom mode.
features.fwd_mode =

#Enable or disable the always forward feature for account1; 0-Disabled (default), 1-Enabled;
account.1.always_fwd.enable = 

#Configure the destination number of the always forward for account1.
account.1.always_fwd.target = 

#Configure the always forward on code and off code for account1.
account.1.always_fwd.on_code = 
account.1.always_fwd.off_code =

#Enable or disable the busy forward feature for account1; 0-Disabled (default), 1-Enabled;
account.1.busy_fwd.enable = 
account.1.busy_fwd.target = 
account.1.busy_fwd.on_code = 
account.1.busy_fwd.off_code =

#Enable or disable the no answer forward feature for account1; 0-Disabled (default), 1-Enabled; 
#Configure the waiting ring times before forwarding. It ranges from 0 to 20, the default value is 2.
account.1.timeout_fwd.enable = 
account.1.timeout_fwd.target =
account.1.timeout_fwd.timeout = 
account.1.timeout_fwd.on_code =
account.1.timeout_fwd.off_code =

#Enable or disable the phone to record the last call forward type for account1; 0-Disabled (default), 1-Enabled;
account.1.last_type =

#######################################################################################
##                          DND                                                      ##                                       
#######################################################################################

#Configure the DND key mode; 0-Phone mode (default), 1-Custom mode.
features.dnd_mode = 

#Enable or disable the DND feautre for account1; 0-Disabled (default), 1-Enabled;
account.1.dnd.enable = 

#Configure the DND on code and off code for account1.
account.1.dnd.on_code = 
account.1.dnd.off_code =

#######################################################################################
##                        Account2 Settings                                          ##                                       
#######################################################################################

#Enable or disable the account2, 0-Disabled (default), 1-Enabled;
account.2.enable = 

#Configure the label displayed on the LCD screen for account2.
account.2.label = 

#Enable or disable to use the alert info URL; 0-Enabled (default), 1-Disabled;
account.2.alert_info_url_enable =

#Configure the display name of account2.
account.2.display_name =

#Configure the username and password for register authentication.
account.2.auth_name = 
account.2.password = 

#Configure the register user name.
account.2.user_name =  

#Configure the SIP server address.
account.2.sip_server_host = 
#Specify the port for the SIP server. The default value is 5060.
account.2.sip_server_port = 

#Enable or disable to use the outbound proxy server; 0-Disabled (default), 1-Enabled; 
account.2.outbound_proxy_enable = 

#Specify the IP address or domain name of the outbound proxy server.
account.2.outbound_host = 

#Specify the server port, the default value is 5060.
account.2.outbound_port =

#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV;
account.2.transport = 

#Enable or disable the timer to periodically refresh the DNS-SRV query result; 0-Disabled (default), 1-Enabled;
#Require reboot;
account.2.srv_ttl_timer_enable =

#Specify the service for SIP used to DNS-SRV query; 0-muti-service mixed, 1-SIP+D2U, 2-SIP+D2T, 3-SIPS+D2T;
#Require reboot;
account.2.dns_srv_type =

#Configure the address of the backup outbound proxy server.
account.2.backup_outbound_host = 

#Specify the port, the default value is 5060.
account.2.backup_outbound_port = 

#Configure the voice mail number of account2.
voice_mail.number.2 = 

#Configure the proxy server to account2.
account.2.proxy_require = 

#Enable or disable the phone to only accept the message from the server; 0-Disabled (default), 1-Enabled;
account.2.sip_trust_ctrl =  

#Enable or disable the anonymous call feature; 0-Disabled (default), 1-Enabled;
account.2.anonymous_call = 

#Configure the on code and off code of the anonymous call feature.
account.2.anonymous_call_oncode = 
account.2.anonymous_call_offcode = 

#Enable or disable the reject anonymous call feature; 0-Disabled (default), 1-Enabled;
account.2.reject_anonymous_call = 

#Configure the on code and off code of the reject anonymous call feature.
account.2.anonymous_reject_oncode = 
account.2.anonymous_reject_offcode = 

#Configure the SIP port for account2, the default value is 5060. 
account.2.sip_listen_port = 

#Configure the register expiry time (in seconds), the default value is 3600.
account.2.expires = 

#Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled;
account.2.100rel_enable = 

#Enable or disable the resource reservation; 0-Disabled (default), 1-Enabled;
account.2.precondition = 

#Enable or disable the phone to subscribe the register status; 0-Disabled (default), 1-Enabled;
account.2.subscribe_register = 

#Enable or disable the phone to subscribe the message waiting indicator; 0-Disabled (default), 1-Enabled;
account.2.subscribe_mwi = 

#Configure MWI subscribe expiry time (in seconds). It ranges from 0 to 84600, the default value is 3600.
account.2.subscribe_mwi_expires = 

#Configure the type of SIP header(s) to carry the caller ID; 0-FROM (default), 1-PAI 2-PAI-FROM, 3-PRID-PAI-FROM, 4-PAI-RPID-FROM, 5-RPID-FROM;
account.2.cid_source = 

#Configure the type of SIP header(s) to display on the caller's LCD screen; 0-RPID-FROM, 1-Dialed Digits (default), 2-RFC4916
account.2.cp_source = 

#Enable or disable the session timer, 0-Disabled (default), 1-Enabled;  
account.2.session_timer.enable =      

#Configure the refresh session timer interval (in seconds). It ranges from 1 to 9999.
account.2.session_timer.expires =      

#Configure the session timer refresher; 0-Uac (default), 1-Uas;
account.2.session_timer.refresher = 

#Enable or disable the "user=phone"; 0-Disabled (default), 1-Enabled;
account.2.enable_user_equal_phone = 

#Specify whether to encrypt the SIP messages; 0-Disabled (default), 1-Forced, 2-Negotiated;
account.2.srtp_encryption = 

#Configure the RTP packet time. The valid values are 0 (Disabled), 10, 20 (default), 30, 40, 50, 60.
account.2.ptime = 

#Assign account2 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA;
account.2.shared_line = 

#Configure BLA number for account2 and the subscribe period (in seconds). It ranges from 60 to 7200, the default value is 300.
account.2.bla_number = 
account.2.bla_subscribe_period = 

#Enable or disable call pickup using dialog-info SIP header; 0-Disabled (default), 1-Enabled;
account.2.dialoginfo_callpickup = 

#Configure the directed and group pickup codes for account 1, the settings on a per-account basis take precedence over the settings on the phone.
account.2.group_pickup_code = 
account.2.direct_pickup_code = 

#Enable or disable the auto answer feature; 0-Disabled (default), 1-Enabled;
account.2.auto_answer = 

#Enable or disable the phone to record the missed call; 0-Disabled, 1-Enabled (default);
account.2.missed_calllog = 

#Enable or disable the phone to subscribe to the voicemail through the message waiting indicator; 0-Disabled (default), 1-Enabled;
account.2.subscribe_mwi_to_vm = 

#Enable or disable the phone to send the MAC address and line number in the Register message; 0-Disabled (default), 1-Enabled;    
account.2.register_mac = 
account.2.register_line = 

#Configure the interval (in seconds) the phone retries to register when account2 fails to register. It ranges from 0 to 1800, the default value is 30.
account.2.reg_fail_retry_interval = 

#Configure the conference type; 0-Local (default), 2-Network Conference;
account.2.conf_type = 

#Configure the conference URI (a SIP URI, or use part of the SIP URI). For example, "conference@domain.com" or "conference".
account.2.conf_uri = 

#Configure the BLF list URI (a SIP URI, or use part of the SIP URI). For example, "2300_blflist@domain.com" or "2300_blflist".
account.2.blf.blf_list_uri = 

#Configure the pickup code of BLF List.
account.2.blf_list_code = 

#Configure the barge-in code.
account.2.blf_list_barge_in_code = 

#Enable or disable the phone to handle unmatched notify messages; 0-Disabled , 1-Enabled (default);
account.2.out_dialog_blf_enable = 

#Configure the BLF subscribe period (in seconds), the default value is 1800.
account.2.blf.subscribe_period = 

#Configure the ACD subscribe period (in seconds). It ranges from 120 to 3600 (default).
account.2.subscribe_acd_expires = 

#Configure the SIP server type; 0-Default (default), 2-BroadSoft, 4-Cosmocom;
account.2.sip_server_type = 

#Enable or disable the SIP signal encode; 0-Disabled (default), 1-Enabled (RC 4);
account.2.enable_signal_encode = 

#Configure the key for encoding.
account.2.signal_encode_key = 

#Configure the URI of the Music On Hold server. 
account.2.music_server_uri =

#Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO;
account.2.dtmf.type = 

#Configure the RFC2833 payload. It ranges from 96 to 255, the default value is 101.
account.2.dtmf.dtmf_payload = 

#Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event;
account.2.dtmf.info_type = 

#Enable or disable the phone to obtain the balance for account2; 0-Disabled (default), 1-Enabled;
account.2.balance_enable = 

#Configure the access URL of the balance server for account2.
account.2.balance_link_url =

#Enable or disable the phone to send the account log-off message first and then send account register message when rebooting the phone; 0-Disabled (default), 1-Enabled;
account.2.unregister_on_reboot =

#Enbale or diable the simplified header field feature; 0-Disabled, 1-Enabled (default);
account.2.compact_header_enable =

#Configure the type of Music on Hold; 0-Send the INVITE request to Music on Hold Server then hold the call; 1-Hold the call then send the INVITE request to Music on Hold Server;
#Require reboot;
account.2.music_on_hold_type = 

#########################################################################
##                     NAT Settings                                    ##
#########################################################################

#Enable or disable the NAT traversal; 0-Disabled (default), 1-STUN;
account.2.nat.nat_traversal = 

#Configure the STUN server address.
account.2.nat.stun_server = 

#Configure the STUN server port, the default value is 3478.
account.2.nat.stun_port = 

#Enable or disable the NAT keep-alive; 0-Disabled, 1-Enabled (default);
account.2.nat.udp_update_enable = 

#Specify the keep-alive interval (in seconds), the default value is 30.
account.2.nat.udp_update_time = 

#Enable or disable the NAT Rport; 0-Disabled (default), 1-Enabled;
account.2.nat.rport = 

#Configure the session timer (in seconds), the default value of T1, T2, T3 is 0.5, 4, 5.
account.2.advanced.timer_t1 = 
account.2.advanced.timer_t2 = 
account.2.advanced.timer_t4 = 

#Configure the timeout (in seconds) for DNS query, the value ranges from 1 to 9, the default value is 8.
account.2.dns_query_timeout =

#Assign a ringtone for account2. The system ring tones are: common (default), Ring1.wav, Ring2.wav,Ў­Ў­Ring8.wav.
#If you configure the custom ring tone (Family.wav) for the account, the value format is: Family.wav
#If you configure the system ring tone (Ring2.wav) for the account, the value format is: Ring2.wav
account.2.ringtone.ring_type =  

#Audio codecs for account2 (Y ranges from 1 to 13).
#Enable or disable the specified codec; 0-Disabled, 1-Enabled;
#account.2.codec.Y.enable = 
#The type of the specified codec.
#account.2.codec.Y.payload_type = 
#The priority of the specified codec. It's available when the codec is enabled.
#account.2.codec.Y.priority = 
#The payload of the specified codec.
#account.2.codec.Y.rtpmap = 

account.2.codec.1.enable = 1
account.2.codec.1.payload_type = PCMU
account.2.codec.1.priority = 1
account.2.codec.1.rtpmap = 0

account.2.codec.2.enable = 1
account.2.codec.2.payload_type = PCMA
account.2.codec.2.priority = 2 
account.2.codec.2.rtpmap = 8

account.2.codec.3.enable = 0 
account.2.codec.3.payload_type = G723_53
account.2.codec.3.priority =0
account.2.codec.3.rtpmap = 4

account.2.codec.4.enable = 0
account.2.codec.4.payload_type = G723_63
account.2.codec.4.priority = 0
account.2.codec.4.rtpmap = 4

account.2.codec.5.enable = 1
account.2.codec.5.payload_type = G729
account.2.codec.5.priority = 3
account.2.codec.5.rtpmap = 18

account.2.codec.6.enable = 1
account.2.codec.6.payload_type = G722
account.2.codec.6.priority = 4
account.2.codec.6.rtpmap = 9

account.2.codec.7.enable = 0
account.2.codec.7.payload_type = iBLC
account.2.codec.7.priority = 0 
account.2.codec.7.rtpmap = 102

account.2.codec.8.enable = 0
account.2.codec.8.payload_type = G726-16
account.2.codec.8.priority = 0
account.2.codec.8.rtpmap = 112

account.2.codec.9.enable = 0
account.2.codec.9.payload_type = G726-24
account.2.codec.9.priority = 0
account.2.codec.9.rtpmap = 102

account.2.codec.10.enable = 0
account.2.codec.10.payload_type = G726-32 
account.2.codec.10.priority = 0 
account.2.codec.10.rtpmap = 99

account.2.codec.11.enable = 0
account.2.codec.11.payload_type = G726-40
account.2.codec.11.priority = 0
account.2.codec.11.rtpmap = 104

account.2.codec.12.enable = 0
account.2.codec.12.payload_type = iLBC_13_3
account.2.codec.12.priority = 0 
account.2.codec.12.rtpmap = 97

account.2.codec.13.enable = 0
account.2.codec.13.payload_type = iLBC_15_2
account.2.codec.13.priority = 0 
account.2.codec.13.rtpmap = 97

#Configure the ACD reason code of Broadsoft.(The valus of Y must be consecutive numbers.)
#account.2.bw_acd_reason_code.Y = 500(lunch time)
account.2.bw_acd_reason_code.1 =
account.2.bw_acd_reason_code.2 =

#######################################################################################
##                        Call Forward                                               ##                                       
#######################################################################################

#Enable or disable the always forward feature for account2; 0-Disabled (default), 1-Enabled;
account.2.always_fwd.enable = 

#Configure the destination number of the always forward for account2.
account.2.always_fwd.target = 

#Configure the always forward on code and off code for account2.
account.2.always_fwd.on_code = 
account.2.always_fwd.off_code =

#Enable or disable the busy forward feature for account2; 0-Disabled (default), 1-Enabled;
account.2.busy_fwd.enable = 
account.2.busy_fwd.target = 
account.2.busy_fwd.on_code = 
account.2.busy_fwd.off_code =

#Enable or disable the no answer forward feature for account2; 0-Disabled (default), 1-Enabled; 
#Configure the waiting ring times before forwarding. It ranges from 0 to 20, the default value is 2.
account.2.timeout_fwd.enable = 
account.2.timeout_fwd.target =
account.2.timeout_fwd.timeout = 
account.2.timeout_fwd.on_code =
account.2.timeout_fwd.off_code =

#Enable or disable the phone to record the last call forward type for account2; 0-Disabled (default), 1-Enabled;
account.2.last_type =

#######################################################################################
##                          DND                                                      ##                                       
#######################################################################################

#Enable or disable the DND feature for account2; 0-Disabled (default), 1-Enabled;
account.2.dnd.enable = 

#Configure the DND on code and off code for account2.
account.2.dnd.on_code = 
account.2.dnd.off_code =

#######################################################################################
##                 Account3 Settings                                                 ##                                       
#######################################################################################

#Enable or disable the account3, 0-Disabled (default), 1-Enabled;
account.3.enable = 

#Configure the label displayed on the LCD screen for account3.
account.3.label =

#Enable or disable to use the alert info URL; 0-Enabled (default), 1-Disabled;
account.3.alert_info_url_enable =

#Configure the display name of account3.
account.3.display_name =

#Configure the username and password for register authentication.
account.3.auth_name = 
account.3.password =   

#Configure the register user name.
account.3.user_name =  

#Configure the SIP server address.
account.3.sip_server_host = 
#Specify the port for the SIP server. The default value is 5060.
account.3.sip_server_port = 

#Enable or disable to use the outbound proxy server; 0-Disabled (default), 1-Enabled; 
account.3.outbound_proxy_enable = 

#Specify the IP address or domain name of the outbound proxy server.
account.3.outbound_host = 

#Specify the server port, the default value is 5060.
account.3.outbound_port =

#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV;
account.3.transport = 

#Enable or disable the timer to periodically refresh the DNS-SRV query result; 0-Disabled (default), 1-Enabled;
#Require reboot;
account.3.srv_ttl_timer_enable =

#Specify the service for SIP used to DNS-SRV query; 0-muti-service mixed, 1-SIP+D2U, 2-SIP+D2T, 3-SIPS+D2T;
#Require reboot;
account.3.dns_srv_type =

#Configure the address of the backup outbound proxy server.
account.3.backup_outbound_host = 

#Specify the port, the default value is 5060.
account.3.backup_outbound_port = 

#Configure the voice mail number of account3.
voice_mail.number.3 = 

#Configure the proxy server to account3.
account.3.proxy_require = 

#Enable or disable the phone to only accept the message from the server; 0-Disabled (default), 1-Enabled;
account.3.sip_trust_ctrl =

#Enable or disable the anonymous call feature; 0-Disabled (default), 1-Enabled;
account.3.anonymous_call = 

#Configure the on code and off code of the anonymous call feature.
account.3.anonymous_call_oncode = 
account.3.anonymous_call_offcode = 

#Enable or disable the reject anonymous call feature; 0-Disabled (default), 1-Enabled;
account.3.reject_anonymous_call = 

#Configure the on code and off code of the reject anonymous call feature.
account.3.anonymous_reject_oncode = 
account.3.anonymous_reject_offcode = 

#Configure the SIP port for account3, the default value is 5060. 
account.3.sip_listen_port = 

#Configure the register expiry time (in seconds), the default value is 3600.
account.3.expires = 

#Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled;
account.3.100rel_enable = 

#Enable or disable the resource reservation; 0-Disabled (default), 1-Enabled;
account.3.precondition = 

#Enable or disable the phone to subscribe the register status; 0-Disabled (default), 1-Enabled;
account.3.subscribe_register = 

#Enable or disable the phone to subscribe the message waiting indicator; 0-Disabled (default), 1-Enabled;
account.3.subscribe_mwi = 

#Configure MWI subscribe expiry time (in seconds). It ranges from 0 to 84600, the default value is 3600.
account.3.subscribe_mwi_expires = 

#Configure the type of SIP header(s) to carry the caller ID; 0-FROM (default), 1-PAI 2-PAI-FROM, 3-PRID-PAI-FROM, 4-PAI-RPID-FROM, 5-RPID-FROM;
account.3.cid_source = 

#Configure the type of SIP header(s) to display on the caller's LCD screen; 0-RPID-FROM, 1-Dialed Digits (default), 2-RFC4916
account.3.cp_source = 

#Enable or disable the session timer, 0-Disabled (default), 1-Enabled;  
account.3.session_timer.enable =      

#Configure the refresh session timer interval (in seconds). It ranges from 1 to 9999.
account.3.session_timer.expires =      

#Configure the session timer refresher; 0-Uac (default), 1-Uas;
account.3.session_timer.refresher = 

#Enable or disable the "user=phone"; 0-Disabled (default), 1-Enabled;
account.3.enable_user_equal_phone = 

#Specify whether to encrypt the SIP messages; 0-Disabled (default), 1-Forced, 2-Negotiated;
account.3.srtp_encryption = 

#Configure the RTP packet time. The valid values are 0 (Disabled), 10, 20 (default), 30, 40, 50, 60.
account.3.ptime = 

#Assign account3 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA;
account.3.shared_line = 

#Configure BLA number for account3 and the subscribe period (in seconds). It ranges from 60 to 7200, the default value is 300.
account.3.bla_number = 
account.3.bla_subscribe_period = 

#Enable or disable call pickup using dialog-info SIP header; 0-Disabled (default), 1-Enabled;
account.3.dialoginfo_callpickup = 

#Configure the directed and group pickup codes for account 1, the settings on a per-account basis take precedence over the settings on the phone.
account.3.group_pickup_code = 
account.3.direct_pickup_code = 

#Enable or disable the auto answer feature; 0-Disabled (default), 1-Enabled;
account.3.auto_answer = 

#Enable or disable the phone to record the missed call; 0-Disabled, 1-Enabled (default);
account.3.missed_calllog = 

#Enable or disable the phone to subscribe to the voicemail through the message waiting indicator; 0-Disabled (default), 1-Enabled;
account.3.subscribe_mwi_to_vm = 

#Enable or disable the phone to send the MAC address and line number in the Register message; 0-Disabled (default), 1-Enabled;    
account.3.register_mac = 
account.3.register_line = 

#Configure the interval (in seconds) the phone retries to register when account3 fails to register. It ranges from 0 to 1800, the default value is 30.
account.3.reg_fail_retry_interval = 

#Configure the conference type; 0-Local (default), 2-Network Conference;
account.3.conf_type = 

#Configure the conference URI (a SIP URI, or use part of the SIP URI). For example, "conference@domain.com" or "conference".
account.3.conf_uri = 

#Configure the BLF list URI (a SIP URI, or use part of the SIP URI). For example, "2300_blflist@domain.com" or "2300_blflist".
account.3.blf.blf_list_uri = 

#Configure the pickup code of BLF List.
account.3.blf_list_code = 

#Configure the barge-in code.
account.3.blf_list_barge_in_code = 

#Enable or disable the phone to handle unmatched notify messages; 0-Disabled (default) , 1-Enabled ;
account.3.out_dialog_blf_enable = 

#Configure the BLF subscribe period (in seconds), the default value is 1800.
account.3.blf.subscribe_period = 

#Configure the ACD subscribe period (in seconds). It ranges from 120 to 3600 (default).
account.3.subscribe_acd_expires = 

#Configure the SIP server type; 0-Default (default), 2-BroadSoft, 4-Cosmocom;
account.3.sip_server_type = 

#Enable or disable the SIP signal encode; 0-Disabled (default), 1-Enabled (RC 4);
account.3.enable_signal_encode = 

#Configure the key for encoding.
account.3.signal_encode_key = 

#Configure the URI of the Music On Hold server. 
account.3.music_server_uri =

#Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO;
account.3.dtmf.type = 

#Configure the RFC2833 payload. It ranges from 96 to 255, the default value is 101.
account.3.dtmf.dtmf_payload = 

#Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event;
account.3.dtmf.info_type = 

#Enable or disable the phone to obtain the balance for account3; 0-Disabled (default), 1-Enabled;
account.3.balance_enable = 

#Configure the access URL of the balance server for account3.
account.3.balance_link_url =

#Enable or disable the phone to send the account log-off message first and then send account register message when rebooting the phone; 0-Disabled (default), 1-Enabled;
account.3.unregister_on_reboot =

#Enbale or diable the simplified header field feature; 0-Disabled, 1-Enabled (default);
account.3.compact_header_enable =

#Configure the type of Music on Hold; 0-Send the INVITE request to Music on Hold Server then hold the call; 1-Hold the call then send the INVITE request to Music on Hold Server;
#Require reboot;
account.3.music_on_hold_type = 

#########################################################################
##                     NAT Settings                                    ##
#########################################################################

#Enable or disable the NAT traversal; 0-Disabled (default), 1-STUN;
account.3.nat.nat_traversal = 

#Configure the STUN server address.
account.3.nat.stun_server = 

#Configure the STUN server port, the default value is 3478.
account.3.nat.stun_port = 

#Enable or disable the NAT keep-alive; 0-Disabled, 1-Enabled (default);
account.3.nat.udp_update_enable = 

#Specify the keep-alive interval (in seconds), the default value is 30.
account.3.nat.udp_update_time = 

#Enable or disable the NAT Rport; 0-Disabled (default), 1-Enabled;
account.3.nat.rport = 

#Configure the session timer (in seconds), the default value of T1, T2, T3 is 0.5, 4, 5.
account.3.advanced.timer_t1 = 
account.3.advanced.timer_t2 = 
account.3.advanced.timer_t4 = 

#Configure the timeout (in seconds) for DNS query, the value ranges from 1 to 9, the default value is 8.
account.3.dns_query_timeout =

#Assign a ringtone for account3. The system ring tones are: common (default), Ring1.wav, Ring2.wav,Ў­Ў­Ring8.wav.
#If you configure the custom ring tone (Family.wav) for the account, the value format is: Family.wav
#If you configure the system ring tone (Ring2.wav) for the account, the value format is: Ring2.wav
account.3.ringtone.ring_type = 

#Audio codecs for account3 (Y ranges from 1 to 13).
#Enable or disable the specified codec; 0-Disabled, 1-Enabled;
#account.3.codec.Y.enable = 
#The type of the specified codec.
#account.3.codec.Y.payload_type = 
#The priority of the specified codec. It's available when the codec is enabled.
#account.3.codec.Y.priority = 
#The payload of the specified codec.
#account.3.codec.Y.rtpmap = 

account.3.codec.1.enable = 1
account.3.codec.1.payload_type = PCMU
account.3.codec.1.priority = 1
account.3.codec.1.rtpmap = 0

account.3.codec.2.enable = 1
account.3.codec.2.payload_type = PCMA
account.3.codec.2.priority = 2 
account.3.codec.2.rtpmap = 8

account.3.codec.3.enable = 0 
account.3.codec.3.payload_type = G723_53
account.3.codec.3.priority =0
account.3.codec.3.rtpmap = 4

account.3.codec.4.enable = 0
account.3.codec.4.payload_type = G723_63
account.3.codec.4.priority = 0
account.3.codec.4.rtpmap = 4

account.3.codec.5.enable = 1
account.3.codec.5.payload_type = G729
account.3.codec.5.priority = 3
account.3.codec.5.rtpmap = 18

account.3.codec.6.enable = 1
account.3.codec.6.payload_type = G722
account.3.codec.6.priority = 4
account.3.codec.6.rtpmap = 9

account.3.codec.7.enable = 0
account.3.codec.7.payload_type = iBLC
account.3.codec.7.priority = 0 
account.3.codec.7.rtpmap = 102

account.3.codec.8.enable = 0
account.3.codec.8.payload_type = G726-16
account.3.codec.8.priority = 0
account.3.codec.8.rtpmap = 112

account.3.codec.9.enable = 0
account.3.codec.9.payload_type = G726-24
account.3.codec.9.priority = 0
account.3.codec.9.rtpmap = 102

account.3.codec.10.enable = 0
account.3.codec.10.payload_type = G726-32 
account.3.codec.10.priority = 0 
account.3.codec.10.rtpmap = 99

account.3.codec.11.enable = 0
account.3.codec.11.payload_type = G726-40
account.3.codec.11.priority = 0
account.3.codec.11.rtpmap = 104

account.3.codec.12.enable = 0
account.3.codec.12.payload_type = iLBC_13_3
account.3.codec.12.priority = 0 
account.3.codec.12.rtpmap = 97

account.3.codec.13.enable = 0
account.3.codec.13.payload_type = iLBC_15_2
account.3.codec.13.priority = 0 
account.3.codec.13.rtpmap = 97      

#Configure the ACD reason code of Broadsoft.(The valus of Y must be consecutive numbers.)
#account.3.bw_acd_reason_code.Y = 500(lunch time)
account.3.bw_acd_reason_code.1 =
account.3.bw_acd_reason_code.2 =

#######################################################################################
##                        Call Forward                                               ##                                       
#######################################################################################

#Enable or disable the always forward feature for account3; 0-Disabled (default), 1-Enabled;
account.3.always_fwd.enable = 

#Configure the destination number of the always forward for account3.
account.3.always_fwd.target = 

#Configure the always forward on code and off code for account3.
account.3.always_fwd.on_code = 
account.3.always_fwd.off_code =

#Enable or disable the busy forward feature for account3; 0-Disabled (default), 1-Enabled;
account.3.busy_fwd.enable = 
account.3.busy_fwd.target = 
account.3.busy_fwd.on_code = 
account.3.busy_fwd.off_code =

#Enable or disable the no answer forward feature for account3; 0-Disabled (default), 1-Enabled; 
#Configure the waiting ring times before forwarding. It ranges from 0 to 20, the default value is 2.
account.3.timeout_fwd.enable = 
account.3.timeout_fwd.target =
account.3.timeout_fwd.timeout = 
account.3.timeout_fwd.on_code =
account.3.timeout_fwd.off_code =

#Enable or disable the phone to record the last call forward type for account3; 0-Disabled (default), 1-Enabled;
account.3.last_type =

#######################################################################################
##                          DND                                                      ##                                       
#######################################################################################

#Enable or disable the DND feautre for account3; 0-Disabled (default), 1-Enabled;
account.3.dnd.enable = 

#Configure the DND on code and off code for account3.
account.3.dnd.on_code = 
account.3.dnd.off_code =

#######################################################################################
##              Account4 Settings (For T28P only)                                    ##                                       
#######################################################################################

#Enable or disable the account4, 0-Disabled (default), 1-Enabled;
account.4.enable = 

#Configure the label displayed on the LCD screen for account4.
account.4.label = 

#Enable or disable to use the alert info URL; 0-Enabled (default), 1-Disabled;
account.4.alert_info_url_enable =

#Configure the display name of account4.
account.4.display_name =

#Configure the username and password for register authentication.
account.4.auth_name = 
account.4.password =   

#Configure the register user name.
account.4.user_name =  

#Configure the SIP server address.
account.4.sip_server_host = 
#Specify the port for the SIP server. The default value is 5060.
account.4.sip_server_port = 

#Enable or disable to use the outbound proxy server; 0-Disabled (default), 1-Enabled; 
account.4.outbound_proxy_enable = 

#Specify the IP address or domain name of the outbound proxy server.
account.4.outbound_host = 

#Specify the server port, the default value is 5060.
account.4.outbound_port =

#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV;
account.4.transport = 

#Enable or disable the timer to periodically refresh the DNS-SRV query result; 0-Disabled (default), 1-Enabled;
#Require reboot;
account.4.srv_ttl_timer_enable =

#Specify the service for SIP used to DNS-SRV query; 0-muti-service mixed, 1-SIP+D2U, 2-SIP+D2T, 3-SIPS+D2T;
#Require reboot;
account.4.dns_srv_type =

#Configure the address of the backup outbound proxy server.
account.4.backup_outbound_host = 

#Specify the port, the default value is 5060.
account.4.backup_outbound_port = 

#Configure the voice mail number of account4.
voice_mail.number.4 = 

#Configure the proxy server to account4.
account.4.proxy_require = 

#Enable or disable the phone to only accept the message from the server; 0-Disabled (default), 1-Enabled;
account.4.sip_trust_ctrl =

#Enable or disable the anonymous call feature; 0-Disabled (default), 1-Enabled;
account.4.anonymous_call = 

#Configure the on code and off code of the anonymous call feature.
account.4.anonymous_call_oncode = 
account.4.anonymous_call_offcode = 

#Enable or disable the reject anonymous call feature; 0-Disabled (default), 1-Enabled;
account.4.reject_anonymous_call = 

#Configure the on code and off code of the reject anonymous call feature.
account.4.anonymous_reject_oncode = 
account.4.anonymous_reject_offcode = 

#Configure the SIP port for account4, the default value is 5060. 
account.4.sip_listen_port = 

#Configure the register expiry time (in seconds), the default value is 3600.
account.4.expires = 

#Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled;
account.4.100rel_enable = 

#Enable or disable the resource reservation; 0-Disabled (default), 1-Enabled;
account.4.precondition = 

#Enable or disable the phone to subscribe the register status; 0-Disabled (default), 1-Enabled;
account.4.subscribe_register = 

#Enable or disable the phone to subscribe the message waiting indicator; 0-Disabled (default), 1-Enabled;
account.4.subscribe_mwi = 

#Configure MWI subscribe expiry time (in seconds). It ranges from 0 to 84600, the default value is 3600.
account.4.subscribe_mwi_expires = 

#Configure the type of SIP header(s) to carry the caller ID; 0-FROM (default), 1-PAI 2-PAI-FROM, 3-PRID-PAI-FROM, 4-PAI-RPID-FROM, 5-RPID-FROM;
account.4.cid_source = 

#Configure the type of SIP header(s) to display on the caller's LCD screen; 0-RPID-FROM, 1-Dialed Digits(default), 2-RFC4916
account.4.cp_source = 

#Enable or disable the session timer, 0-Disabled (default), 1-Enabled;  
account.4.session_timer.enable =      

#Configure the refresh session timer interval (in seconds). It ranges from 1 to 9999.
account.4.session_timer.expires =      

#Configure the session timer refresher; 0-Uac (default), 1-Uas;
account.4.session_timer.refresher = 

#Enable or disable the "user=phone"; 0-Disabled (default), 1-Enabled;
account.4.enable_user_equal_phone = 

#Specify whether to encrypt the SIP messages; 0-Disabled (default), 1-Forced, 2-Negotiated;
account.4.srtp_encryption = 

#Configure the RTP packet time. The valid values are 0 (Disabled), 10, 20 (default), 30, 40, 50, 60.
account.4.ptime = 

#Assign account4 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA;
account.4.shared_line = 

#Configure BLA number for account4 and the subscribe period (in seconds). It ranges from 60 to 7200, the default value is 300.
account.4.bla_number = 
account.4.bla_subscribe_period = 

#Enable or disable call pickup using dialog-info SIP header; 0-Disabled (default), 1-Enabled;
account.4.dialoginfo_callpickup = 

#Configure the directed and group pickup codes for account 1, the settings on a per-account basis take precedence over the settings on the phone.
account.4.group_pickup_code = 
account.4.direct_pickup_code = 

#Enable or disable the auto answer feature; 0-Disabled (default), 1-Enabled;
account.4.auto_answer = 

#Enable or disable the phone to record the missed call; 0-Disabled, 1-Enabled (default);
account.4.missed_calllog = 

#Enable or disable the phone to subscribe to the voicemail through the message waiting indicator; 0-Disabled (default), 1-Enabled;
account.4.subscribe_mwi_to_vm = 

#Enable or disable the phone to send the MAC address and line number in the Register message; 0-Disabled (default), 1-Enabled;    
account.4.register_mac = 
account.4.register_line = 

#Configure the interval (in seconds) the phone retries to register when account4 fails to register. It ranges from 0 to 1800, the default value is 30.
account.4.reg_fail_retry_interval = 

#Configure the conference type; 0-Local (default), 2-Network Conference;
account.4.conf_type = 

#Configure the conference URI (a SIP URI, or use part of the SIP URI). For example, "conference@domain.com" or "conference".
account.4.conf_uri = 

#Configure the BLF list URI (a SIP URI, or use part of the SIP URI). For example, "2300_blflist@domain.com" or "2300_blflist".
account.4.blf.blf_list_uri = 

#Configure the pickup code of BLF List.
account.4.blf_list_code = 

#Configure the barge-in code.
account.4.blf_list_barge_in_code = 

#Enable or disable the phone to handle unmatched notify messages; 0-Disabled (default) , 1-Enabled ;
account.4.out_dialog_blf_enable = 

#Configure the BLF subscribe period (in seconds), the default value is 1800.
account.4.blf.subscribe_period = 

#Configure the ACD subscribe period (in seconds). It ranges from 120 to 3600 (default).
account.4.subscribe_acd_expires = 

#Configure the SIP server type; 0-Default (default), 2-BroadSoft, 4-Cosmocom;
account.4.sip_server_type = 

#Enable or disable the SIP signal encode; 0-Disabled (default), 1-Enabled (RC 4);
account.4.enable_signal_encode = 

#Configure the key for encoding.
account.4.signal_encode_key = 

#Configure the URI of the Music On Hold server. 
account.4.music_server_uri =

#Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO;
account.4.dtmf.type = 

#Configure the RFC2833 payload. It ranges from 96 to 255, the default value is 101.
account.4.dtmf.dtmf_payload = 

#Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event;
account.4.dtmf.info_type = 

#Enable or disable the phone to obtain the balance for account4; 0-Disabled (default), 1-Enabled;
account.4.balance_enable = 

#Configure the access URL of the balance server for account4.
account.4.balance_link_url =

#Enable or disable the phone to send the account log-off message first and then send account register message when rebooting the phone; 0-Disabled (default), 1-Enabled;
account.4.unregister_on_reboot =

#Enbale or diable the simplified header field feature; 0-Disabled, 1-Enabled (default);
account.4.compact_header_enable =

#Configure the type of Music on Hold; 0-Send the INVITE request to Music on Hold Server then hold the call; 1-Hold the call then send the INVITE request to Music on Hold Server;
#Require reboot;
account.4.music_on_hold_type = 

#########################################################################
##                     NAT Settings                                    ##
#########################################################################

#Enable or disable the NAT traversal; 0-Disabled (default), 1-STUN;
account.4.nat.nat_traversal = 

#Configure the STUN server address.
account.4.nat.stun_server = 

#Configure the STUN server port, the default value is 3478.
account.4.nat.stun_port = 

#Enable or disable the NAT keep-alive; 0-Disabled, 1-Enabled (default);
account.4.nat.udp_update_enable = 

#Specify the keep-alive interval (in seconds), the default value is 30.
account.4.nat.udp_update_time = 

#Enable or disable the NAT Rport; 0-Disabled (default), 1-Enabled;
account.4.nat.rport = 

#Configure the session timer (in seconds), the default value of T1, T2, T3 is 0.5, 4, 5.
account.4.advanced.timer_t1 = 
account.4.advanced.timer_t2 = 
account.4.advanced.timer_t4 = 

#Configure the timeout (in seconds) for DNS query, the value ranges from 1 to 9, the default value is 8.
account.4.dns_query_timeout =

#Assign a ringtone for account4. The system ring tones are: common (default), Ring1.wav, Ring2.wav,Ў­Ў­Ring8.wav.
#If you configure the custom ring tone (Family.wav) for the account, the value format is: Family.wav
#If you configure the system ring tone (Ring2.wav) for the account, the value format is: Ring2.wav
account.4.ringtone.ring_type = 

#Audio codecs for account4 (Y ranges from 1 to 13).
#Enable or disable the specified codec; 0-Disabled, 1-Enabled;
#account.4.codec.Y.enable = 
#The type of the specified codec.
#account.4.codec.Y.payload_type = 
#The priority of the specified codec. It's available when the codec is enabled.
#account.4.codec.Y.priority = 
#The payload of the specified codec.
#account.4.codec.Y.rtpmap = 

account.4.codec.1.enable = 1
account.4.codec.1.payload_type = PCMU
account.4.codec.1.priority = 1
account.4.codec.1.rtpmap = 0

account.4.codec.2.enable = 1
account.4.codec.2.payload_type = PCMA
account.4.codec.2.priority = 2 
account.4.codec.2.rtpmap = 8

account.4.codec.3.enable = 0 
account.4.codec.3.payload_type = G723_53
account.4.codec.3.priority =0
account.4.codec.3.rtpmap = 4

account.4.codec.4.enable = 0
account.4.codec.4.payload_type = G723_63
account.4.codec.4.priority = 0
account.4.codec.4.rtpmap = 4

account.4.codec.5.enable = 1
account.4.codec.5.payload_type = G729
account.4.codec.5.priority = 3
account.4.codec.5.rtpmap = 18

account.4.codec.6.enable = 1
account.4.codec.6.payload_type = G722
account.4.codec.6.priority = 4
account.4.codec.6.rtpmap = 9

account.4.codec.7.enable = 0
account.4.codec.7.payload_type = iBLC
account.4.codec.7.priority = 0 
account.4.codec.7.rtpmap = 102

account.4.codec.8.enable = 0
account.4.codec.8.payload_type = G726-16
account.4.codec.8.priority = 0
account.4.codec.8.rtpmap = 112

account.4.codec.9.enable = 0
account.4.codec.9.payload_type = G726-24
account.4.codec.9.priority = 0
account.4.codec.9.rtpmap = 102

account.4.codec.10.enable = 0
account.4.codec.10.payload_type = G726-32 
account.4.codec.10.priority = 0 
account.4.codec.10.rtpmap = 99

account.4.codec.11.enable = 0
account.4.codec.11.payload_type = G726-40
account.4.codec.11.priority = 0
account.4.codec.11.rtpmap = 104

account.4.codec.12.enable = 0
account.4.codec.12.payload_type = iLBC_13_3
account.4.codec.12.priority = 0 
account.4.codec.12.rtpmap = 97

account.4.codec.13.enable = 0
account.4.codec.13.payload_type = iLBC_15_2
account.4.codec.13.priority = 0 
account.4.codec.13.rtpmap = 97          

#Configure the ACD reason code of Broadsoft.(The valus of Y must be consecutive numbers.)
#account.4.bw_acd_reason_code.Y = 500(lunch time)
account.4.bw_acd_reason_code.1 =
account.4.bw_acd_reason_code.2 =

#######################################################################################
##                        Call Forward                                               ##                                       
#######################################################################################

#Enable or disable the always forward feature for account4; 0-Disabled (default), 1-Enabled;
account.4.always_fwd.enable = 

#Configure the destination number of the always forward for account4.
account.4.always_fwd.target = 

#Configure the always forward on code and off code for account4.
account.4.always_fwd.on_code = 
account.4.always_fwd.off_code =

#Enable or disable the busy forward feature for account4; 0-Disabled (default), 1-Enabled;
account.4.busy_fwd.enable = 
account.4.busy_fwd.target = 
account.4.busy_fwd.on_code = 
account.4.busy_fwd.off_code =

#Enable or disable the no answer forward feature for account4; 0-Disabled (default), 1-Enabled; 
#Configure the waiting ring times before forwarding. It ranges from 0 to 20, the default value is 2.
account.4.timeout_fwd.enable = 
account.4.timeout_fwd.target =
account.4.timeout_fwd.timeout = 
account.4.timeout_fwd.on_code =
account.4.timeout_fwd.off_code =

#Enable or disable the phone to record the last call forward type for account4; 0-Disabled (default), 1-Enabled;
account.4.last_type =

#######################################################################################
##                          DND                                                      ##                                       
#######################################################################################

#Enable or disable the DND feautre for account4; 0-Disabled (default), 1-Enabled;
account.4.dnd.enable = 

#Configure the DND on code and off code for account4.
account.4.dnd.on_code = 
account.4.dnd.off_code =

#######################################################################################
##               Account5 Settings (For T28P only)                                   ##                                        
#######################################################################################

#Enable or disable the account5, 0-Disabled (default), 1-Enabled;
account.5.enable = 

#Configure the label displayed on the LCD screen for account5.
account.5.label = 

#Enable or disable to use the alert info URL; 0-Enabled (default), 1-Disabled;
account.5.alert_info_url_enable =

#Configure the display name of account5.
account.5.display_name =

#Configure the username and password for register authentication.
account.5.auth_name = 
account.5.password =   

#Configure the register user name.
account.5.user_name =  

#Configure the SIP server address.
account.5.sip_server_host = 
#Specify the port for the SIP server. The default value is 5060.
account.5.sip_server_port = 

#Enable or disable to use the outbound proxy server; 0-Disabled (default), 1-Enabled; 
account.5.outbound_proxy_enable = 

#Specify the IP address or domain name of the outbound proxy server.
account.5.outbound_host = 

#Specify the server port, the default value is 5060.
account.5.outbound_port =

#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV;
account.5.transport = 

#Enable or disable the timer to periodically refresh the DNS-SRV query result; 0-Disabled (default), 1-Enabled;
#Require reboot;
account.5.srv_ttl_timer_enable =

#Specify the service for SIP used to DNS-SRV query; 0-muti-service mixed, 1-SIP+D2U, 2-SIP+D2T, 3-SIPS+D2T;
#Require reboot;
account.5.dns_srv_type =

#Configure the address of the backup outbound proxy server.
account.5.backup_outbound_host = 

#Specify the port, the default value is 5060.
account.5.backup_outbound_port = 

#Configure the voice mail number of account5.
voice_mail.number.5 = 

#Configure the proxy server to account5.
account.5.proxy_require = 

#Enable or disable the phone to only accept the message from the server; 0-Disabled (default), 1-Enabled;
account.5.sip_trust_ctrl =

#Enable or disable the anonymous call feature; 0-Disabled (default), 1-Enabled;
account.5.anonymous_call = 

#Configure the on code and off code of the anonymous call feature.
account.5.anonymous_call_oncode = 
account.5.anonymous_call_offcode = 

#Enable or disable the reject anonymous call feature; 0-Disabled (default), 1-Enabled;
account.5.reject_anonymous_call = 

#Configure the on code and off code of the reject anonymous call feature.
account.5.anonymous_reject_oncode = 
account.5.anonymous_reject_offcode = 

#Configure the SIP port for account5, the default value is 5060. 
account.5.sip_listen_port = 

#Configure the register expiry time (in seconds), the default value is 3600.
account.5.expires = 

#Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled;
account.5.100rel_enable = 

#Enable or disable the resource reservation; 0-Disabled (default), 1-Enabled;
account.5.precondition = 

#Enable or disable the phone to subscribe the register status; 0-Disabled (default), 1-Enabled;
account.5.subscribe_register = 

#Enable or disable the phone to subscribe the message waiting indicator; 0-Disabled (default), 1-Enabled;
account.5.subscribe_mwi = 

#Configure MWI subscribe expiry time (in seconds). It ranges from 0 to 84600, the default value is 3600.
account.5.subscribe_mwi_expires = 

#Configure the type of SIP header(s) to carry the caller ID; 0-FROM (default), 1-PAI 2-PAI-FROM, 3-PRID-PAI-FROM, 4-PAI-RPID-FROM, 5-RPID-FROM;
account.5.cid_source = 

#Configure the type of SIP header(s) to display on the caller's LCD screen; 0-RPID-FROM, 1-Dialed Digits (default), 2-RFC4916
account.5.cp_source = 

#Enable or disable the session timer, 0-Disabled (default), 1-Enabled;  
account.5.session_timer.enable =      

#Configure the refresh session timer interval (in seconds). It ranges from 1 to 9999.
account.5.session_timer.expires =      

#Configure the session timer refresher; 0-Uac (default), 1-Uas;
account.5.session_timer.refresher = 

#Enable or disable the "user=phone"; 0-Disabled (default), 1-Enabled;
account.5.enable_user_equal_phone = 

#Specify whether to encrypt the SIP messages; 0-Disabled (default), 1-Forced, 2-Negotiated;
account.5.srtp_encryption = 

#Configure the RTP packet time. The valid values are 0 (Disabled), 10, 20 (default), 30, 40, 50, 60.
account.5.ptime = 

#Assign account5 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA;
account.5.shared_line = 

#Configure BLA number for account5 and the subscribe period (in seconds). It ranges from 60 to 7200, the default value is 300.
account.5.bla_number = 
account.5.bla_subscribe_period = 

#Enable or disable call pickup using dialog-info SIP header; 0-Disabled (default), 1-Enabled;
account.5.dialoginfo_callpickup = 

#Configure the directed and group pickup codes for account 1, the settings on a per-account basis take precedence over the settings on the phone.
account.5.group_pickup_code = 
account.5.direct_pickup_code = 

#Enable or disable the auto answer feature; 0-Disabled (default), 1-Enabled;
account.5.auto_answer = 

#Enable or disable the phone to record the missed call; 0-Disabled, 1-Enabled (default);
account.5.missed_calllog = 

#Enable or disable the phone to subscribe to the voicemail through the message waiting indicator; 0-Disabled (default), 1-Enabled;
account.5.subscribe_mwi_to_vm = 

#Enable or disable the phone to send the MAC address and line number in the Register message; 0-Disabled (default), 1-Enabled;    
account.5.register_mac = 
account.5.register_line = 

#Configure the interval (in seconds) the phone retries to register when account5 fails to register. It ranges from 0 to 1800, the default value is 30.
account.5.reg_fail_retry_interval = 

#Configure the conference type; 0-Local (default), 2-Network Conference;
account.5.conf_type = 

#Configure the conference URI (a SIP URI, or use part of the SIP URI). For example, "conference@domain.com" or "conference".
account.5.conf_uri = 

#Configure the BLF list URI (a SIP URI, or use part of the SIP URI). For example, "2300_blflist@domain.com" or "2300_blflist".
account.5.blf.blf_list_uri = 

#Configure the pickup code of BLF List.
account.5.blf_list_code = 

#Configure the barge-in code.
account.5.blf_list_barge_in_code = 

#Enable or disable the phone to handle unmatched notify messages; 0-Disabled (default) , 1-Enabled ;
account.5.out_dialog_blf_enable = 

#Configure the BLF subscribe period (in seconds), the default value is 1800.
account.5.blf.subscribe_period = 

#Configure the ACD subscribe period (in seconds). It ranges from 120 to 3600 (default).
account.5.subscribe_acd_expires = 

#Configure the SIP server type; 0-Default (default), 2-BroadSoft, 4-Cosmocom;
account.5.sip_server_type = 

#Enable or disable the SIP signal encode; 0-Disabled (default), 1-Enabled (RC 4);
account.5.enable_signal_encode = 

#Configure the key for encoding.
account.5.signal_encode_key = 

#Configure the URI of the Music On Hold server. 
account.5.music_server_uri =

#Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO;
account.5.dtmf.type = 

#Configure the RFC2833 payload. It ranges from 96 to 255, the default value is 101.
account.5.dtmf.dtmf_payload = 

#Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event;
account.5.dtmf.info_type = 

#Enable or disable the phone to obtain the balance for account5; 0-Disabled (default), 1-Enabled;
account.5.balance_enable = 

#Configure the access URL of the balance server for account5.
account.5.balance_link_url =

#Enable or disable the phone to send the account log-off message first and then send account register message when rebooting the phone; 0-Disabled (default), 1-Enabled;
account.5.unregister_on_reboot =

#Enbale or diable the simplified header field feature; 0-Disabled, 1-Enabled (default);
account.5.compact_header_enable =

#Configure the type of Music on Hold; 0-Send the INVITE request to Music on Hold Server then hold the call; 1-Hold the call then send the INVITE request to Music on Hold Server;
#Require reboot;
account.5.music_on_hold_type = 

#########################################################################
##                     NAT Settings                                    ##
#########################################################################

#Enable or disable the NAT traversal; 0-Disabled (default), 1-STUN;
account.5.nat.nat_traversal = 

#Configure the STUN server address.
account.5.nat.stun_server = 

#Configure the STUN server port, the default value is 3478.
account.5.nat.stun_port = 

#Enable or disable the NAT keep-alive; 0-Disabled, 1-Enabled (default);
account.5.nat.udp_update_enable = 

#Specify the keep-alive interval (in seconds), the default value is 30.
account.5.nat.udp_update_time = 

#Enable or disable the NAT Rport; 0-Disabled (default), 1-Enabled;
account.5.nat.rport = 

#Configure the session timer (in seconds), the default value of T1, T2, T3 is 0.5, 4, 5.
account.5.advanced.timer_t1 = 
account.5.advanced.timer_t2 = 
account.5.advanced.timer_t4 = 

#Configure the timeout (in seconds) for DNS query, the value ranges from 1 to 9, the default value is 8.
account.5.dns_query_timeout =

#Assign a ringtone for account5. The system ring tones are: common (default), Ring1.wav, Ring2.wav,Ў­Ў­Ring8.wav.
#If you configure the custom ring tone (Family.wav) for the account, the value format is: Family.wav
#If you configure the system ring tone (Ring2.wav) for the account, the value format is: Ring2.wav
account.5.ringtone.ring_type = 

#Audio codecs for account5 (Y ranges from 1 to 13).
#Enable or disable the specified codec; 0-Disabled, 1-Enabled;
#account.5.codec.Y.enable = 
#The type of the specified codec.
#account.5.codec.Y.payload_type = 
#The priority of the specified codec. It's available when the codec is enabled.
#account.5.codec.Y.priority = 
#The payload of the specified codec.
#account.5.codec.Y.rtpmap = 

account.5.codec.1.enable = 1
account.5.codec.1.payload_type = PCMU
account.5.codec.1.priority = 1
account.5.codec.1.rtpmap = 0

account.5.codec.2.enable = 1
account.5.codec.2.payload_type = PCMA
account.5.codec.2.priority = 2 
account.5.codec.2.rtpmap = 8

account.5.codec.3.enable = 0 
account.5.codec.3.payload_type = G723_53
account.5.codec.3.priority =0
account.5.codec.3.rtpmap = 4

account.5.codec.4.enable = 0
account.5.codec.4.payload_type = G723_63
account.5.codec.4.priority = 0
account.5.codec.4.rtpmap = 4

account.5.codec.5.enable = 1
account.5.codec.5.payload_type = G729
account.5.codec.5.priority = 3
account.5.codec.5.rtpmap = 18

account.5.codec.6.enable = 1
account.5.codec.6.payload_type = G722
account.5.codec.6.priority = 4
account.5.codec.6.rtpmap = 9

account.5.codec.7.enable = 0
account.5.codec.7.payload_type = iBLC
account.5.codec.7.priority = 0 
account.5.codec.7.rtpmap = 102

account.5.codec.8.enable = 0
account.5.codec.8.payload_type = G726-16
account.5.codec.8.priority = 0
account.5.codec.8.rtpmap = 112

account.5.codec.9.enable = 0
account.5.codec.9.payload_type = G726-24
account.5.codec.9.priority = 0
account.5.codec.9.rtpmap = 102

account.5.codec.10.enable = 0
account.5.codec.10.payload_type = G726-32 
account.5.codec.10.priority = 0 
account.5.codec.10.rtpmap = 99

account.5.codec.11.enable = 0
account.5.codec.11.payload_type = G726-40
account.5.codec.11.priority = 0
account.5.codec.11.rtpmap = 104

account.5.codec.12.enable = 0
account.5.codec.12.payload_type = iLBC_13_3
account.5.codec.12.priority = 0 
account.5.codec.12.rtpmap = 97

account.5.codec.13.enable = 0
account.5.codec.13.payload_type = iLBC_15_2
account.5.codec.13.priority = 0 
account.5.codec.13.rtpmap = 97            

#Configure the ACD reason code of Broadsoft.(The valus of Y must be consecutive numbers.)
#account.5.bw_acd_reason_code.Y = 500(lunch time)
account.5.bw_acd_reason_code.1 =
account.5.bw_acd_reason_code.2 =

#######################################################################################
##                        Call Forward                                               ##                                       
#######################################################################################

#Enable or disable the always forward feature for account5; 0-Disabled (default), 1-Enabled;
account.5.always_fwd.enable = 

#Configure the destination number of the always forward for account5.
account.5.always_fwd.target = 

#Configure the always forward on code and off code for account5.
account.5.always_fwd.on_code = 
account.5.always_fwd.off_code =

#Enable or disable the busy forward feature for account5; 0-Disabled (default), 1-Enabled;
account.5.busy_fwd.enable = 
account.5.busy_fwd.target = 
account.5.busy_fwd.on_code = 
account.5.busy_fwd.off_code =

#Enable or disable the no answer forward feature for account5; 0-Disabled (default), 1-Enabled; 
#Configure the waiting ring times before forwarding. It ranges from 0 to 20, the default value is 2.
account.5.timeout_fwd.enable = 
account.5.timeout_fwd.target =
account.5.timeout_fwd.timeout = 
account.5.timeout_fwd.on_code =
account.5.timeout_fwd.off_code =

#Enable or disable the phone to record the last call forward type for account5; 0-Disabled (default), 1-Enabled;
account.5.last_type =

#######################################################################################
##                          DND                                                      ##                                       
#######################################################################################

#Enable or disable the DND feautre for account5; 0-Disabled (default), 1-Enabled;
account.5.dnd.enable = 

#Configure the DND on code and off code for account5.
account.5.dnd.on_code = 
account.5.dnd.off_code =

#######################################################################################
##                 Account6 Settings (For T28P only)                                 ##                                         
#######################################################################################

#Enable or disable the account6, 0-Disabled (default), 1-Enabled;
account.6.enable = 

#Configure the label displayed on the LCD screen for account6.
account.6.label = 

#Enable or disable to use the alert info URL; 0-Enabled (default), 1-Disabled;
account.6.alert_info_url_enable =

#Configure the display name of account6.
account.6.display_name =

#Configure the username and password for register authentication.
account.6.auth_name = 
account.6.password =   

#Configure the register user name.
account.6.user_name =  

#Configure the SIP server address.
account.6.sip_server_host = 
#Specify the port for the SIP server. The default value is 5060.
account.6.sip_server_port = 

#Enable or disable to use the outbound proxy server; 0-Disabled (default), 1-Enabled; 
account.6.outbound_proxy_enable = 

#Specify the IP address or domain name of the outbound proxy server.
account.6.outbound_host = 

#Specify the server port, the default value is 5060.
account.6.outbound_port =

#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV;
account.6.transport =
 
#Enable or disable the timer to periodically refresh the DNS-SRV query result; 0-Disabled (default), 1-Enabled;
#Require reboot;
account.6.srv_ttl_timer_enable =

#Specify the service for SIP used to DNS-SRV query; 0-muti-service mixed, 1-SIP+D2U, 2-SIP+D2T, 3-SIPS+D2T;
#Require reboot;
account.6.dns_srv_type =

#Configure the address of the backup outbound proxy server.
account.6.backup_outbound_host = 

#Specify the port, the default value is 5060.
account.6.backup_outbound_port = 

#Configure the voice mail number of account6.
voice_mail.number.6 = 

#Configure the proxy server to account6.
account.6.proxy_require = 

#Enable or disable the phone to only accept the message from the server; 0-Disabled (default), 1-Enabled;
account.6.sip_trust_ctrl =

#Enable or disable the anonymous call feature; 0-Disabled (default), 1-Enabled;
account.6.anonymous_call = 

#Configure the on code and off code of the anonymous call feature.
account.6.anonymous_call_oncode = 
account.6.anonymous_call_offcode = 

#Enable or disable the reject anonymous call feature; 0-Disabled (default), 1-Enabled;
account.6.reject_anonymous_call = 

#Configure the on code and off code of the reject anonymous call feature.
account.6.anonymous_reject_oncode = 
account.6.anonymous_reject_offcode = 

#Configure the SIP port for account6, the default value is 5060. 
account.6.sip_listen_port = 

#Configure the register expiry time (in seconds), the default value is 3600.
account.6.expires = 

#Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled;
account.6.100rel_enable = 

#Enable or disable the resource reservation; 0-Disabled (default), 1-Enabled;
account.6.precondition = 

#Enable or disable the phone to subscribe the register status; 0-Disabled (default), 1-Enabled;
account.6.subscribe_register = 

#Enable or disable the phone to subscribe the message waiting indicator; 0-Disabled (default), 1-Enabled;
account.6.subscribe_mwi = 

#Configure MWI subscribe expiry time (in seconds). It ranges from 0 to 84600, the default value is 3600.
account.6.subscribe_mwi_expires = 

#Configure the type of SIP header(s) to carry the caller ID; 0-FROM (default), 1-PAI 2-PAI-FROM, 3-PRID-PAI-FROM, 4-PAI-RPID-FROM, 5-RPID-FROM;
account.6.cid_source = 

#Configure the type of SIP header(s) to display on the caller's LCD screen; 0-RPID-FROM, 1-Dialed Digits (default), 2-RFC4916
account.6.cp_source = 

#Enable or disable the session timer, 0-Disabled (default), 1-Enabled;  
account.6.session_timer.enable =      

#Configure the refresh session timer interval (in seconds). It ranges from 1 to 9999.
account.6.session_timer.expires =      

#Configure the session timer refresher; 0-Uac (default), 1-Uas;
account.6.session_timer.refresher = 

#Enable or disable the "user=phone"; 0-Disabled (default), 1-Enabled;
account.6.enable_user_equal_phone = 

#Specify whether to encrypt the SIP messages; 0-Disabled (default), 1-Forced, 2-Negotiated;
account.6.srtp_encryption = 

#Configure the RTP packet time. The valid values are 0 (Disabled), 10, 20 (default), 30, 40, 50, 60.
account.6.ptime = 

#Assign account6 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA;
account.6.shared_line = 

#Configure BLA number for account6 and the subscribe period (in seconds). It ranges from 60 to 7200, the default value is 300.
account.6.bla_number = 
account.6.bla_subscribe_period = 

#Enable or disable call pickup using dialog-info SIP header; 0-Disabled (default), 1-Enabled;
account.6.dialoginfo_callpickup = 

#Configure the directed and group pickup codes for account 1, the settings on a per-account basis take precedence over the settings on the phone.
account.6.group_pickup_code = 
account.6.direct_pickup_code = 

#Enable or disable the auto answer feature; 0-Disabled (default), 1-Enabled;
account.6.auto_answer = 

#Enable or disable the phone to record the missed call; 0-Disabled, 1-Enabled (default);
account.6.missed_calllog = 

#Enable or disable the phone to subscribe to the voicemail through the message waiting indicator; 0-Disabled (default), 1-Enabled;
account.6.subscribe_mwi_to_vm = 

#Enable or disable the phone to send the MAC address and line number in the Register message; 0-Disabled (default), 1-Enabled;    
account.6.register_mac = 
account.6.register_line = 

#Configure the interval (in seconds) the phone retries to register when account6 fails to register. It ranges from 0 to 1800, the default value is 30.
account.6.reg_fail_retry_interval = 

#Configure the conference type; 0-Local (default), 2-Network Conference;
account.6.conf_type = 

#Configure the conference URI (a SIP URI, or use part of the SIP URI). For example, "conference@domain.com" or "conference".
account.6.conf_uri = 

#Configure the BLF list URI (a SIP URI, or use part of the SIP URI). For example, "2300_blflist@domain.com" or "2300_blflist".
account.6.blf.blf_list_uri = 

#Configure the pickup code of BLF List.
account.6.blf_list_code = 

#Configure the barge-in code.
account.6.blf_list_barge_in_code = 

#Enable or disable the phone to handle unmatched notify messages; 0-Disabled (default) , 1-Enabled ;
account.6.out_dialog_blf_enable = 

#Configure the BLF subscribe period (in seconds), the default value is 1800.
account.6.blf.subscribe_period = 

#Configure the ACD subscribe period (in seconds). It ranges from 120 to 3600 (default).
account.6.subscribe_acd_expires = 

#Configure the SIP server type; 0-Default (default), 2-BroadSoft, 4-Cosmocom;
account.6.sip_server_type = 

#Enable or disable the SIP signal encode; 0-Disabled (default), 1-Enabled (RC 4);
account.6.enable_signal_encode = 

#Configure the key for encoding.
account.6.signal_encode_key = 

#Configure the URI of the Music On Hold server. 
account.6.music_server_uri =

#Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO;
account.6.dtmf.type = 

#Configure the RFC2833 payload. It ranges from 96 to 255, the default value is 101.
account.6.dtmf.dtmf_payload = 

#Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event;
account.6.dtmf.info_type = 

#Enable or disable the phone to obtain the balance for account6; 0-Disabled (default), 1-Enabled;
account.6.balance_enable = 

#Configure the access URL of the balance server for account6.
account.6.balance_link_url =

#Enable or disable the phone to send the account log-off message first and then send account register message when rebooting the phone; 0-Disabled (default), 1-Enabled;
account.6.unregister_on_reboot =

#Enbale or diable the simplified header field feature; 0-Disabled, 1-Enabled (default);
account.6.compact_header_enable =

#Configure the type of Music on Hold; 0-Send the INVITE request to Music on Hold Server then hold the call; 1-Hold the call then send the INVITE request to Music on Hold Server;
#Require reboot;
account.6.music_on_hold_type = 

#########################################################################
##                     NAT Settings                                    ##
#########################################################################

#Enable or disable the NAT traversal; 0-Disabled (default), 1-STUN;
account.6.nat.nat_traversal = 

#Configure the STUN server address.
account.6.nat.stun_server = 

#Configure the STUN server port, the default value is 3478.
account.6.nat.stun_port = 

#Enable or disable the NAT keep-alive; 0-Disabled, 1-Enabled (default);
account.6.nat.udp_update_enable = 

#Specify the keep-alive interval (in seconds), the default value is 30.
account.6.nat.udp_update_time = 

#Enable or disable the NAT Rport; 0-Disabled (default), 1-Enabled;
account.6.nat.rport = 

#Configure the session timer (in seconds), the default value of T1, T2, T4 is 0.5, 4, 5.
account.6.advanced.timer_t1 = 
account.6.advanced.timer_t2 = 
account.6.advanced.timer_t4 = 

#Configure the timeout (in seconds) for DNS query, the value ranges from 1 to 9, the default value is 8.
account.6.dns_query_timeout =

#Assign a ringtone for account6. The system ring tones are: common (default), Ring1.wav, Ring2.wav,Ў­Ў­Ring8.wav.
#If you configure the custom ring tone (Family.wav) for the account, the value format is: Family.wav
#If you configure the system ring tone (Ring2.wav) for the account, the value format is: Ring2.wav
account.6.ringtone.ring_type = 

#Audio codecs for account6 (Y ranges from 1 to 13).
#Enable or disable the specified codec; 0-Disabled, 1-Enabled;
#account.6.codec.Y.enable = 
#The type of the specified codec.
#account.6.codec.Y.payload_type = 
#The priority of the specified codec. It's available when the codec is enabled.
#account.6.codec.Y.priority = 
#The payload of the specified codec.
#account.6.codec.Y.rtpmap = 

account.6.codec.1.enable = 1
account.6.codec.1.payload_type = PCMU
account.6.codec.1.priority = 1
account.6.codec.1.rtpmap = 0

account.6.codec.2.enable = 1
account.6.codec.2.payload_type = PCMA
account.6.codec.2.priority = 2 
account.6.codec.2.rtpmap = 8

account.6.codec.3.enable = 0 
account.6.codec.3.payload_type = G723_53
account.6.codec.3.priority =0
account.6.codec.3.rtpmap = 4

account.6.codec.4.enable = 0
account.6.codec.4.payload_type = G723_63
account.6.codec.4.priority = 0
account.6.codec.4.rtpmap = 4

account.6.codec.5.enable = 1
account.6.codec.5.payload_type = G729
account.6.codec.5.priority = 3
account.6.codec.5.rtpmap = 18

account.6.codec.6.enable = 1
account.6.codec.6.payload_type = G722
account.6.codec.6.priority = 4
account.6.codec.6.rtpmap = 9

account.6.codec.7.enable = 0
account.6.codec.7.payload_type = iBLC
account.6.codec.7.priority = 0 
account.6.codec.7.rtpmap = 102

account.6.codec.8.enable = 0
account.6.codec.8.payload_type = G726-16
account.6.codec.8.priority = 0
account.6.codec.8.rtpmap = 112

account.6.codec.9.enable = 0
account.6.codec.9.payload_type = G726-24
account.6.codec.9.priority = 0
account.6.codec.9.rtpmap = 102

account.6.codec.10.enable = 0
account.6.codec.10.payload_type = G726-32 
account.6.codec.10.priority = 0 
account.6.codec.10.rtpmap = 99

account.6.codec.11.enable = 0
account.6.codec.11.payload_type = G726-40
account.6.codec.11.priority = 0
account.6.codec.11.rtpmap = 104

account.6.codec.12.enable = 0
account.6.codec.12.payload_type = iLBC_13_3
account.6.codec.12.priority = 0 
account.6.codec.12.rtpmap = 97

account.6.codec.13.enable = 0
account.6.codec.13.payload_type = iLBC_15_2
account.6.codec.13.priority = 0 
account.6.codec.13.rtpmap = 97          

#Configure the ACD reason code of Broadsoft.(The valus of Y must be consecutive numbers.)
#account.6.bw_acd_reason_code.Y = 500(lunch time)
account.6.bw_acd_reason_code.1 =
account.6.bw_acd_reason_code.2 =

#######################################################################################
##                        Call Forward                                               ##                                       
#######################################################################################

#Enable or disable the always forward feature for account6; 0-Disabled (default), 1-Enabled;
account.6.always_fwd.enable = 

#Configure the destination number of the always forward for account6.
account.6.always_fwd.target = 

#Configure the always forward on code and off code for account6.
account.6.always_fwd.on_code = 
account.6.always_fwd.off_code =

#Enable or disable the busy forward feature for account6; 0-Disabled (default), 1-Enabled;
account.6.busy_fwd.enable = 
account.6.busy_fwd.target = 
account.6.busy_fwd.on_code = 
account.6.busy_fwd.off_code =

#Enable or disable the no answer forward feature for account6; 0-Disabled (default), 1-Enabled; 
#Configure the waiting ring times before forwarding. It ranges from 0 to 20, the default value is 2.
account.6.timeout_fwd.enable = 
account.6.timeout_fwd.target =
account.6.timeout_fwd.timeout = 
account.6.timeout_fwd.on_code =
account.6.timeout_fwd.off_code =

#Enable or disable the phone to record the last call forward type for account6; 0-Disabled (default), 1-Enabled;
account.6.last_type =

#######################################################################################
##                          DND                                                      ##                                       
#######################################################################################

#Enable or disable the DND feautre for account6; 0-Disabled (default), 1-Enabled;
account.6.dnd.enable = 

#Configure the DND on code and off code for account6.
account.6.dnd.on_code = 
account.6.dnd.off_code =

По сути дела, нам требуется указать только адрес SIP сервера (в нашем случае Asterisk) и порт (в примере использован 5061)

Адрес SIP сервера:

  account.1.sip_server_host = 10.10.10.1

Порт SIP сервера:

 account.1.sip_server_port = 5061

Транспорт; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV;

 account.1.transport = 0

Теперь осталось только поместить файлы на TFTP сервер, который можно разместить на том же сервере, что и Asterisk:

Настройка TFTP сервера

И добавить в настройки DHCP сервера опцию 66 (или 128).

Настройка DHCP - option 66

Телефон подключается в локальную сеть, получает IP адрес и адрес TFTP сервера по DHCP,
скачивает файл общих настроек и свой уникальный конфигурационный файл.
Теперь когда аппарат получил всю требуемую информацию, а именно:

  • адрес tftp сервера по DHCP
  • адрес SIP сервера из конфигурационного файла с tftp сервера.
  • параметры Hot Desking из общего конфигурационного файла.
  • и тд

Пользователь нажимает кнопку HDesk (Смена - в руссифицированном интерфейсе) и авторизуется под своим SIP аккаунтом.

Настройка оборудования

Asterisk: настройка и установка

$
0
0

Asterisk: настройка и установка

Документация по настройке и установке Asterisk. Dialplan Realtime CDR Queue Agents SIP PJSIP DAHDI MySQL ODBC Features LDAP ConfBridge AMI ARI NAT SRTP RTP.

Asterisk: установка

Asterisk работает под управлением операционных систем Linux и FreeBSD. Доступны установка из бинарных файлов и компиляция из исходного кода. Также существует множество дистрибьютивов Linux с уже готовым к работе предустановленным Asterisk и FreePBX.
Инструкции по установке Asterisk для различных дистрибьютивов Linux:

На нашем сайте собрано множество справочных материалов и руководств по настройке Asterisk. Документация постоянно обновляется и дополняется. Рассмотрим разные аспекты настройки программного комплекса Asterisk, сгруппированные по основным темам.

Asterisk настройка

Конфигурационные файлы Asterisk

Большинство настроек Asterisk контролируются с помощью конфигурационных файлов, расположенных в директории /etc/asterisk. Синтаксис конфигурационных файлов Asterisk разработан для редактирования в ручную и имеет простую и понятную структуру. Категории или по иному контексты группируют свойства объектов и отделяют их друг от друга именами в квадратных скобках по принципу наследования. Все, что записано после имени контекста относится к нему, пока не появится следующее имя контекста в квадратных скобках. Практически в каждом кофиге встречается категория [general], которая задает параметры для всех объектов конфигурационного файла. Параметры объектов имеют приоритет над глобальными параметрами, если одинаковый параметр, может быть назначен, как глобально, так и конкретному объекту. Некторые конфиги имеют только заранее определенные секции, например asterisk.confотвечающий за общие настройки pbx. Но в большинстве случаев, для назначения объектов, создаются контексты и задаются их имена. Приведенные ниже примеры конфигов Asterisk 14 с описанием параметров, переведены и дополнены авторами сайта.

Realtime архитектура Asterisk

Реалтайм Архитектура Asterisk - набор драйверов и функций для конфигурации в режиме реального времени. Существует два типа конфигурации - статический и динамический: - Статический хранит конфигурации в БД, как конфигурационные файлы и также обновляет данные при перезагрузке модулей. - Динамический используется для создания и обновления объектов в режиме реального времени, при совершении вызовов

Каналы связи в Asterisk

SIP

Под каналами связи в Asterisk подразумевается набор драйверов для взаимодействия с устройствами и протоколами связи. Так как Asterisk в первую очередь VoIP АТС ключевое значение имеют драйвера взаимодействия с VoIP протоколами, в частности с SIP протоколом. Изначально в Asterisk был один драйвер SIP протокола chan_sip. Но его реализация была неполной и в конкуренции с FreeSWITCH, который имел более продвинутый SIP драйвер, в Asterisk начиная с версии 12, был включен новый драйвер SIP - chan_pjsip.
Поддержка старого драйвера сохраняется и оба драйвера могут действовать совместно.
Однако предпочтительней использовать новый драйвер PJSIP.

IAX

Также в Asterisk реализован собственный VoIP протокол - IAX (Inter Asterisk Exchange). Как и следует из названия, он в первую очередь ориентирован на создание каналов связи между серверами Asterisk. IAX имеет упрощенную структуру, используя один и тот же порт для сигнализации и медиа, что в теории упрощает прохождение NAT и экономит трафик, однако в современных условиях и с появлением PJSIP его преимущества не завоевали ему популярности.

h323

Поддержка устаревшего VoIP протокола h323 может понадобиться для интеграции с устаревшими АТС, например Avaya CSI.

DAHDI

Драйвер DAHDI поддерживает большую линейку устройств, таких как платы потоков ISDN PRI E1, FXO, FXS и GSM интерфейсов.

Local

Прокси - псевдо канал Asterisk, позволяющий вызывать канал любой технологии без явного ее указания.

NAT SIP Asterisk

План набора Asterisk

Для понимания Asterisk очень важен - диалплан (dialplan).
Диалплан направляет каждый звонок от его источника, с помощью различных приложений,
в пункт назначения. Все вызовы, будь-то голосовая почта, конференция, меню автосекретаря
или вызов телефона, определяются логикой и концепцией диалплана.
Русская документация мануал по dialplan Asterisk

Команды диалплана Asterisk

Функции диалплана Астериск

Asterisk Dialplan functions

Функции Asterisk используются в диалплане. Это не командыдиалпланаи не могут быть использованы прямо. Функции возвращают значение для дальнейшего использования в логике диалплана.

Очереди и Агенты Asterisk

Очередями в Asterisk называется механизм ACD (automated call distribution) для распределения входящих вызовов между агентами колл центра. Конфигурация очередей осуществляется в файле Asterisk: queues.conf, имена очередей вызовов используются в качестве аргумента команды Queueв файле конфигурации плана набора extensions.conf. Агенты, которые обрабатывают вызовы, поступающие в очередь, описываются в файле Asterisk: agents.conf.

Шифрование в Asterisk

Конференции Asterisk

Asterisk позволяет организовать телеконференции с неограниченным числом пользователей.

Абонентские функции Asterisk

В файле features.conf назначаются пользовательские коды абонентских функций Asterisk и опции абонентских функций, такие как:
Переадресация вызова(transfer), перехват вызова (pickup), запись по требованию (record on demand), таймауты между набора и переадресации (digit timeout), паркинг (park) и др.

Отчеты о звонках Asterisk

Детализированный отчет о звонках (CDR) backend для сохранения данных о входящих, исходящих и внутренних вызовах Asterisk. Полное описание на русском языке CDR, MySQL, ODBC etc.

Логи в Asterisk

CLI - интерфейс командной строки Asterisk.

Командная строка является мощным инструментом для мониторинга и управления работой Asterisk PBX

Asterisk AMI

Asterisk manager Interface - интерфейс управления.

Asterisk ARI

Установка Asterisk

$
0
0

Установка Asterisk

Основные требования к системе

  • Для инсталляции и запуска Asterisk не требуется никакого специального оборудованиия.
  • Перед установкой Asterisk должны быть установлены программные пакеты:
    • Исходники ядра (kernel sources)
    • Заголовочные .h файлы для Вашего ядра (kernel headers)
    • bison (необходим для обработки выражений в файле extensions.conf)
    • Пакеты: openssl и openssl-dev или libssl-dev

Исходники Asterisk

Asterisk - ядро основной программы
Asterisk-addons - дополнительные файлы
Libpri - PRI - библиотеки
Dahdi (zaptel) - драйверы телефонии

cd /usr/src/

wget http://sourceforge.net/projects/lame/files/lame/3.98.4/lame-3.98.4.tar.gz
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4.15.tar.gz
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-12-current.tar.gz

Lame

   tar zxvf lame-3.98.4.tar.gz
   cd lame-3.98.4
   ./configure
   make
   make install
   cd ..

Компиляция Libpri

cd /usr/src/libpri-VERSION
make
make install

Компиляция DAHDI

cd /usr/src/dahdi-linux-complete-VERSION
make all
make install
make config

Компиляция Asterisk

cd /usr/src/asterisk-VERSION
./configure
make menuselect
make
make install
make samples
make progdocs
make config

Компиляция Asterisk-addons

Начиная с версии 1.8 Asterisk-addons входят в состав core не не требуют отдельной компиляции.

cd /usr/src/asterisk-addons-VERSION
./configure
make
make install

Запуск и остановка Asterisk

/usr/sbin/asterisk: Файл запускающий Asterisk
Если Вы установили Asterisk, можно запустить его командой:

 /usr/src/asterisk -vvvgc

Остановить Asterisk из CLI можно командой 'stop now'.
Командой без аргументов, Asterisk запускается как демон.

 /usr/sbin/asterisk 

Подключится к командному интерфейсу (CLI) можно используя аргумент 'r'.

 /usr/sbin/asterisk -r

Запуск Asterisk из под не - root пользователя.По умолчанию Asterisk запускается из под root, что может быть небезопасно. Для изменения пользователя раскомментируйте строки в файле /etc/init.d/asterisk.

AST_USER="asterisk"
AST_GROUP="asterisk"

Создайте группу и пользователя asterisk.

/usr/sbin/groupadd asterisk 
/usr/sbin/useradd -d /var/lib/asterisk -g asterisk asterisk 

Измените права на использование следующих файлов:

chown --recursive asterisk:asterisk /var/lib/asterisk
chown --recursive asterisk:asterisk /var/log/asterisk
chown --recursive asterisk:asterisk /var/run/asterisk
chown --recursive asterisk:asterisk /var/spool/asterisk
chown --recursive asterisk:asterisk /usr/lib/asterisk
## Если Вы используете Zaptel
chown --recursive asterisk:asterisk /dev/zap
## Если Вы используете DAHDI
chown --recursive asterisk:asterisk /dev/dahdi
#----------------------------------------------------
chmod --recursive u=rwX,g=rX,o= /var/lib/asterisk
chmod --recursive u=rwX,g=rX,o= /var/log/asterisk
chmod --recursive u=rwX,g=rX,o= /var/run/asterisk
chmod --recursive u=rwX,g=rX,o= /var/spool/asterisk
chmod --recursive u=rwX,g=rX,o= /usr/lib/asterisk
## Если Вы используете Zaptel
chmod --recursive u=rwX,g=rX,o= /dev/zap
##  Если Вы используете DAHDI
chmod --recursive u=rwX,g=rX,o= /dev/dahdi
#----------------------------------------------------
chown --recursive root:asterisk /etc/asterisk
chmod --recursive u=rwX,g=rX,o= /etc/asterisk 
/etc/init.d/asterisk restart 

Автозагрузка Asterisk

Различные операционные системы имеют разные способы запуска программ во время загрузки. В директории с исходниками /usr/src/asterisk-VERSION/contrib/init.dсодержатся скрипты для запуска в archlinux, debian, gentoo, mandriva, redhat, slackware, suse.

Для систем, которые все еще используют inittab, просто добавьте следующую строку в /etc/inittab:

as:2:respawn:/usr/sbin/asterisk -f 

Для Redhat окружения выполните

cd /usr/src/asterisk-VERSION
make config

Это скопирует скрипт из contrib/init.d/rc.redhat.asteriskв /etc/rc.d/init.d/asterisk и выполните команду:

/sbin/chkconfig --add asterisk 

Директории Asterisk

  • /usr/lib/asterisk/modules: Содержит бинарные файлы (модули. кодеки)
  • /var/lib/asterisk: Содержит переменные данные(звуки. скрипты и т.д.).
  • /var/spool/asterisk: Файлы создаваемые в процессе работы (голосовые сообщения, исходящие вызовы и т.д.)
  • /var/log/asterisk: Логи. информация о вызовах.
  • /etc/asterisk; Конфигурационные файлы Asterisk.

Asterisk 14 + Ubuntu 16.04 64-bit установка

$
0
0

Asterisk 14 + Ubuntu 16.04 64-bit установка

freepbx13 apache2 php5.6 mysql srtp pjproject spandsp opus odbc

При установке системы, на стадии software selectionвыберите, как минимум openssh. ubuntu-16-software-selectionВо время установки, если выбран LAMP сервер, или при установке mysql-server из репозитория, вам будет предложено задать пароль root пользователя MySQL, если оставить поле пустым, задать пароль можно будет после установки FreePBX 13 командой mysql:

 SET PASSWORD FOR 'root'@'localhost' = PASSWORD('Password');

или утилитой проверки безопасности:

 mysql_secure_installation

Задайте пароль root пользователя системы

 $ sudo passwd root
 Enter new UNIX password:
 Retype new UNIX password:
 passwd: password update successfully

Получите права супер пользователя

 $ sudo -i

Сделайте апдейт системы

 # apt update && sudo apt upgrade -y

Установите требуемые зависимости

apt install -y build-essential linux-headers-`uname -r` openssh-server apache2 mysql-server\
 mysql-client bison flex sox libncurses5-dev libssl-dev libmysqlclient-dev mpg123 libxml2-dev\
 libnewt-dev sqlite3 libsqlite3-dev pkg-config automake libtool autoconf git subversion unixodbc-dev\
 uuid uuid-dev libasound2-dev libogg-dev libvorbis-dev libcurl4-openssl-dev libical-dev libneon27-dev\
 libsrtp0-dev libspandsp-dev libopus-dev opus-tools libiksemel-dev libiksemel-utils libiksemel3
 

Установка php5.6 вместо php7.0

Ubuntu 16 по умолчанию ставит из репозитория php7.0, а FreePBX с ним не дружит. Если вы планируете использовать не чистый Asterisk, надо установить php5.6.

 apt install -y software-properties-common python-software-properties
 add-apt-repository ppa:ondrej/php
 apt  update -y
 apt install -y php5.6 php5.6-curl php5.6-cli php5.6-mysql php5.6-odbc php5.6-db php5.6-gd php5.6-xml curl libapache2-mod-php5.6
 apt install -y php-pear
 a2dismod php7.0
 a2enmod php5.6
 systemctl restart apache2

Перезагрузите сервер

Чтобы загрузить свежую версию ядра после апдейта. Если вы уверены, что загружена последняя версия, можно не перезагружать.

 reboot

Убедитесь, что mod_rewrite включен, чтобы избежать возможных атак.

  a2enmod rewrite
  service apache2 restart

Поддержка Console_Getopt

 pear install Console_Getopt

Asterisk 14 установка

Как использовать данное руководство.

Блоки команд с ключом '&&' могут быть скопированы вместе и будут выполняться последовательно. '&&' выполняет переход к следующей команде, при условии успешного выполнения предыдущей. Если вы хотите полностью, по шагам, контролировать процесс установки, выполните каждую команду отдельно, без ввода '&&'.

Скачайте исходные файлы

cd /usr/src
wget http://sourceforge.net/projects/lame/files/lame/3.98.4/lame-3.98.4.tar.gz &&
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz &&
wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-current.tar.gz &&
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-14-current.tar.gz &&
git clone https://github.com/akheron/jansson.git &&
wget http://www.pjsip.org/release/2.5.5/pjproject-2.5.5.tar.bz2 &&
echo " ¯\_(ツ)_/¯ "

Скомпилируйте и установите Lame (mp3)

 cd /usr/src &&
 tar zxvf lame-3.98.4.tar.gz &&
 cd lame-3.98.4 &&
 ./configure &&
 make &&
 make install  &&
 echo " ¯\_(ツ)_/¯ "

Скомпилируйте и установите DAHDI и LibPRI

cd /usr/src &&
tar xvfz dahdi-linux-complete-current.tar.gz &&
tar xvfz libpri-current.tar.gz &&
rm -f dahdi-linux-complete-current.tar.gz libpri-current.tar.gz &&
cd dahdi-linux-complete-* &&
make all &&
make install &&
make config &&
cd /usr/src/libpri-* &&
make &&
make install &&
echo " ¯\_(ツ)_/¯ "

Скомпилируйте и установите pjproject

(Требуется для поддержки драйвера SIP канала PjSIP)

cd /usr/src &&
tar -xjvf pjproject-2.*.*.tar.bz2 &&
cd pjproject-* &&
CFLAGS='-DPJ_HAS_IPV6=1' ./configure --prefix=/usr --enable-shared --disable-sound\
  --disable-resample --disable-video --disable-opencore-amr &&
make dep &&
make &&
make install &&
echo " ¯\_(ツ)_/¯ "

Скомпилируйте и установите jansson

cd /usr/src/jansson &&
autoreconf -i &&
./configure &&
make &&
make install &&
echo " ¯\_(ツ)_/¯ "

Скомпилируйте и установите Asterisk

cd /usr/src && 
tar xvfz asterisk-14-current.tar.gz &&
rm -f asterisk-14-current.tar.gz &&
cd asterisk-* &&
./configure &&
contrib/scripts/get_mp3_source.sh &&
make menuselect

После ввода команды make menuselect, вам будет предложено выбрать устанавливаемые модули. Большинство требуемых модулей выбираются автоматически. Для поддержки mp3 включите модуль 'format_mp3'. 'res_config_mysql' вынесено в addons по условиям лицензирования.

В разделе Core Sound Packages выберете поддержку русскоязычных файлов (если требуется) В разделе Extra Sound Packages выберете дополнительные звуковые файлы.

В завершении выберете Save & Exitи продолжите установку.

make &&
make install &&
make config &&
ldconfig

Если вы не планируете использовать FreePBX, команда make basic-pbxустановит минимальный начальный набор конфигов.

Запуск от имени пользователя 'Asterisk'

Расcкомментируйте в /etc/default/asterisk

 AST_USER="asterisk"
 AST_GROUP="asterisk"
Создайте пользователя Asterisk и задайте права пользователя.
useradd -m asterisk &&
chown asterisk. /var/run/asterisk &&
chown -R asterisk. /etc/asterisk &&
chown -R asterisk. /var/{lib,log,spool}/asterisk &&
chown -R asterisk. /usr/lib/asterisk

Перезагрузите сервер и проверьте состояние Asterisk подключившись к консоли

 asterisk -vvr
Asterisk 14.2.0, Copyright (C) 1999 - 2016, Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 14.2.0 currently running on ubuntu (pid = 1269)
ubuntu*CLI>
Убедитесь, что Asterisk запущен под своим пользователем:
  ps aux | grep asterisk
 asterisk  1269  4.7 11.4 1446068 57504 ?       Ssl  07:57   0:07 /usr/sbin/asterisk -U asterisk -G asterisk

FreePBX 13: установка и настройка

Настроим Apache

sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php/5.6/apache2/php.ini &&
sed -ie 's/\;date\.timezone\ \=/date\.timezone\ \=\ "Europe\/Moscow"/g' /etc/php/5.6/apache2/php.ini &&
cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf_orig &&
sed -i 's/^\(User\|Group\).*/\1 asterisk/' /etc/apache2/apache2.conf &&
sed -i 's/AllowOverride None/AllowOverride All/'  /etc/apache2/apache2.conf &&
systemctl restart apache2

настроим ODBC

cat >> /etc/odbcinst.ini << EOF
[MySQL]
Description = ODBC for MySQL
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so
FileUsage = 1
  
EOF
cat >> /etc/odbc.ini << EOF
[MySQL-asteriskcdrdb]
Description=MySQL connection to 'asteriskcdrdb' database
driver=MySQL
server=localhost
database=asteriskcdrdb
Port=3306
Socket=/var/run/mysqld/mysqld.sock
option=3
  
EOF

Ubuntu 16 + FreePBX 13 установка

Скачайте FreePBX
cd /usr/src &&
wget http://mirror.freepbx.org/modules/packages/freepbx/freepbx-13.0-latest.tgz
Распакуйте и установите
tar vxfz freepbx-13.0-latest.tgz &&
cd /usr/src/freepbx &&
./install -n

Если при установке Ubuntu вы задали rootпароль MySQL
запустите скрипт установки без ключа -n.
Установка пройдет в интерактивном режиме,
во время которого вам будет предложено ввести пароль:

./install
Database engine [mysql]:
Database name [asterisk]:
CDR Database name [asteriskcdrdb]:
Database username [root]:
Database password:

install -h

install -h

/usr/src/freepbx# ./install -h
PHP Warning:  Declaration of FreePBX\Install\FreePBXHelpCommand::setCommand(FreePBX\Install\FreePBXInstallCommand $command) should be compatible with Symfony\Component\Console\Command\HelpCommand::setCommand(Symfony\Component\Console\Command\Command $command) in /usr/src/freepbx/installlib/installhelpcommand.class.php on line 15
 ______             _____  ______   __
|  ____|           |  __ \|  _ \ \ / /
| |__ _ __ ___  ___| |__) | |_) \ V /
|  __| '__/ _ \/ _ \  ___/|  _ < > <
| |  | | |  __/  __/ |    | |_) / . \
|_|  |_|  \___|\___|_|    |____/_/ \_\
Usage:
 install [--dbengine="..."] [--dbname="..."] [--cdrdbname="..."] [--dbuser="..."] 
[--dbpass="..."] [--user="..."] [--group="..."] [--dev-links] [--webroot="..."] 
[--astetcdir="..."] [--astmoddir="..."] [--astvarlibdir="..."] [--astagidir="..."] 
[--astspooldir="..."] [--astrundir="..."] [--astlogdir="..."] [--ampbin="..."] [--ampsbin="..."] 
[--ampcgibin="..."] [--ampplayback="..."] [-r|--rootdb] [-f|--force]

Options:
 --dbengine            Database engine (default: "mysql")
 --dbname              Database name (default: "asterisk")
 --cdrdbname           CDR Database name (default: "asteriskcdrdb")
 --dbuser              Database username (default: "root")
 --dbpass              Database password (default: "")
 --user                File owner user (default: "asterisk")
 --group               File owner group (default: "asterisk")
 --dev-links           Make links to files in the source directory instead of copying (developer option)
 --webroot             Filesystem location from which FreePBX files will be served (default: "/var/www/html")
 --astetcdir           Filesystem location from which Asterisk configuration files will be served (default: "/etc/asterisk")
 --astmoddir           Filesystem location for Asterisk modules (default: "/usr/lib/asterisk/modules")
 --astvarlibdir        Filesystem location for Asterisk lib files (default: "/var/lib/asterisk")
 --astagidir           Filesystem location for Asterisk agi files (default: "/var/lib/asterisk/agi-bin")
 --astspooldir         Location of the Asterisk spool directory (default: "/var/spool/asterisk")
 --astrundir           Location of the Asterisk run directory (default: "/var/run/asterisk")
 --astlogdir           Location of the Asterisk log files (default: "/var/log/asterisk")
 --ampbin              Location of the FreePBX command line scripts (default: "/var/lib/asterisk/bin")
 --ampsbin             Location of the FreePBX (root) command line scripts (default: "/usr/sbin")
 --ampcgibin           Location of the Apache cgi-bin executables (default: "/var/www/cgi-bin")
 --ampplayback         Directory for FreePBX html5 playback files (default: "/var/lib/asterisk/playback")
 --rootdb (-r)         Database Root Based Install. Will create the database user and password automatically along with the databases
 --force (-f)          Force an install. Rewriting all databases with default information
 --help (-h)           Display this help message
 --quiet (-q)          Do not output any message
 --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
 --version (-V)        Display this application version
 --ansi                Force ANSI output
 --no-ansi             Disable ANSI output
 --no-interaction (-n) Do not ask any interactive question

Подключимся к FreePBX

http://IP.Address.FreePBX.Server/admin

Первым делом, вам будет предложено задать имя пользователя и пароль FreePBX

ubuntu16-freepbx13-welcome

Нажмите, чтобы отобразить

Нажмите, чтобы скрыть

Затем выбрать язык и Time Zone:

ubuntu16-freepbx13-timezone

FreePBX самостоятельно скачает голосовые файлы и настроит соответствующие модули для использования выбранного языка.


Установка Asterisk

High Availability IP FailOver

$
0
0

High Availability IP FailOver

Рассмотрим создание отказоустойчивого кластера из двух серверов Asterisk/FreePBX
с автоматической подменой IP адреса и синхронизацией БД FreePBX.

Heartbeat, Asterisk, FreePBX, Centos6 x86_64

Задайте Hostname для каждого из узлов (asterisk1, asterisk2)

[root@asterisk1 ha.d]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=asterisk1
[root@asterisk2 ha.d]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=asterisk2

Подключим Epel репозиторий

(asterisk1, asterisk2)

 wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm &&
 wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm &&
 rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm

Установим Heartbeat

(asterisk1, asterisk2)

yum install -y heartbeat

Настроим Heartbeat

Файл конфигурация ha.cfдля каждого из узлов

logfile /var/log/ha-log
node asterisk1
node asterisk2
keepalive 1
deadtime 10
bcast eth0
auto_failback on
respawn hacluster /usr/lib64/heartbeat/ipfail

Сгенерируем пароль sha1, где PASS ваше кодовое слово.

   echo -n PASS | sha1sum | awk '{print $1}'
bd564db5d5cc358eb0e3523d3e03041739f230d5

Создадим файл ключа авторизации

nano /etc/ha.d/authkeys

auth 1
1 sha1 bd564db5d5cc358eb0e3523d3e03041739f230d5
 chmod 600 /etc/ha.d/authkeys

Скопируем файл на резервный узел (asterisk2)

 scp /etc/ha.d/authkeys asterisk2:/etc/ha.d/

/etc/ha.d/haresources

(asterisk1)

asterisk2 IPaddr::192.168.1.202/24/eth0

/etc/ha.d/haresources

(asterisk2)

asterisk1 IPaddr::192.168.1.201/24/eth0

Включим hearteat на обоих узлах

 /etc/init.d/heartbeat start
 

Проверим IP адрес на резервном узле (asterisk2)

[root@asterisk2 ha.d]# ip addr | grep "inet"
    inet 192.168.1.202/24 brd 192.168.1.255 scope global eth0
    inet 192.168.1.201/24 brd 192.168.1.255 scope global secondary eth0

Secondary eth0 (192.168.1.201) примет пакеты, если основной узел (asterisk1) будет недоступен в течении 10 секунд.

Если включен файрвол разрешим пинги снаружи на обоих узлах.

iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT &&
iptables -A OUTPUT -p icmp --icmp-type echo-reply -j ACCEPT &&
service iptables save

И наконец включим автозагрузку heaкtbeat на каждом из узлов.

 chkconfig heartbeat on

Синхронизация Баз Данных FreePBX

Настроим резервный сервер (asterisk2) таким образом, чтобы он подключался к основному серверу (asterisk1) по SSH
и синхронизировал настройки asterisk, autoprovision и др.

Настройка SSH подключения

В данном примере Asterisk и Web server работают из под пользователя asterisk.

Зададим временный пароль пользователю asterisk
На основном сервере (asterisk1)

#chsh -s /bin/bash asterisk
#passwd asterisk
somepassword
#chmod 755 /var/lib/asterisk

Сгенерируем ssh ключ на резервном сервере (Asterisk2)

 #chsh -s /bin/bash asterisk
#su  - asterisk
$ssh-keygen

Команда ssh-keygen создаст ключ в /home/asterisk/.ssh/id_rsa

Не вводите passphrase, оставьте пустым:

]$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/asterisk/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/asterisk/.ssh/id_rsa.
Your public key has been saved in /home/asterisk/.ssh/id_rsa.pub.
The key fingerprint is:
84:a8:1b:6f:2c:56:91:d5:d2:12:8f:8f:28:78:07:4e asterisk@asterisk2
The key's randomart image is:
+--[ RSA 2048]----+
|      o+         |
|     +o+o        |
|  A + o+o        |
| + o o +         |
|. * + . D        |
| . O             |
|  + +            |
| . o             |
|                 |
+-----------------+

Кода ключ создан, скопируем его на основной сервер:

 $ssh-copy-id -i asterisk@asterisk1_IP

Будет запрошен пароль, заданный для пользователя asteriskна основном севере.

[asterisk@asterisk2 root]$ ssh-copy-id -i asterisk@192.168.1.201
The authenticity of host '192.168.1.201 (192.168.1.201)' can't be established.
RSA key fingerprint is 61:44:a0:40:78:33:2a:b5:ec:eb:5f:55:36:39:8b:4d.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.201' (RSA) to the list of known hosts.
asterisk@192.168.1.201's password:
Now try logging into the machine, with "ssh 'asterisk@192.168.1.201'", and check                                  in:

  .ssh/authorized_keys

to make sure we haven't added extra keys that you weren't expecting.

Проверим подключение по ssh с ключом:

[asterisk@asterisk2 root]$ ssh asterisk@192.168.1.201
[asterisk@asterisk1 ~]$

Если произошло подключение к основному серверу без пароля, все в порядке.

В завершении настройки SSH подключения, удалим пароль пользователя asteriskна основном сервере (asterisk1).

 passwd -d asterisk

И перейдем к настройке автоматической синхронизации FreePBX

Выберете на резервном сервере Admin > Backup & Restore > Servers - New SSH Server

Hostname - ip адрес основного сервера Asterisk1

Port - порт ssh

User Name - пользователь, в нашем случае asterisk

Key - местонахождение ключа (/home/asterisk/.ssh/id_rsa)

Затем выберете Admin > Backup & Restore > Backups - New Backup

Задайте имя и перетащите шаблоны для настроек:

в нашем примере это Full Backupи Exclude Backup Settings

Местонахождение директории tftp сервера, где лежат файлы для autoprovision, изменена с /tftpboot на /var/lib/tftpboot.

Задайте в соответствии с вашими условиями.

И в завершении укажем созданный нами Backup Server (asterisk1)
и хранилище - Local Storage (local)

Restore Here - записать скачанный бэкап в базу данных asterisk

Disable Registered Trunks - отключить зарегистрированные транки, во избежание проблем с входящими вызовами на основном сервере.

Exclude NAT Settings - Исключить специфические настройки IP основного сервера.

Apply Config - Применить скачанный бэкап (записать в конфиги asterisk)

Сохраним Saveи проверим немедленно and Run

FreePBX SIP Trunk

$
0
0

FreePBX SIP Trunk

Настройка SIP транка во FreePBX

SIP транк определяет набор свойств, требуемых для совершения вызовов через другую АТС. Таких как, аутентификация, callerid, кол-во каналов, наличие сетевых трансляций (NAT) и другие свойства для формирования правильных SIP запросов, используемые кодеки, контекст для обработки входящих вызовов и др..

General Settings

Trunk Name


Описательное название для этого транка.

Outbound CallerID


Caller ID для звонков наружу через этот транк.
Формат:<XXXXXXX>
Можно также использовать формат: "hidden"<XXXXXXX>
чтобы скрыть свой Caller ID посылаемый (если поддерживается) по цифровым линиям (E1/T1/J1/BRI/SIP/IAX):

CID Options


Определяет как Caller ID будут использоваться в транке.
Allow Any CID:будут передаваться все CIDs, включая внешние полученные от внешних вызовов.
Block Foreign CIDs: блокировать любые CID внешних вызовов.
CID внутренних номеров будут передаваться без изменений.
Remove CNAM: эта опция удаляет CNAM из всех отсылаемых через этот транк CID
Force Trunk CID: Всегда использовать CID указанный на этом транке,
за исключением маршрутов, предназначенных для вызова экстренных служб
с определённым для этого внутреннего номера/устройства специального CID.
По Intra-Company Routes будет передаваться внутренний номер и имя абонента.

Maximum Channels


Назначает максимальное количество исходящих каналов (одновременных соединений)для данного транка

Asterisk Trunk Dial Options


Опции команды Dial()используемые при вызовах через данный транк. Замещают значения в Advanced Settings

Continue if Busy


Пытаться использовать следующий транк, если недоступно или занято.

Disable Trunk


Отключить транк для всех исходящих направлений

Dialed Number Manipulation Rules


Prepend - Значение автоматически подставляемое в начало набранного номера.

Prefix - Код доступа к линии. Удаляется из набора.

Match Pattern

- Шаблон набора номера

Правила для манипуляции набранными номерамиСледующие правила могут трансформировать набранные номера перед отправкой в транк. Если не указано никаких правил, номер не изменяется. Набранный оригинальный номер направляется из таблицы маршрутов, где он, возможно, уже подвергся каким-то трансформациям. На транке также имеются опции преобразования номера. Если номер совпадает с выбранными значениями полей префиксплюс шаблон, то правило будет использовано и все последующие правила будут проигнорированы.
После найденного совпадения префиксбудет удалён, если он указан. Следующим шагом будет добавлена приставкавпереди номера, перед шаблоном номера, и таким образом трансформированный номер будет отправлен в транк. Все поля являются необязательными (опциональными).

Правила:
X    совпадение любой цифры от 0 - 9
Z    любая цифра от 1 до 9
N    совпадение любой цифры от 2 - 9
[1237-9]  совпадение любой цифры из набора в скобках (например: 1,2,3,7,8,9)
.   (точка) универсальный символ, определяет одну или более набранных цифр
приставка:    Цифры, которые будут добавлены впереди при совпадении с шаблоном. Если набранный номер совпадает с форматом префиксплюс шаблон, то указанная приставка будет добавлена впереди перед отправкой номера в транк.
префикс:    Префикс удаляется при найденном совпадении. Если набранный номер совпадает с форматом префиксплюс шаблон, то указанный префикс будет удалён прежде чем к нему будет добавлена приставка, затем номер будет отправлен в транк.
совпадение шаблона:    Набранный номер будет сравниваться с комбинацией префиксплюс этот шаблон. При совпадении часть номера будет отправлена в транк после удаления префиксаи добавления приставки
Можно полностью заменить номер используя совпадение только по префиксу. заменить на указанный в поле приставкаи оставить поле шаблонпустым.

() + |

Dial Rules Wizards

Outbound Dial Prefix


Префикс выхода на линию используется для определения исходящих соединений, через данный транк.
Например, если этот транк подключен к АТС, то обычно используют 9 для выхода на линию.
Другое стандартное применение префикса - совершать звонки с опцией 'w'
в линии ТФОП, которая нужна для ожидания длинного гудка для набора номера.
В большинстве случаев проще оставить это поле пустым

Outgoing settings

Trunk Name


Уникальное имя канала, используется в диалплане Asterisk для определение данного канала. Например: Sip_test

PEER Details

Incoming Settings

USER Context


Этот USER контекст будет использовать параметры, определенные ниже.

USER Details
Изменить параметры USER для входящих соединений от вашего VoIP провайдера

Registration

Register String


Большинство VoIP провайдеров требуют, чтобы ваша система регистрировалась.
Введите строку регистрации.
Пример: username:password@2sip.test.tld
Многие провайдеры требуют указывать и номера DID, например: username:password@2sip.test.tld/1234567, где 1234567 номер DID, назначаемый в Inbound Rotes

FreePBX

Asterisk 13 + Opus VP8

$
0
0

Asterisk 13 + Opus VP8

Codec OPUS

 apt-get install -y libopus-dev opus-tools
wget https://github.com/seanbright/asterisk-opus/archive/asterisk-13.3.zip -O opus-asterisk13.zip &&
unzip opus-asterisk13.zip &&
rm -f opus-asterisk13.zip &&
cp asterisk-opus-asterisk*/codecs/* asterisk-13*/codecs/ &&
cp asterisk-opus-asterisk*/formats/* asterisk-13*/formats/ &&
cp asterisk-opus-asterisk*/asterisk.patch asterisk-13*/ &&
cd asterisk-13* &&
patch -p1 < ./asterisk.patch &&
./bootstrap.sh &&
cd /usr/src
2016/11/26

Установка Asterisk + Opus

https://github.com/seanbright/asterisk-opus

Начиная с версии Asterisk 14 OPUS входит в стандартную поставку Asterisk.
Asterisk14+Opus


Установка Asterisk 13 + FreePBX 13 на CentOS 7

$
0
0

Установка Asterisk 13 + FreePBX 13 на CentOS 7

CentOS 7 64-bit Asterisk 13, FreePBX 13 , libpri, DAHDI, Mysql (mariadb), apache2, lame, php, httpd.conf, php.ini

Выключение SELinux

sed -i s/SELINUX=enforcing/SELINUX=disabled/g /etc/selinux/config

Зависимости

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install -y kernel-devel kernel-headers
yum install -y e2fsprogs-devel  keyutils-libs-devel krb5-devel libogg \
libselinux-devel libsepol-devel libxml2-devel libtiff-devel gmp php-pear \
php php-gd php-mysql php-pdo php-mbstring ncurses-devel \
mysql-connector-odbc unixODBC unixODBC-devel \
audiofile-devel libogg-devel openssl-devel zlib-devel  \
perl-DateManip sox git wget net-tools psmisc
yum install -y gcc gcc-c++ make gnutls-devel \
libxml2-devel ncurses-devel subversion doxygen \
texinfo curl-devel net-snmp-devel neon-devel  \
uuid-devel libuuid-devel sqlite-devel sqlite \
speex-devel gsm-devel libtool libtool-ltdl libtool-ltdl-devel 

Сделайте полный апдейт

 yum update -y

Перезагрузите компьютер

 reboot

Установка mysql (mariadb)

1: Установим mariadb (MySQL)

 yum -y install mariadb-server mariadb mariadb-devel

2: Запустим и включим автозагрузку mariadb (MySQL)

 systemctl start mariadb.service
 systemctl enable mariadb.service

3: Запустим интерактивный конфигуратор (будет предложено задать пароль пользователя root для mysql и др.)

 mysql_secure_installation

показать

показать

Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] n
 ... skipping.

By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

Установите PearDB

 pear uninstall db
 pear install db-1.7.14

SRTP

  cd /usr/src && wget http://srtp.sourceforge.net/srtp-1.4.2.tgz 
tar zxvf srtp-1.4.2.tgz && 
cd srtp && autoconf && 
./configure CFLAGS=-fPIC --prefix=/usr && 
make && 
make runtest && 
make install

Pjproject

 cd /usr/src && git clone https://github.com/asterisk/pjproject pjproject 
cd pjproject/ && 
./configure --libdir=/usr/lib64 --prefix=/usr --enable-shared --disable-sound --disable-resample --disable-video &&
make dep &&
make &&
make install &&
ldconfig &&
ldconfig -p | grep pj

Вывод ldconfig -p | grep pj

Вывод ldconfig -p | grep pj

        libpjsua.so (libc6,x86-64) => /usr/lib/libpjsua.so
        libpjsip.so (libc6,x86-64) => /usr/lib/libpjsip.so
        libpjsip-ua.so (libc6,x86-64) => /usr/lib/libpjsip-ua.so
        libpjsip-simple.so (libc6,x86-64) => /usr/lib/libpjsip-simple.so
        libpjnath.so (libc6,x86-64) => /usr/lib/libpjnath.so
        libpjmedia.so (libc6,x86-64) => /usr/lib/libpjmedia.so
        libpjmedia-videodev.so (libc6,x86-64) => /usr/lib/libpjmedia-videodev.so
        libpjmedia-codec.so (libc6,x86-64) => /usr/lib/libpjmedia-codec.so
        libpjmedia-audiodev.so (libc6,x86-64) => /usr/lib/libpjmedia-audiodev.so
        libpjlib-util.so (libc6,x86-64) => /usr/lib/libpjlib-util.so
        libpj.so (libc6,x86-64) => /usr/lib/libpj.so

libjansson

 cd /usr/src && wget http://www.digip.org/jansson/releases/jansson-2.5.tar.gz
tar zvxf jansson-2.5.tar.gz && 
cd jansson-2.5 && 
./configure --prefix=/usr/ && 
make clean && 
make && 
make install && 
ldconfig

Исходники

cd /usr/src &&  
wget http://sourceforge.net/projects/lame/files/lame/3.98.4/lame-3.98.4.tar.gz &&
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz &&
wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.5.0.tar.gz &&
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz

Lame

cd /usr/src && 
tar zxvf lame-3.98.4.tar.gz && 
cd lame-3.98.4 && 
./configure && 
make && 
make install 

DAHDI & LibPRI

 yum install "kernel-devel-uname-r == $(uname -r)"
cd /usr/src && 
tar xvfz dahdi-linux-complete-current.tar.gz && 
cd dahdi-linux-complete-* && 
make all && 
make install && 
make config
cd /usr/src && 
tar xvfz libpri-1.5.*.tar.gz && 
cd /usr/src/libpri-1.5.* && 
make && 
make install

SpanDSP

cd /usr/src && wget http://soft-switch.org/downloads/spandsp/spandsp-0.0.6.tar.gz
tar zxvf spandsp-0.0.6.tar.gz && 
cd spandsp-0.0.6 && 
./configure && 
make && 
make install &&
ln -s /usr/local/lib/libspandsp.so.2 /usr/lib64/libspandsp.so.2

Asterisk 13

cd /usr/src && 
tar xvfz asterisk-13*.tar.gz &&
cd asterisk-13.* &&
./configure --libdir=/usr/lib64 &&
contrib/scripts/get_mp3_source.sh &&
make menuselect

Asterisk 12

Asterisk 12

cd /usr/src && 
tar xvfz asterisk-12-current.tar.gz &&
cd asterisk-12.* &&
./configure --libdir=/usr/lib64 &&
contrib/scripts/get_mp3_source.sh &&
make menuselect

После ввода команды make menuselect, вам будет предложено выбрать устанавливаемые модули. Большинство требуемых модулей выбираются автоматически. Для поддержки mp3 включите модуль 'format_mp3'

 --->  Add-ons (See README-addons.txt)  
             --- extended ---
             XXX chan_mobile
             [*] chan_ooh323
             [*] format_mp3
             [*] res_config_mysql
             --- deprecated ---
             [*] app_mysql
             [*] app_saycountpl
             [*] cdr_mysql

  ---> Core Sound Packages
            [*] CORE-SOUNDS-RU-GSM
  --->  Extras Sound Packages
            [*] EXTRA-SOUNDS-EN-GSM  
make && make install && make config && ldconfig
 sed -i 's/ASTARGS=""/ASTARGS="-U asterisk"/g'  /usr/sbin/safe_asterisk

Создайте пользователя Asterisk и задайте права пользователя.

useradd -m asterisk &&
chown asterisk.asterisk /var/run/asterisk &&
chown -R asterisk.asterisk /etc/asterisk &&
chown -R asterisk.asterisk /var/{lib,log,spool}/asterisk &&
chown -R asterisk.asterisk /usr/lib64/asterisk 

Настроим httpd (Apache)

cp /etc/php.ini /etc/php.ini_orig &&
sed -ie 's/\;date\.timezone\ \=/date\.timezone\ \=\ "Europe\/Moscow"/g' /etc/php.ini &&
sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php.ini &&
cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf_orig &&
sed -i 's/^\(User\|Group\).*/\1 asterisk/' /etc/httpd/conf/httpd.conf &&
sed -i 's/AllowOverride None/AllowOverride All/'  /etc/httpd/conf/httpd.conf &&
systemctl restart httpd &&
systemctl enable httpd

FreePBX

freepbx13

pear install Console_Getopt
cd /usr/src &&
wget http://mirror.freepbx.org/modules/packages/freepbx/freepbx-13.0-latest.tgz
tar zxvf freepbx-13.0-latest.tgz &&
cd freepbx &&
./start_asterisk start
 ./install -n

Подключимся к FreePBX

http://IP.Address.FreePBX.Server/admin

Первым делом, вам будет предложено задать имя пользователя и пароль FreePBX

freepbx start set user login

Can Not Connected To Asterisk

Если появится предупреждение Can Not Connected To Asterisk, а Asterisk точно запущен, закомментируйте инклюды в файле /etc/asterisk/manager.conf

;#include manager_additional.conf
;#include manager_custom.conf

Установка Asterisk

Настройка SIP в Asterisk 13 sip.conf

$
0
0

Настройка SIP в Asterisk 13 sip.conf

Файл конфигурации 'sip.conf' отвечает за настройку внутренних и внешних каналов SIP.

Asterisk не делает различий между внутренними и внешними линиями, любой вызов совершается через какой-либо канал.

Конфигурация пиров осуществляется при помощи текстовых блоков, отделенных друг от друга квадратными скобками. Имя в квадратных скобках, как правило совпадает с параметром 'username', но не обязательно.

[имя_пира]
type=peer, user или friend
параметр1=значение
параметр2=значение

Где имя_пира - это произвольное имя SIP устройства, на которое можно ссылаться из других конфигурационных файлов. Параметр type может принимать одно из трех значений: type = value

* peer: SIP пир, который Asterisk может использовать для совершения исходящих вызовов.

* user: SIP пир, для входящих вызовов Asterisk .

* friend: Запись, которая одновременно и user и peer. Этот тип наиболее подходит для телефонов и других устройств. Для SIP пользователей этого типа Asterisk создаст два объекта, один типа peer и один типа user, с одинаковыми именами.

Если клиент типа _peer_ (тип _friends_ включает в себя _peer_) определен с параметром host=dynamic, то он должен зарегистрироваться на Asterisk, для того, чтобы сервер мог найти его (IP адрес или имя хоста), и для того, чтобы сервер знал, что данный клиент доступен для совершения вызовов в его сторону.

Регистрация на сервере ITSP - провайдера VoIP телефонии

В файле конфигурации sip.conf в секции [general] добавьте определение register:

Формат:

register => user [:secret[:authuser]] @host [:port] [/extension]

Пример:

Зарегистрировать 3216111 у sip провайдера, как номер 1234567 на Asterisk.

   register => 3216111:userID:PASSWORD@sipppnet.ru/1234567
  • user - идентификатор пользователя, используемый для SIP сервера (например, 3216111)
  • authuser - не обязательное имя пользователя для авторизации на SIP сервере
  • secret - пароль пользователя
  • host - имя домена или хоста SIP сервера. Этот SIP сервер должен быть определен в своей секции файла sip.conf, где должны быть заданы его параметры (sipnet.ru).
  • port - на какой номер порта посылать запросы на регистрацию на сервере host. По умолчанию - 5060
  • /1234567 - номер екстеншена для приема вызовов в Вашем Asterisk. 1234567 - вставляется в SIP заголовок contact, SIP запроса на регистрацию. Этот екстеншен используется удаленным SIP сервером, когда ему необходимо совершить вызов в сторону Вашего Asterisk. Смотри примеры, приведенные ниже. По умолчанию, используется контекстный «s».

Вам необходимо регистрироваться, только если:

  • Если должна быть возможность позвонить к Вам.
  • Если одна из сторон имеет динамический IP адрес.

Наиболее используемые CLI команды для проверки:

  • sip show peers Отобразить все пиры ( включая friends)
  • sip show registry Отобразить статус регистраций на удаленном UAS.
  • sip set debug on Показывать все SIP сообщения.
  • sip reload Перечитать конфигурационный файл.
  • sip show settings Показать текущую конфигурацию chan_sip.

Для получения подробной информации о командах CLI Asterisk 13смотрите Asterisk CLI - интерфейс командной строки.

Пример конфигурации транка, для совершения исходящих вызовов:

[sipppnet-out]
host=sipppnet.ru
username=userID
secret=PASSWORD
fromuser=userID
fromdomain=sipppnet.ru
type=peer
disallow=all
allow=alaw
allow=ulaw
allow=g729
nat=force_rport
directmedia=nonat
insecure=port,invite
dtmfmode=info
context=from-sipppnet

В диалплане (extensions.conf) можно использовать разнообразный синтаксис для вызова (набора) SIP устройств.

   * SIP/devicename
   * SIP/username@domain   (SIP uri)
   * SIP/username[:password[:md5secret[:authname[:transport]]]]@host[:port]
   * SIP/devicename/extension
   * SIP/devicename/extension/IPorHost
   * SIP/username@domain//IPorHost

В файле extensions.conf, для совершения исходящих вызовов, у Вас должно присутствовать правило набора, примерно такого вида:

exten => _9.,1,Dial(SIP/${EXTEN:1}@sipppnet-out,30,r)

Переменная ${EXTEN:1} получает номер екстеншена и удаляет первую цифру- '9'. Подробная информация приведена в Asterisk Dialplan - extensions.conf.

Пример контекста для входящих вызовов в файле 'extensions.conf':

[from-sipppnet]
exten => 3216111,1,Dial(SIP/100&SIP101,180,tr)

Настройка SIP пира для регистрации абонентов на Asterisk

Как уже отмечалось Asterisk не делает особых различий между транками и абонентами, поэтому конфиг телефона будет похож на SIP транк, но все же немного другой.

[777]
host=dynamic
type=friend
secret=**password**
qualify=yes
nat=no
port=5061
directmedia=no
context=from-internal
disallow=all
allow-alaw
allow=ulaw
alow=gsm
deny=0.0.0.0/0.0.0.0
permit=192.168.0.0/255.255.0.0
username=777
fromuser=777
dial=SIP/777
mailbox=777@device
call-limit=2
callcounter=yes
faxdetect=no
callgroup=1
pickupgroup=1

Рассмотрим некоторые опции:

  • host - dynamic или ip адрес с которого подключается абонент.
  • type - для абонентского пира это обычно friend
  • secret - пароль, использование сложных паролей убережет вас от многих неприятностей, даже если вы считаете сеть безопасной, в дальнейшем все может измениться и ваша предусмотрительность окажется очень кстати.
  • qualify - посылать SIP запросы OPTIONS для проверки доступности устройства (возможно это является избыточным, т.к. большинство устройств сами обновляют регистрацию, через заданный в настройках интервал)
  • nat - если телефон находится в локальной сети то 'no', если регистрируется из интернет или другой интра сети, то 'force_rport'
    • nat = no - без NAT RFC3581
    • nat = force_rport - использовать rport, даже если его нет
    • nat = comedia - отправить медиа поток на порт Asterisk 12, независимо от указаний SDP.
    • nat = auto_force_rport - установить 'force_rport' параметр если Asterisk обнаружил NAT (по умолчанию)
    • nat = auto_comedia - установить 'comedia' параметр если Asterisk обнаружил NAT
  • directmedia - направлять медиа поток (RTP трафик) через сервер или напрямую между каналами (пирами).

см. также по теме:NAT, SIP и Asterisk

  • port - порт SIP сигнализации устройства (не путайте c bindport asterisk, который для данного драйвера SIP в Asterisk может быть только один, 5060 по умолчанию, но для нового драйвера Asterisk pjsip.conf, может, или даже должен, быть назначен уникальный порт для каждого транспорта)
  • deny - сети из которых запрещено подключение
  • permit - сети из которых разрешено подключение (если абонент находится в локальной сети, назначьте ему параметр permit=192.168.1.0/255.255.255.0 и регистрация на этом пире будет разрешена только из этой подсети. ACLочень действенная мера безопасноcти. См. также Asterisk:acl.conf
  • call-limit -сколько одновременных вызовов (concurrent calls) может производится через данный канал. Хорошая идея, как для локальных так и для удаленных абонентов. Если пир взломан, злоумышленники не смогут пропустить через канал больше указанного кол-ва вызовов зараз(ы).

'call-limit' опция признана устаревшей и заменена на 'callcounter'. Установить ограничение одновременных вызовов теперь можно переменной канала function 'GROUP_COUNT'
пример использования данного метода можно помотреть здесь: Ограничение количества одновременных вызовов по набранному номеру.

Настройка нескольких SIP пиров по шаблону

Если у вас множество SIP пиров, которые имеют общие настройки и отличаются например, только 'username' и 'secret', можно создать шаблон.
Для этого надо создать шаблонный пир, а рядом с его именем в квадратных скобках, написать восклицательный знак в круглых скобках и задать общие настройки:

[local_pattern](!)
host=dynamic
type=friend
context=from-internal
nat=no
disallow=all
allow=ulaw
allow=alaw

А затем определить уникальные свойства пиров, добавив рядом с именем каждого пира, имя общего шаблона в круглых скобках:

[776](local_pattern)
username=776
secret=super_puper_secret_1
callerid=8123216111
[777](local_pattern)
username=777
secret=super_puper_secret_2
callerid=8121234567

Asterisk sip.conf General SIP Options

Общие SIP Параметры

Следующие параметры используются в общей [general] секции sip.conf:

allowexternalinvites

Если установлено 'no', запрещает INVITE и REFER от внешних (не из localnet) доменов. См domain

 allowexternalinvites=yes|no
allowguest

Если 'no', запрещает гостевые(без аутентификации) подключения. По умолчанию sipguest подключения разрешены.

 allowguest=no|yes
allowoverlap

Вкл. или Выкл набор по одной цифре (т.е. каждая набранная цифра будет сразу отправляться в канал)

 allowoverlap=no|yes
allowsubscribe

Разрешить ли внешним устройствам подписку (SUBSCRIBE) на информацию о статусе екстеншена. По умолчанию - 'yes':

 allowsubscribe=yes|no
allowtransfers

Когда установлено 'no', запрещает любые трансферы, если не переопределено в настройках пира.

 allowtransfers=no|yes
alwaysauthreject

Если включено, всегда отвечает на INVITE и REGISTER, SIP сообщением 401 Unauthorized, вместо того чтобы сообщить вызывающему о существовании запрашиваемого user или peer. Важная настройка безопасности

alwaysauthreject=no|yes
autodomain

Установите эту опцию 'yes', чтобы добавить локальное HOSTNAME и локальный IP адрес в список доменов:

 autodomain=yes|no
bindaddr and bindport

Эти параметры определяют IP адрес и порт на которых Asterisk будет слушать SIP запросы. Для драйвера канала SIP Asterisk 'chan_sip' можно назначить только один адрес и порт для всех подключений для UDP и один порт для TCP транспорта, в отличии от нового драйвера PJSIP. По умолчанию адрес не задан и лучше так и оставить. Некоторые рекомендуют изменять порт по умолчанию 5060, на другой, в целях безопасности. Но помните, что это только одна из мер безопасности, не самая важная, и не гарантирует вам полной защиты от злоумышленников.

bindaddr=0.0.0.0
bindport=5060

Вы можете задать независимые для UDP, TCP и TLS транспорта значения udpbindadd, tcpbindaddrи tlsbindaddr

buggymwi

Вкл. эту опцию, чтобы избежать ошибок при сообщении с некоторыми ip телефонами при отправке MWI сообщений.

buggymwi=no|yes
callevents

Установите 'yes', если хотите генерировать информацию о SIP событиях для AMI (asterisk manager interface)

 callevents=yes
checkmwi

Время в секундах, между проверками голосовой почты :

 checkmwi=30
compactheaders

Использовать или нет компактные SIP заголовки.

 compactheaders=yes|no
defaultexpiry

Срок действия регистрации в секундах для входящих и исходящих регистраций. При входящей регистрации, этот параметр задается клиентской стороной, и заданное здесь значение используется, только если клиент не сообщил свое занчение. Для исходящих регистраций этот параметр сообщается удаленной стороне UAS (user agent server)

 defaultexpiry=300
directrtpsetup

Данная опция позволяет управлять RTP соединением между двумя оконечными точками без re-INVITE(экспериментальная опция, используйте на свой страх и риск).

 directrtpsetup=yes|no
domain

Задает имя домена сервера Asterisk по умолчанию. Командой CLI 'sip show domains' выводится список локальных доменов.

 domain=example.com
dumphistory

Вкл. или Выкл. отчет в завершении SIP диалога. SIP history выводится в DEBUG лог канала.

 dumphistory=yes|no
externhost

Когда Asterisk находится за NAT, SIP заголовок обычно использует IP адрес сервера. Если включить данную опцию, Asterisk будет производить периодические DNSопросы для определения имени хоста и заменять IP адрес на 'externhost'.

 externhost=my.hostname.tld

Используйте externip.

externip

externip содержит IP адрес в качестве аргумента. Если Asterisk находится за NAT, SIP заголовок Contact: содержит внутренний IP адрес сервера, тогда удаленная сторона не знает куда отправлять ответы. Параметр externip вкупе с параметром nat=force_rport модифицирует SIP заголовок, сообщая удаленному SIP серверу адрес на который надо слать ответы:

 externip=123.123.123.123
externrefresh

Если все же используется 'externhost', указывает промежуток времени в секундах между запросами DNS.

 externrefresh=30
g726nonstandard

Значения: yes/no, по умолчанию: no. Если клиент собирается для сеанса связи «договориться» использовать звуковой кодек G726-32, с использованием компрессии AAL2, вместо RFC3551 (что требуется для аппаратов фирмы Sipura и шлюзов от Grandstream, и может другим). То это противоречит спецификации RFC3551, клиент должен вместо этого «договориться» использовать AAL2-G726-32

 g726nonstandard=yes
ignoreregexpire (global)

Если ignoreregexpire установлен 'yes', Asterisk сделает одно из двух, в зависимости от настроек пиров: 1)Non-realtime peer Когда регистрация истекает, информация не удаляется из памяти или БД Asterisk и вызовы будут разрешены несмотря на то, что время регистрации истекло.

2)Realtime peers Когда peer сконфигурирован в режиме реального времени, информация о регистрации используется независимо от defaultexpiry

 ignoreregexpire=yes|no
jbenable

Вкл. поддержку RTP jitter buffer на принимающей стороне канала SIP. По умолчанию 'no'. Будет работать, только если удаленная сторона поддерживает эту функцию. подробнее о Джиттер

 jbenable=yes|no
jbforce

Принудительное использование jitter buffer принимающей стороной SIP канала.

 jbforce=yes|no
jbimpl

Использовать фиксированный или подстраиваемый (адаптивный) jitter buffer. fixed jitter buffer всегда использует значение из jbmaxsize adaptive может принимать значение больше jbmaxsizeПо умолчанию 'fixed':

 jbimpl=fixed|adaptive

Из личного опыта, вкл. 'adaptive' может приводить к весьма плачевным результатам.

jblog

Вкл./выкл jitter buffer frame лог. По умолчанию 'no':

 jblog=yes|no
jbmaxsize

Установите максимальную длину буфера в миллисекундах:

 jbmaxsize=200
jbresyncthreshold

Джиттер буфер порог синхронизации. По умолчанию 1000:

 jbresyncthreshold=1000
icesupport

Использовать Interactive Connectivity Establishment (ICE) в Asterisk

 icesupport=no
limitonpeers

Применять call-limit только для type=peer Это улучшит использование call-limit для устройств настроенных, как type=friend, отделив ограничение call-limit от входящих вызовов.

 limitonpeers=yes|no
localnet

укажет серверу Asterisk какие подсети являются локальными, прозрачными для использования IP адресов сервера, SIP запросы к которым не требуют модификации поля Contact: c использованием externipили externhost

 localnet=192.168.1.0/24
 localnet=172.16.0.0/16
matchexterniplocally

Сверять 'externip' с 'localnet' и производить подстановку, только если 'externip' из локальной подсети. Не совсем ясно, зачем это может понадобиться? Возможно при очень нестандартной топологии сети.

 matchexterniplocally=yes|no
maxexpiry

Максимальная продолжительность регистрации в секундах.

 maxexpiry=3600
minexpiry

Минимальная продолжительность регистрации в секундах.

 minexpiry=60
notifymimetype

Указывает MIME тип используемый для message-waiting indication (MWI) в SIP NOTIFY сообщении.

 notifymimetype=text/plain
notifyringing

Сообщать подписчикам о состоянии вызов (RINGING):

 notifyringing=yes|no
notifyhold

Сообщать подписчикам (subscribers) о состоянии удержание (HOLD):

 notifyhold=yes|no
pedantic

Скурпулезная проверка SIP сообщений. Устанавливает более строгую проверку по стандартам SIP RFC.

 pedantic=yes
realm

Данная установка используется для аутентификации в SIP. Задайте realm полное доменное имя вашего сервера. Имя должно быть совершенно уникальным.

 realm=mybox.example.com
recordhistory

Вкл. или Выкл историю sip для всех каналов.

 recordhistory=yes|no
registerattempts

Сколько попыток внешних регистраций произведет Asterisk, прежде чем откажется от продолжения. По умолчанию стоит '0', что значит бесконечно.

 registerattempts=0
registertimeout

Таймаут между попытками регистрации на другом устройстве.

 registertimeout=30
relaxdtmf

Если плохо распознаются DTMF сигналы, включите данную опцию.

 relaxdtmf=yes|no
rtautoclear

(global) Конфигурация Realtime PeersУказывает должен ли Asterisk обнулять созданные на лету friends по истечении времени регистрации. Если установлено 'yes', по истечении срока регистрации, удалять friends до нового запроса. Если задано число, то оно используется вместо обычного времени регистрации.

rtautoclear=yes|no|seconds
rtcachefriends

(global)

Если rtcachefriends включен, Asterisk будет кэшировать friends(реалтайм пиры), которые приходят из realtime engine, так же, как если бы они сконфигурированы в «sip.conf».

 rtcachefriends=yes|no
rtsavesysname

(global) Определяет, должен ли Asterisk сохранить SystemName в базе данных в режиме реального времени во время регистрации:

 rtsavesysname=yes|no
rtupdate

(global) Если установлено 'yes' Asterisk будет обновлять IP-адрес, порт и период регистрации пиров при регистрации. По умолчанию 'yes':

 rtupdate=yes|no
sipdebug

Указывает, должен или нет Asterisk включать SIP debug сразу при загрузке драйвера канала SIP.

 sipdebug=yes|no
sendrpid

ОТправлять или нет Remote-Party-ID header:

 sendrpid=yes|no
srvlookup

Записи DNS SRV являются одним из способов указания адреса для связи сервером. Используя записи SRV, вы получаете многие преимущества DNS, в то время как отключения SRV DNSлишает вас возможности принимать SIP вызовы на основании доменных имен. В настоящее время поддержка записей SRV в Asterisk несколько хромает. Если несколько записей SRV возвращаются, Asterisk будет использовать только первую запись. Чтобы включить, установите srvlookup = yes в секции [general] файла sip.conf:

 srvlookup=yes
transport

Задает транспорт по умолчанию. По умолчанию 'udp', но может быть 'tcp', 'tls', 'ws' или 'wss'. Если задано TCP а tcpenable=no будет использован UDP транспорт.

transport=udp
tcpenable

Включить поддержку TCP транспорта chan_sip Asterisk.

 tcpenable=yes
tcpbindaddr

Адрес на котором Asterisk «слушает» TCP подключения.

  IPv4 example: bindaddr=0.0.0.0:5062
  IPv6 example: bindaddr=[::]:5062
tcpauthtimeout

tcpauthtimeout указывает максимальное время в секундах данное клиенту на аутентификацию. Если за заданное время клиент не прошел проверку он отключается. (По умолчаннию 30 секунд)

 tcpauthtimeout = 30
tcpauthlimit

Максимальное кол-во неаутентифицированных сессий в момент любой времени.

 tcpauthlimit = 100
t1min

Минимальная задержка туда-обратно (minimum round-trip) для сообщения контролируемого хоста. По умолчанию 100 миллисеунд:

 t1min=100
subscribecontext

Ограничить запросы SUBSCRIBE только указанным контекстом, если не переопределено в настройках пира.

 subscribecontext=internal
t38pt_udptl

Установка t38pt_udptl 'yes' вкл. T.38 fax (UDPTL) насквозь (passthrough) для SIP-to-SIP вызовов с поддержкой T.38. Эта настройка включается глобально для всех устройств, но вы можете отключить её для конкретного устройства.

 t38pt_udptl=yes|no

T.38 fax passthrough работает только для SIP-to-SIP вызовов, любые local или agent каналы не могут быть использованы.

tos_sip, tos_audio, andtos_video

Asterisk может установить TOS bits в IP заголовках для помощи маршрутизаторам приотеризации трафика. tos_sip, tos_audio, и tos_video установки управляют TOS битами для SIP сообщений, RTP аудио и RTP видео, соответственно. Поддерживаются: CS0, CS1, CS2, CS3, CS4, CS5, CS6, CS7, AF11, AF12, AF13, AF21, AF22, AF23, AF31, AF32, AF33, AF41, AF42, AF43. Можно также использовать цифровые значения для TOS битов.

trustrpid

Доверять или нет Remote-Party-ID header: Asterisk SIP trustrpid

 trustrpid=yes|no
useragent

Значение поля useragent в SIP заголовке. По умолчанию версия Asterisk:

 useragent=Asterisk PBX v12.4.0

Если вы не желаете сообщать, что используете Asterisk, напишите Cisco или Avaya, или abyrvalg v2.0.

usereqphone

usereqphone опция говорит Asterisk добавить «user=phone» в SIP URIs которые содержат действующий номер телефона:

usereqphone 
videosupport
2016/11/26

FreePBX 13 PJSIP Trunk

$
0
0

FreePBX 13 PJSIP Trunk

Пример данных провайдера

  • SIP user - 1234567
  • SIP password - secret
  • SIP server - sip.sprovider.ru

Asterisk 13.4.0 / FreePBX 13 (FreePBX Framework 13.0.1beta3.54)

  • Trunk Name - pjsip_test

PJSIP trunk general

freepbx13 pjsip trunk general

PJSIP Settings

freepbx13 pjsip trunk settings

freepbx13 pjsip trunk advanced

pjsip show registrations
asterisk*CLI> pjsip show registrations

 <Registration/ServerURI..............................>  <Auth..........>  <Status.......>
 =========================================================================================

 pjsip_test/sip:sip.sprovider.ru:5060                      pjsip_test        Registered
pjsip show endpoint <name>
asterisk*CLI> pjsip show endpoint pjsip_test

 Endpoint:  <Endpoint/CID.....................................>  <State.....>  <Channels.>
    I/OAuth:  <AuthId/UserName...........................................................>
        Aor:  <Aor............................................>  <MaxContact>
      Contact:  <Aor/ContactUri...............................>  <Status....>  <RTT(ms)..>
  Transport:  <TransportId........>  <Type>  <cos>  <tos>  <BindAddress..................>
   Identify:  <Identify/Endpoint.........................................................>
        Match:  <ip/cidr.........................>
    Channel:  <ChannelId......................................>  <State.....>  <Time(sec)>
        Exten: <DialedExten...........>  CLCID: <ConnectedLineCID.......>
 =========================================================================================

 Endpoint:  pjsip_test                                            Not in use    0 of inf
    OutAuth:  pjsip_test/1234567
        Aor:  pjsip_test                                          0
      Contact:  pjsip_test/sip:12345670@sip.sprovider.ru:5060     Avail            78.715
  Transport:  0.0.0.0-udp               udp      0      0  0.0.0.0:5077
   Identify:  pjsip_test/pjsip_test
        Match: 123.123.123.123/32


 ParameterName                 : ParameterValue
 =====================================================
 100rel                        : yes
 accountcode                   :
 aggregate_mwi                 : true
 allow                         : (g729|alaw|ulaw|g726)
 allow_subscribe               : true
 allow_transfer                : true
 aors                          : pjsip_test
 auth                          :
 call_group                    :
 callerid                      : <unknown>
 callerid_privacy              : allowed_not_screened
 callerid_tag                  :
 connected_line_method         : invite
 context                       : from-sprovider
......

<spoiler>

Configuration Mode:

Simple/Advanced

Permanent Auth Rejection:

v

Retry Interval:

60

Expiration:

3600

Forbidden Retry Interval:

10

Max Retries:

10

Qualify Frequency:

60

Username:

Secret:

SIP Server:

SIP Server Port:

Advanced options

Client URI:

Server URI:

AOR Contact:


Outbound Proxy:

Contact User:

Context:

Transport:

0.0.0.0-udp

Codecs:

ulaw
alaw
g722

Пример настройки SIP транка chan_pjsip для соединения с другим сервером Asterisk

FreePBX 13 установка

Asterisk Realtime: extconfig.conf

$
0
0

Asterisk Realtime: extconfig.conf

Реалтайм Архитектура Asterisk - набор драйверов и функций для конфигурации в режиме реального времени. Существует два типаконфигурации - статический и динамический:

  1. Статический хранит конфигурации в БД, как конфигурационные файлы и также обновляет данные при перезагрузке модулей.
  2. Динамический используется для создания и обновления объектов в режиме реального времени, при совершении вызовов.

Оба режима могут использоваться одновременно.

Реалтайм архитектура поддерживает разные типы хранилищ. В данный момент, большинство драйверов основаны на SQL, но есть и поддержка других методов, например LDAP и CURL.

В данный момент поддерживаются следующие бэкенды:

  • ODBC: интегрированная в Asterisk UnixODBC подсистема поддерживает множество разных БД.
  • MySQL: нативная поддержка MySQL, интегрирована в Asterisk
  • PostgreSQL: нативная поддержка PostgreSQL, интегрирована в Asterisk
  • SQLite и SQLite3: для небольших БД можно использовать SQLite3.
  • LDAP: получайте учетные данные из LDAP директорий.
  • cURL: Получайте и отправляйте данные веб приложениям и связанным с ними БД.

Статическая конфигурация

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

Все настройки записываются под одной категорией - [settings]

Конфиг ⇒ Драйвер БД, имя категории из конфига драйвера res_<driver>, таблица базы данных. Если таблица не указана, будет использовано имя конф. файла.

file.conf => driver,category DB res_....conf[,table[,priority]]

Пример записи для загрузки 'queues.conf' через ODBC и 'extensions.conf' из SQlite:

 queues.conf => odbc,asterisk,ast_config
 extensions.conf => sqlite,asterisk,ast_config

Следующие конфиги НЕ МОГУТбыть использованы в реалтайм хранилище:

  • asterisk.conf
  • extconfig.conf (данный файл)
  • logger.conf

Также, некоторые конфиги не загрузятся из Realtime хранилища, если драйвер БД (хранилища) не был, ранее, загружен оператором 'preload' в конфиге 'modules.conf':

  • manager.conf
  • cdr.conf
  • rtp.conf
  • features.conf
  • cel.conf
  • indications.conf

Списки контроля доступа (ACL) также не смогут быть использованы в manager.conf без предварительной загрузки драйвера хранилища. /etc/asterisk/modules.conf

[modules]
preload => res_odbc.so
preload => res_config_odbc.so

Структура таблицы статической базы данных

Структура статической таблицы БД реалтайм архитектуры Asterisk значительно отличается от, собственно, Realtimeтаблиц. Она предполагает единую схему для всех подключаемых конфигов.

static ast_config.sql

create table ast_config (
 id int(11) NOT NULL auto_increment,
 cat_metric int(11) NOT NULL default '0',
 var_metric int(11) NOT NULL default '0',
 commented int(11) NOT NULL default '0',
 filename varchar(128) NOT NULL default '',
 category varchar(128) NOT NULL default '',
 var_name varchar(128) NOT NULL default '',
 var_val varchar(128) NOT NULL default '',
 PRIMARY KEY (id),
 KEY `filename_comment` (`filename`,`commented`)
)ENGINE = InnoDB;
  • 'cat_metric' и 'var_metric' определяют порядок (очередность). 'cat_metric' во всей конфигурации, а 'var_metric', внутри категории. Метрика с меньшим значением представляется раньше, метрика с большим позднее. На примере порядка выбора кодеков в sip.conf, это будет работать так: 'disallow=all' - метрика 0 представляется 1-й, затем 'allow=alaw' - метрика 1 и далее 'allow=g729'
  • Если поле 'commented' не равно '0', строка считается закомметированной и игнорируется.
  • `filename` - Конфиг которому предназначены данные (например extensions.conf).
  • 'category' - контекст диалплана или категория конфига.
  • `var_name` - опция (параметр) конфига, напрмер extenв диалплане.
  • `var_val` - собственно данные, после знака '⇒' в конфиге.

Пример статической конфигурации extensions.conf

extconfig.conf

 extensions.conf => odbc,asterisk,ast_config

Опции и диалплан в extensions.conf:

[general]
static=yes

[globals]
RECDIR=/mnt/record	; Директория записи

[from-internal]
exten => _9X.,1,Dial(PJSIP/${EXTEN:1}@trunk,60,trU(sub-monitor,s,1)
exten => _9X.,n,Hangup
[sub-monitor]
exten => s,1,Noop(**rec to mount**)
exten => s,n,MixMonitor(${RECDIR}/${UNIQUEID}.wav)
exten => s,n,Return

В таблице ast_config будут представлены так:

MariaDB [asterisk]> select * from ast_config;
+----+------------+------------+-----------+-----------------+---------------+----------+--------------------------------------------------------------------+
| id | cat_metric | var_metric | commented | filename        | category      | var_name | var_val                                                            |
+----+------------+------------+-----------+-----------------+---------------+----------+--------------------------------------------------------------------+
|  1 |          0 |          0 |         0 | extensions.conf | general       | static   | yes                                                                |
|  2 |          1 |          0 |         0 | extensions.conf | globals       | RECDIR   | /mnt/record                                                        |
|  3 |          2 |          0 |         0 | extensions.conf | from-internal | exten    | _9X.,1,Dial(PJSIP/${EXTEN:1}@siptrunk,60,trU(sub-monitor,s,1) |
|  4 |          2 |          1 |         0 | extensions.conf | from-internal | exten    | _9X.,n,Hangup                                                 |
|  5 |          3 |          0 |         0 | extensions.conf | sub-monitor   | exten    | s,1,Noop(**rec to mount**)                                         |
|  6 |          3 |          1 |         0 | extensions.conf | sub-monitor   | exten    | s,n,MixMonitor(${RECDIR}/${UNIQUEID}.wav)                          |
|  7 |          3 |          2 |         0 | extensions.conf | sub-monitor   | exten    | s,n,Return                                                         |
+----+------------+------------+-----------+-----------------+---------------+----------+--------------------------------------------------------------------+
7 rows in set (0.00 sec)

Реалтайм конфигурация

Работа в режиме реального времени. Любые изменения в реалтайм хранилище, используются системой при новых вызовах, без перезагрузки модулей и применения настроек. Данные реалтайм хранилищ, могут модифицироваться во время выполнения диалплана, при помощи встроенных функций.

Конфигурация вызывает заданное семейство реалтайм в формате: драйвер базы данных, имя категории из конфига драйвера res_<driver>, таблица БД, приоритет (если таблица не задана, будет использовано имя семейства (family)): family => Driver DB,category DB res_...conf[,Table][,prioritet]

example => odbc,asterisk,alttable,1
example => mysql,asterisk,alttable,2
example2 => ldap,"dc=oxymium,dc=net",example2

Приоритет - необязательный параметр , применяется в случае ошибки получения данных. Если соединению с приоритетом 1 не удалось получить данные, будет произведена попытка получить данные через соединение с приоритетом 2. Приоритеты должны быть упорядочены: 1,2,3, но не 1,2,4

Доступные бакенды

  • odbc … res_config_odbc
  • sqlite … res_config_sqlite
  • sqlite3 … res_config_sqlite3
  • pgsql … res_config_pgsql
  • curl … res_config_curl
  • ldap … res_config_ldap
  • mysql … res_config_mysql (через add-ons в menuselect)

В конфигах res_pgsqlи res_config_sqliteБД назначаются в категории [general] и всегда используется эта БД. В res_config_mysqlБД тоже назначается в секции [general], но можно указать несколько баз данных (см. конфиг mysql)

Использование и подключение

Созданные семейства реалтайм можно подключать директивой switch ⇒ в диалплане, как в случае с extensions.conf:

 [default]
 switch => Realtime/mycontext@extensions 

или вызывать при помощи специальных функций диалплана (в описании функций, можно найти примеры):

пример extconfig.conf
  • iaxusers ⇒ odbc,asterisk
  • iaxpeers ⇒ odbc,asterisk
  • sippeers ⇒ odbc,asterisk - Asterisk 13 RealTime SIP
  • sipregs ⇒ odbc,asterisk ; (avoid sipregs if possible, e.g. by using a view)
  • ps_endpoints ⇒ odbc,asterisk
  • ps_auths ⇒ odbc,asterisk
  • ps_aors ⇒ odbc,asterisk
  • ps_domain_aliases ⇒ odbc,asterisk
  • ps_endpoint_id_ips ⇒ odbc,asterisk
  • voicemail ⇒ odbc,asterisk
  • extensions ⇒ odbc,asterisk
  • extensions ⇒ mysql,general,extensions - Asterisk Realtime Extensions with MySQL
  • meetme ⇒ mysql,general
  • queues ⇒ odbc,asterisk
  • queue_members ⇒ odbc,asterisk
  • queue_rules ⇒ odbc,asterisk
  • acls ⇒ odbc,asterisk
  • musiconhold ⇒ mysql,general
  • queue_log ⇒ mysql,general
  • queue_log ⇒ odbc,asterisk,queue_log - Asterisk: queue_log в MySQL через unixODBC

Файлы конфигурации Asterisk

Viewing all 1052 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>