G
G
gadzhi152016-11-14 00:26:15
Asterisk
gadzhi15, 2016-11-14 00:26:15

Asterisk 13 + Multiphone. How to treat?

Asterisk 13. This situation happens from time to time. The beep goes on, but the call does not reach asterisk. Also, periodically during a conversation, the audibility of the caller disappears.
sip.conf

[general]
trustrpid=yes
tcpenable=yes
useragent=D-link ; типа реальное железо. чтобы меньше привлекать внимание хацкеров которые ищут астериски
externip=внешний IP
localnet=192.168.5.0/24
qualify=yes               ; проверка доступности абонента - 2s - если больше, что считаем что недоступен
prematuremedia = no
progressinband = never
srvlookup=no
canreinvite=no              ; разрешает (yes) или запрещает (no) установку прямого соединения(минуя Asterisk).
directmedia=no              ; гнать трафик напрямую
allowguest = yes             ; запрет регистрации "левых" аккунтов
transfer=yes                ; запрет трансфера вызовов глобально, включать вручную для нужных пиров
allowsubscribe=no           ; отказ от использования voicemail и соответствующего спама в консоли
alwaysauthreject=yes        ; на REGISTER Asterisk станет отвечать «401 Unathorized»
jbenable = yes              ; Enables the use of a jitterbuffer on the receiving side of a SIP
jbforce = no                ; Forces the use of a jitterbuffer on the receive side of a SIP
jbmaxsize=2000
jbimpl = adaptive           ; Jitterbuffer implementation, used on the receiving side of a SIP
jbresyncthreshold=100       ;adaptive jbimpl had troubles without thresh... Asterisk 1.6.2.9.
;jblog = yes                ; Enables jitterbuffer frame logging. Defaults to "no".
context=default             ; всех левых в дефротный контекст на отбой
relaxdtmf=yes
dtmfmode=auto
disallow=all
;allow=g729
;allow=g723
allow=alaw
allow=ulaw
allow=gsm
bindport=5182

register => 7929883****@multifon.ru:******:7929883****@sbc.megafon.ru:5060/*******

[my_multifon_user](!)
type=peer
videosupport=no
host=193.201.229.35      ; Как нам найти нашего клиента - IP адрес или хост. Чтобы телефон самостоятельно зарегистрировался- dynamic.
insecure=invite,port     ; port: игнорировать номер порта, с которого пришла аутентификация invite: не требовать начальное сообщение INVITE для аутентификации
fromdomain=multifon.ru
canreinvite=no
disallow=all
;allow=g729
;allow=g723
allow=alaw
allow=ulaw
allow=gsm
qualify=yes
transport=tcp
nat=force_rport,comedia
dtmfmode=inband
relaxdtmf=yes
;dtmfmode=auto
port=5060
context=_sip            ; констекст плана набора, в который попадают
                            ; вызовы, поступающие от данного клиента

Ports 5060 tcp and udp are forwarded on the mikrotik router. UDP ports 5000-20000 are also forwarded. SIP direct media disabled
Peer debug on asterisk
[Nov 13 23:48:01] NOTICE[1010]: chan_sip.c:15583 sip_reregister:    -- Re-registration for  [email protected]
REGISTER 12 headers, 0 lines
Reliably Transmitting (no NAT) to 193.201.229.35:5060:
REGISTER sip:multifon.ru SIP/2.0
Via: SIP/2.0/TCP 176.122.61.94:5060;branch=z9hG4bK2b5d7ce2
Max-Forwards: 70
From: <sip:[email protected]>;tag=as151bc118
To: <sip:[email protected]>
Call-ID: [email protected]
CSeq: 106 REGISTER
Supported: replaces, timer
User-Agent: D-link
Authorization: Digest username="79298835533", realm="BREDBAND", algorithm=MD5, uri="sip:multifon.ru", nonce="MTQ3OTA2OTg0OTqOi75uwWM68bKMHVRbj0jV", response="38084c6838e547cd9852bac8804a33e6", opaque="MTQ3OTA2OTg0OTqOi75uwWM68bKMHVRbj0jV", qop=auth, cnonce="1ef92845", nc=00000004
Expires: 120
Contact: <sip:[email protected]:5060;transport=TCP>
Content-Length: 0


---
Reliably Transmitting (NAT) to 193.201.229.35:5060:
OPTIONS sip:193.201.229.35 SIP/2.0
Via: SIP/2.0/TCP 176.122.61.94:5060;branch=z9hG4bK2f2f2fa5;rport
Max-Forwards: 70
From: "asterisk" <sip:[email protected]>;tag=as2c770502
To: <sip:193.201.229.35>
Contact: <sip:[email protected]:5060;transport=TCP>
Call-ID: [email protected]:5060
CSeq: 102 OPTIONS
User-Agent: D-link
Date: Sun, 13 Nov 2016 20:48:01 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


<--- SIP read from TCP:193.201.229.35:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/TCP 176.122.61.94:5060;branch=z9hG4bK2b5d7ce2
From: <sip:[email protected]>;tag=as151bc118
To: <sip:[email protected]>;tag=SD1t57699-BC173246313536416F831103
Call-ID: [email protected]
CSeq: 106 REGISTER
Contact: <sip:[email protected]:5060;transport=TCP>;expires=180;transport=udp
Supported: replaces,timer,path
User-Agent: multifon.ru
Expires: 180
Content-Length: 0
Service-Route: <sip:[email protected]:5060;transport=tcp;lr>


--- (12 headers 0 lines) ---
[Nov 13 23:48:01] NOTICE[1069]: chan_sip.c:24374 handle_response_register: Outbound Registration: Expiry for sbc.megafon.ru is 180 sec (Scheduling reregistration in 165 s)
Really destroying SIP dialog '[email protected]' Method: REGISTER

<--- SIP read from TCP:193.201.229.35:5060 --->
SIP/2.0 403 Forbidden
Via: SIP/2.0/TCP 176.122.61.94:5060;received=176.122.61.94;branch=z9hG4bK2f2f2fa5;rport=44287
From: "asterisk" <sip:[email protected]>;tag=as2c770502
To: <sip:multifon.ru>;tag=aprqngfrt-ae77ia30000c6
Call-ID: [email protected]:5060
CSeq: 102 OPTIONS
Reason: Q.850;cause=55;text="Call Terminated"
Content-Length: 0

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor, 2016-11-14
@awsswa59

SIP/2.0 403 Forbidden
CSeq: 102 OPTIONS
Standardly swears at the Options package - and should be turned off in the recommendations - why do you hammer them with your Options packages?
At the feast:
qualify=no

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question