VIDEOCHAT  ::   FAQ  ::   Поиск  ::   Регистрация  ::   Вход

Проблема с входящими с внешнего транка.

Проблемы Asterisk без вэб-оболочек и их решения

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

Ответить
chemakov
Сообщения: 14
Зарегистрирован: 04 авг 2014, 21:26

Проблема с входящими с внешнего транка.

Сообщение chemakov »

Всем привет!

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

Вот мой
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER: sip.conf
[general]
context=default
allowguest=no
bindaddr=192.168.11.7
localnet=192.168.11.0/26
transport=udp
defaultexpiry=360
Language=ru
srvlookup=yes
register => 7xxxxxxxxxx$home:rrnQBL53:7xxxxxxxxxx$home @home.uc.westcall.net:9955/7xxxxxxxxxx

[westcall-reg]
type=friend
context=incoming # контекст для входящих
username=7xxxxxxxxxx$home
fromuser=7xxxxxxxxxx$home
authname=7xxxxxxxxxx$home
secret=pa$$w0rd
fromdomain=home.uc.westcall.net
host=home.uc.westcall.net
disallow=all
allow=ulaw
qualify=yes

[1]
type=friend
host=dynamic
username=1
secret=pa$$w0rd
dtmfmode=rfc2833
nat=no
canreinvite=no
context=home
callerid="1" <1>
disallow=all
allow=g729
allow=ulaw
allow=alaw

[2]
type=friend
host=dynamic
username=2
secret=pa$$w0rd
dtmfmode=rfc2833
nat=no
canreinvite=no
context=home
callerid="2" <2>
disallow=all
allow=g729
allow=ulaw
allow=alaw
теперь
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER: extensions.conf
exten =>1, 1, Dial(SIP/1,30)
exten =>1, n, Playback(vm-nobodyavail)
exten =>1, n, Hangup()

exten =>2, 1, Dial(SIP/2,30)
exten =>2, n, Playback(vm-nobodyavail)
exten =>2, n, Hangup()

include => westcall-reg

[westcall-reg]
exten => _XXXXXXX, 1, Dial(SIP/westcall-reg/${EXTEN},30)
exten => _XXXXXXX, n, Playback(vm-nobodyavail)
exten => _XXXXXXX, n, Hangup()

exten => _0X, 1, Dial(SIP/westcall-reg/${EXTEN},30)
exten => _0X, n, Playback(vm-nobodyavail)
exten => _0X, n, Hangup()

exten => _8800XXXXXXX, 1, Dial(SIP/westcall-reg/${EXTEN},30)
exten => _8800XXXXXXX, n, Playback(vm-nobodyavail)
exten => _8800XXXXXXX, n, Hangup()

include => incoming

[incoming]
exten => _X.,1,Dial(SIP/1) #на экстент 1 хочу получать звонки с westcall-reg

include => home
Когда звоню с сотового или городского получаю короткие гудки, но вызов доходит до астериска.
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER: трассировка
vm5*CLI> sip set debug on
SIP Debugging re-enabled

<--- SIP read from UDP:84.52.103.50:9955 --->
OPTIONS sip:188.143.156.XX SIP/2.0
Via: SIP/2.0/UDP 84.52.103.50:9955;rport;branch=z9hG4bK-3091672469-3826345172-67155078-156294691
From: <sip:84.52.103.50>;tag=3259116949-3826345172-67155078-156294691
To: <sip:188.143.156.XX>
Call-ID: 952d4326d46411e486b4000423de5009@84.52.103.50
CSeq: 2 OPTIONS
Max-Forwards: 70
User-Agent: TS-v4.5.1-16bW
Content-Length: 0

<------------->
--- (9 headers 0 lines) ---
Looking for s in default (domain 188.143.156.XX)

