ВидеоКонф(ВКС)  ::   FAQ  ::   Поиск  ::   Регистрация  ::   Вход

Почему Asterisk не отвечает клиенту IAX2 снаружи?

Проблемы и их решения Asterisk как такового

Модераторы: april22, Zavr2008

Re: Почему Asterisk не отвечает клиенту IAX2 снаружи?

Сообщение ded » 12 фев 2018, 21:39

iax.conf:

permit= ??
deny= ??
auth= ??
type=user or peer? Могли ли Вы неверно описать конфиг для этого клиента?
diwiz писал(а):Да, прописан host=dynamic
Для телефона так неверно. Эта опция для пира, который обычно другой Астериск.
diwiz писал(а): На астериске в IAX2 debug в это время ничего не происходит, абсолютно пусто
Вербозность и уровень дебага увеличьте. Должны быть видны REGREQ

Изучите все опции:
https://www.voip-info.org/wiki/view/Ast ... g+iax.conf

Можно также задампить в файл
tcpdump host 1.2.3.4 -s0 -w /tmp/iax2.pcap
и исследовать с Wireshark
ded
 
Сообщений: 15805
Зарегистрирован: 26 авг 2010, 19:00

Re: Почему Asterisk не отвечает клиенту IAX2 снаружи?

Сообщение diwiz » 12 фев 2018, 22:38

В том-то и дело, что REGREQ снаружи не приходит! В дебаге ПУСТО!!!

Вот все конфиги по IAX2:

[Показать] Спойлер:
[root@astdomus asterisk]# cd /etc/asterisk
[root@astdomus asterisk]# ls iax*
iax_additional.conf iax_custom_post.conf iax_registrations.conf
iax.conf iax_general_additional.conf iax_registrations_custom.conf
iax_custom.conf iax_general_custom.conf
[root@astdomus asterisk]# cat iax*.conf
;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make ;
; custom modifications, details at: http://freepbx.org/configuration_files ;
;--------------------------------------------------------------------------------;
;

[30]
deny=0.0.0.0/0.0.0.0
secret=********
transfer=yes
context=from-internal
host=dynamic
type=friend
port=4569
qualify=yes
dial=IAX2/30
mailbox=30@device
permit=0.0.0.0/0.0.0.0
requirecalltoken=yes
callerid=Павел моб <30>
setvar=REALCALLERIDNUM=30

[40]
deny=0.0.0.0/0.0.0.0
secret=********
transfer=yes
context=from-internal
host=dynamic
type=friend
port=4569
qualify=yes
dial=IAX2/40
mailbox=40@device
permit=0.0.0.0/0.0.0.0
requirecalltoken=yes
callerid=Андрей моб <40>
setvar=REALCALLERIDNUM=40

[50]
deny=0.0.0.0/0.0.0.0
secret=********
transfer=yes
context=from-internal
host=dynamic
type=friend
port=4569
qualify=yes
dial=IAX2/50
mailbox=50@device
permit=0.0.0.0/0.0.0.0
requirecalltoken=no
callerid=Максим <50>
setvar=REALCALLERIDNUM=50

[KRABiz]
deny=all
type=friend
qualify=yes
host=192.168.11.77
context=from-internal
allow=g722
allow=ulaw
allow=alaw

;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make ;
; custom modifications, details at: http://freepbx.org/configuration_files ;
;--------------------------------------------------------------------------------;
[general]

; These will all be included in the [general] context
#include iax_general_additional.conf
#include iax_general_custom.conf
#include iax_registrations_custom.conf
#include iax_registrations.conf

; These should all be expected to come after the [general] context
;
;iax_custom.conf is the proper place to start creating new contexts that you
;might have a need for. Dundi IAX trunks is one example of when this file is needed.
;
#include iax_custom.conf
#include iax_additional.conf
;
;iax_custom_post.conf will allow you to modify FreePBX generated IAX setups so
;that you can add additional parameters to a auto-generated setup.
;if you have a auto-generated context of [foobar] and need to add a parameter
;to it then create this line [foobar](+) and place your additions on the next line
;
#include iax_custom_post.conf

;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make ;
; custom modifications, details at: http://freepbx.org/configuration_files ;
;--------------------------------------------------------------------------------;
;

disallow=all
allow=ulaw
allow=alaw
allow=gsm
mailboxdetail=yes
tos=ef
;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make ;
; custom modifications, details at: http://freepbx.org/configuration_files ;
;--------------------------------------------------------------------------------;
;

[root@astdomus asterisk]#


---
От модератора:
Пожалуйста используйте теги и прячьте "портянки" под спойлер. Пол дня мотать колесо мыши никто не будет.
diwiz
 
Сообщений: 8
Зарегистрирован: 10 фев 2018, 17:35

Re: Почему Asterisk не отвечает клиенту IAX2 снаружи?

Сообщение ded » 13 фев 2018, 00:44

diwiz писал(а):порт UDP 4569 проброшен двумя роутерами (Один за другим). Входящие пакеты IAX видны на машинке с Астером, но ответные не формируются. Астер делает вид, что ничего не происходит.
Видимо два роутера перекраивают проходящие пакеты IAX2 до неузнаваемости, что Астериск их не понимает.
logger.conf
Код: выделить все
[logfiles]
debug_log_IAX2 => debug

CLI> core set debug 10
CLI> module reload logger
ded
 
Сообщений: 15805
Зарегистрирован: 26 авг 2010, 19:00

Re: Почему Asterisk не отвечает клиенту IAX2 снаружи?

Сообщение diwiz » 13 фев 2018, 15:48

Пардон, проблема оказалась в кривой маршрутизации. Я совершенно забыл, что на этой машинке два физических интерфейса и дефолтным был выбран другой...
diwiz
 
Сообщений: 8
Зарегистрирован: 10 фев 2018, 17:35

Пред.

Вернуться в Конфигурация и настройка Asterisk

Кто сейчас на форуме

Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 32

© 2008 — 2024 Asterisk.ru
Digium, Asterisk and AsteriskNOW are registered trademarks of Digium, Inc.
Design and development by PostMet-Netzwerk GmbH