Базовая конфигурация Asterisk

Сначала настроим pjsip.conf

    sudo nano /etc/asterisk/pjsip.conf
    

    Вводим:

    [transport-udp]
    type = transport
    protocol = udp
    bind = 0.0.0.0:5060
    
    [100]
    type = endpoint
    context = internal
    disallow = all
    allow = ulaw
    auth = 100
    aors = 100
    [100]
    type = auth
    auth_type = userpass
    password = 12345
    username = 100
    [100]
    type = aor
    max_contacts = 1
    
    [101]
    type = endpoint
    context = internal
    disallow = all
    allow = ulaw
    auth = 101
    aors = 101
    [101]
    type = auth
    auth_type = userpass
    password = 12345
    username = 101
    [101]
    type = aor
    max_contacts = 1
    

    Далее настроим extensions.conf

    sudo nano /etc/asterisk/extensions.conf
    

    Вводим в самом конце файла:

    [internal]
    exten => _XXX,1,Dial(PJSIP/${EXTEN})
    

    Далее перезагружаем Asterisk

    sudo systemctl restart asterisk
    

    Для мониторинга дальнейшей работы используем команду:

    sudo asterisk -rvvv
    

    И после этого смело идем настраивать MicroSIP или телефонный аппарат