<--- Transmitting (NAT) to 84.52.103.50:9955 --->
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 84.52.103.50:9955;branch=z9hG4bK-3091672469-3826345172-67155078-156294691;received=84.52.103.50;rport=9955
From: <sip:84.52.103.50>;tag=3259116949-3826345172-67155078-156294691
To: <sip:188.143.156.XX>;tag=as1cdfc3d6
Call-ID: 952d4326d46411e486b4000423de5009@84.52.103.50
CSeq: 2 OPTIONS
Server: Asterisk PBX 1.8.32.2
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Accept: application/sdp
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '952d4326d46411e486b4000423de5009@84.52.103.50' in 32000 ms (Method: OPTIONS)

<--- SIP read from UDP:84.52.103.50:9955 --->
INVITE sip:incoming@192.168.11.7:5060 SIP/2.0
Via: SIP/2.0/UDP 84.52.103.50:9955;rport;branch=z9hG4bK-1520703384-3826345172-67155078-1562946911
Via: SIP/2.0/UDP 84.52.103.50:5061;rport=5061;branch=z9hG4bK-1520703384-3826345172-67155078-156294691;received=84.52.103.50
From: <sip:7904633XXXX@84.52.103.50:5061;user=phone>;tag=3605795224-3826345172-67155078-156294691
To: <sip:7812335XXXX$home@home.uc.westcall.net>
Call-ID: AC23E1A2E3960427D50AFA2B637E3DD5
CSeq: 1 INVITE
Contact: <sip:7904633XXXX@84.52.103.50:9955>
Content-Type: application/sdp
Allow: ACK, BYE, CANCEL, INFO, INVITE, OPTIONS, REFER, REGISTER, SUBSCRIBE, UPDATE
Max-Forwards: 70
User-Agent: TS-v4.5.1-16bW
Cisco-Guid: 1836697644-3550155236-2261439930-3432666920
Content-Length: 262

v=0
o=- 1427448924 1427448924 IN IP4 84.52.103.50
s=-
c=IN IP4 84.52.103.50
t=0 0
m=audio 20282 RTP/AVP 0 8 96
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-15
a=ptime:20
a=sendrecv
a=silenceSupp:off - - - -
<------------->
--- (14 headers 13 lines) ---
Sending to 84.52.103.50:9955 (NAT)
Using INVITE request as basis request - AC23E1A2E3960427D50AFA2B637E3DD5
Found peer 'westcall-reg' for '7904633XXXX' from 84.52.103.50:9955

<--- Reliably Transmitting (NAT) to 84.52.103.50:9955 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 84.52.103.50:9955;branch=z9hG4bK-1520703384-3826345172-67155078-1562946911;received=84.52.103.50;rport=9955
Via: SIP/2.0/UDP 84.52.103.50:5061;rport=5061;branch=z9hG4bK-1520703384-3826345172-67155078-156294691;received=84.52.103.50
From: <sip:7904633XXXX@84.52.103.50:5061;user=phone>;tag=3605795224-3826345172-67155078-156294691
To: <sip:7812335XXXX$home@home.uc.westcall.net>;tag=as4dfaeebf
Call-ID: AC23E1A2E3960427D50AFA2B637E3DD5
CSeq: 1 INVITE
Server: Asterisk PBX 1.8.32.2
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="39927bbd"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog 'AC23E1A2E3960427D50AFA2B637E3DD5' in 6400 ms (Method: INVITE)

<--- SIP read from UDP:84.52.103.50:9955 --->
ACK sip:incoming@192.168.11.7:5060 SIP/2.0
Via: SIP/2.0/UDP 84.52.103.50:9955;rport;branch=z9hG4bK-1520703384-3826345172-67155078-1562946911
Via: SIP/2.0/UDP 84.52.103.50:5061;rport=5061;branch=z9hG4bK-1520703384-3826345172-67155078-156294691;received=84.52.103.50
From: <sip:7904633XXXX@84.52.103.50:5061;user=phone>;tag=3605795224-3826345172-67155078-156294691
To: <sip:7812335XXXX$home@home.uc.westcall.net>;tag=as4dfaeebf
Call-ID: AC23E1A2E3960427D50AFA2B637E3DD5
CSeq: 1 ACK
Contact: <sip:7904633XXXX@84.52.103.50:9955>
Max-Forwards: 70
User-Agent: TS-v4.5.1-16bW
Content-Length: 0

