Имею следующее:
Шлюз (2 интерфейса)
1 - внешний 95.xxx.xxx.xxx
2 - внутренний 192.168.45.1
Asterisk (1 интерфейс) Elastix
1 - 192.168.45.4 (gateway 192.168.45.1)
Провайдер (SIP)
84.22.xxx.xxx (аутентификация по номеру + ip)
Создаю SIP-транк
host=dynamic
username=3030
type=peer
nat=yes
disallow=all
allow=alaw&ulaw
qualify=yes
регистрация
3030@84.22.xxx.xxx
Регистрации нет.
Включаю дебаг, получаю следующее
Код: Выделить всё
REGISTER 12 headers, 0 lines
Reliably Transmitting (no NAT) to 84.22.xxx.xxx:5060:
REGISTER sip:84.22.xxx.xxx SIP/2.0
Via: SIP/2.0/UDP 192.168.45.4:5060;branch=z9hG4bK72053a78;rport
From: <sip:3030@84.22.xxx.xxx>;tag=as7f9bcfd8
To: <sip:3030@84.22.xxx.xxx>
Call-ID: 269c607b57f66d3756fd329446401b7a@127.0.0.1
CSeq: 102 REGISTER
User-Agent: Asterisk PBX
Max-Forwards: 70
Expires: 120
Contact: <sip:s@192.168.45.4>
Event: registration
Content-Length: 0
---
elastix*CLI>
<--- SIP read from 84.22.xxx.xxx:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.45.4:5060;branch=z9hG4bK72053a78;rport;received=95.130.xxx.xxx
From: <sip:3030@84.22.xxx.xxx>;tag=as7f9bcfd8
To: <sip:3030@84.22.xxx.xxx>
Date: Tue, 19 Jul 2011 04:35:00 GMT
Call-ID: 269c607b57f66d3756fd329446401b7a@127.0.0.1
Server: Cisco-SIPGateway/IOS-12.x
CSeq: 102 REGISTER
Content-Length: 0
<------------->
--- (9 headers 0 lines) ---
elastix*CLI>
<--- SIP read from 84.22.xxx.xxx:5060 --->
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 192.168.45.4:5060;branch=z9hG4bK72053a78;rport;received=95.130.xxx.xxx
From: <sip:3030@84.22.xxx.xxx>;tag=as7f9bcfd8
To: <sip:3030@84.22.xxx.xxx>;tag=F2521BB8-D5A
Date: Tue, 19 Jul 2011 04:35:00 GMT
Call-ID: 269c607b57f66d3756fd329446401b7a@127.0.0.1
Server: Cisco-SIPGateway/IOS-12.x
CSeq: 102 REGISTER
Content-Length: 0
<------------->
--- (9 headers 0 lines) ---
Really destroying SIP dialog '269c607b57f66d3756fd329446401b7a@127.0.0.1' Method: REGISTER
серверу не нравится что в заголовке значится локальный ip (Via: SIP/2.0/UDP 192.168.45.4:5060)
Начинаю рыть в сторону доп опций типа
externip
Формирую следующее
Код: Выделить всё
host=dynamic
username=3019
type=peer
nat=yes
disallow=all
allow=alaw&ulaw
qualify=yes
externip=95.130.xxx.xxx
Смотрю свой SIP.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 ;
;--------------------------------------------------------------------------------;
;
[general]
; These files will all be included in the [general] context
;
#include sip_general_additional.conf
;sip_general_custom.conf is the proper file location for placing any sip general
;options that you might need set. For example: enable and force the sip jitterbuffer.
;If these settings are desired they should be set the sip_general_custom.conf file.
;
; jbenable=yes
; jbforce=yes
;
;It is also the proper place to add the lines needed for sip nat'ing when going
;through a firewall. For nat'ing you'd need to add the following lines:
; nat=yes , externip= , localhost= , and optionally fromdomain= .
;
#include sip_general_custom.conf
;sip_nat.conf is here for legacy support reasons and for those that upgrade
;from previous versions. If you have this file with lines in it please make
;sure they are not duplicated in sip_general_custom.conf, if so remove them
;from sip_nat.conf as sip_general_custom.conf will have precedence.
#include sip_nat.conf
;sip_registrations_custom.conf is for any customizations you might need to do to
;the automatically generated registrations that FreePBX makes.
;
#include sip_registrations_custom.conf
#include sip_registrations.conf
; These files should all be expected to come after the [general] context
;
#include sip_custom.conf
#include sip_additional.conf
;sip_custom_post.conf If you have extra parameters that are needed for a
;extension to work to for example, those go here. So you have extension
;1000 defined in your system you start by creating a line [1000](+) in this
;file. Then on the next line add the extra parameter that is needed.
;When the sip.conf is loaded it will append your additions to the end of
;that extension.
;
#include sip_custom_post.conf
Код: Выделить всё
externip=95.130.xxx.xxx
на всякий случай
restart now
sip set debug ip 84.22.xxx.xxx
sip reload
результат тот же самый. (провайдеровский сервак не воспринимает мою регистрацию)
пробовал перебирать всё вышеописанное в различных комбинациях, результат один - 404
Чувствую не хватает в моих познаниях какой то небольшой но очень важной информации.
Подскажите куда рыть.