<------------->
--- (11 headers 0 lines) ---

<--- SIP read from UDP:192.168.11.15:5060 --->
REGISTER sip:192.168.11.7:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.11.15:5060;branch=z9hG4bK431196041271514604;rport
From: 1 <sip:1@192.168.11.7:5060>;tag=233562116
To: 1 <sip:1@192.168.11.7:5060>
Call-ID: 17380677220664-1176325865928@192.168.11.15
CSeq: 2583 REGISTER
Contact: <sip:1@192.168.11.15:5060>
Max-Forwards: 70
Expires: 60
Supported: path
User-Agent: Voip Phone 1.0
Content-Length: 0

<------------->
--- (12 headers 0 lines) ---
Sending to 192.168.11.15:5060 (NAT)

<--- Transmitting (no NAT) to 192.168.11.15:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.11.15:5060;branch=z9hG4bK431196041271514604;received=192.168.11.15;rport=5060
From: 1 <sip:1@192.168.11.7:5060>;tag=233562116
To: 1 <sip:1@192.168.11.7:5060>;tag=as2673eb4e
Call-ID: 17380677220664-1176325865928@192.168.11.15
CSeq: 2583 REGISTER
Server: Asterisk PBX 1.8.32.2
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="5eb7bcce"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '17380677220664-1176325865928@192.168.11.15' in 32000 ms (Method: REGISTER)

<--- SIP read from UDP:192.168.11.15:5060 --->
REGISTER sip:192.168.11.7:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.11.15:5060;branch=z9hG4bK2170132637233431593;rport
From: 1 <sip:1@192.168.11.7:5060>;tag=233562116
To: 1 <sip:1@192.168.11.7:5060>
Call-ID: 17380677220664-1176325865928@192.168.11.15
CSeq: 2584 REGISTER
Contact: <sip:1@192.168.11.15:5060>
Authorization: Digest username="1", realm="asterisk", nonce="5eb7bcce", uri="sip:192.168.11.7:5060", response="d0fd8b4a291b3fcf2ea1d6918056b7a0", algorithm=MD5
Max-Forwards: 70
Expires: 60
Supported: path
User-Agent: Voip Phone 1.0
Content-Length: 0

<------------->
--- (13 headers 0 lines) ---
Sending to 192.168.11.15:5060 (no NAT)

<--- Transmitting (no NAT) to 192.168.11.15:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.11.15:5060;branch=z9hG4bK2170132637233431593;received=192.168.11.15;rport=5060
From: 1 <sip:1@192.168.11.7:5060>;tag=233562116
To: 1 <sip:1@192.168.11.7:5060>;tag=as2673eb4e
Call-ID: 17380677220664-1176325865928@192.168.11.15
CSeq: 2584 REGISTER
Server: Asterisk PBX 1.8.32.2
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Expires: 60
Contact: <sip:1@192.168.11.15:5060>;expires=60
Date: Fri, 27 Mar 2015 09:35:29 GMT
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '17380677220664-1176325865928@192.168.11.15' in 32000 ms (Method: REGISTER)
Really destroying SIP dialog 'AC23E1A2E3960427D50AFA2B637E3DD5' Method: ACK
Reliably Transmitting (NAT) to 84.52.103.50:9955:
OPTIONS sip:home.uc.westcall.net SIP/2.0
Via: SIP/2.0/UDP 192.168.11.7:5060;branch=z9hG4bK3ffcf824;rport
Max-Forwards: 70
From: "asterisk" <sip:7812335XXXX$home@192.168.11.7>;tag=as46000067
To: <sip:home.uc.westcall.net>
Contact: <sip:7812335XXXX$home@192.168.11.7:5060>
Call-ID: 167aeb9a16ac6c4255f99ab23f25f557@192.168.11.7:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.8.32.2
Date: Fri, 27 Mar 2015 09:35:39 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


---

<--- SIP read from UDP:84.52.103.50:9955 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.11.7:5060;branch=z9hG4bK3ffcf824;rport=5060;received=188.143.156.XX
From: "asterisk" <sip:7812335XXXX$home@192.168.11.7>;tag=as46000067
To: <sip:home.uc.westcall.net>;tag=4096129184-3826345172-67155078-156294691
Call-ID: 167aeb9a16ac6c4255f99ab23f25f557@192.168.11.7:5060
CSeq: 102 OPTIONS
Allow: ACK, BYE, CANCEL, INFO, INVITE, OPTIONS, PRACK, REFER, REGISTER, SUBSCRIBE, UPDATE
Accept: application/dtmf-relay
Accept: application/ISUP
Accept: application/media_control+xml
Accept: application/sdp
Supported: 100rel
Server: TS-v4.5.1-16bW
Content-Length: 0

<------------->
--- (14 headers 0 lines) ---
Really destroying SIP dialog '167aeb9a16ac6c4255f99ab23f25f557@192.168.11.7:5060' Method: OPTIONS
vm5*CLI>
Помогите пожалуйста настроить входящие с westcall-reg.
ded
Сообщения: 15625
Зарегистрирован: 26 авг 2010, 19:00

Re: Проблема с входящими с внешнего транка.

Сообщение ded »

1) Не рекомендуется тут писать "помогите пожалуйста", ибо вы читали правила регистрации и с ними согласились.
2) не надо огромных портянок, есть теги спойлер и код (code)
к тому же там бессмысленные пакеты OPTIONS
3) идите по шагам
Изображение
chemakov
Сообщения: 14
Зарегистрирован: 04 авг 2014, 21:26

Re: Проблема с входящими с внешнего транка.

Сообщение chemakov »

спасибо, ded. отличная картинка.
ded
Сообщения: 15625
Зарегистрирован: 26 авг 2010, 19:00

Re: Проблема с входящими с внешнего транка.

Сообщение ded »

Я знаю, сам рисовал.
virus_net
Сообщения: 2337
Зарегистрирован: 05 июн 2013, 08:12
Откуда: Москва

Re: Проблема с входящими с внешнего транка.

Сообщение virus_net »

chemakov писал(а):Когда звоню с сотового или городского получаю короткие гудки
И что тут удивительного ? Ничего, т.к.:
chemakov писал(а):register => 7xxxxxxxxxx$home:rrnQBL53:7xxxxxxxxxx$home@home.uc.westcall.net:9955/7xxxxxxxxxx
chemakov писал(а):Сразу оговорюсь, что книжку - гл. 5 перечитывал
книжка это конечно хорошо и замечательно, но если ответ не найден, то значит книжки недостаточно.
есть wiki.asterisk.org и vop-info.org, да даже в самом конфиг файле sip.conf есть довольно четкое описание, вот его часть:
register => [peer?][transport://]user[@domain][:secret[:authuser]]@host[:port][/extension][~expiry]
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER:
;----------------------------------------- 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 => username:secret@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').
А теперь:
chemakov писал(а):теперь extensions.conf
найдите в нем exten указанный вами. я что-то не наблюдаю такого.
так же как и
chemakov писал(а): [general]
context=default
Из того же sip.conf:
context=default ; Default context for incoming calls
P.S. Модераторы, пжалста уберите портянку первого поста в спойлер, раз самому пользователю плевать на остальных.
мой SIP URI sip:virus_net@asterisk.ru
bitname.ru - Домены .bit (namecoin) .emc .coin .lib .bazar (emercoin)

ENUMER - звони бесплатно и напрямую.
Ответить
© 2008 — 2024 Asterisk.ru
Digium, Asterisk and AsteriskNOW are registered trademarks of Digium, Inc.
Design and development by PostMet-Netzwerk GmbH