E..A7c@..../..oF..# .....=.x....P. ._...INVITE sip:2830@217.x.x.x2;user=phone SIP/2.0
FROM: "User1"<sip:3098@domain.net;user=phone>;epid=2B225034A8;tag=55ca31813
TO: <sip:2830@217.x.x.x;user=phone>
CSEQ: 2708 INVITE
CALL-ID: 341c2324-c0d5-4d4b-85fa-2806a0878ffe
MAX-FORWARDS: 70
VIA: SIP/2.0/TCP 192.168.111.70:53733;branch=z9hG4bK2b8b164
CONTACT: <sip:lyncdomain.net:5060;transport=Tcp;maddr=192.168.111.70;ms-opaque=b8671917e4cfa3ab>
CONTENT-LENGTH: 347
SUPPORTED: 100rel
USER-AGENT: RTCC/7.0.0.0 MediationServer
CONTENT-TYPE: application/sdp
ALLOW: ACK
P-ASSERTED-IDENTITY: "User1"<sip:user1@domain.net>,<tel:3098>
Privacy: id
Allow: CANCEL,BYE,INVITE,PRACK,UPDATE
v=0
o=- 1350 1 IN IP4 192.168.111.70
s=session
c=IN IP4 192.168.111.70
b=CT:1000
t=0 0
m=audio 50280 RTP/AVP 97 101 13 0 8
c=IN IP4 192.168.111.70
a=rtcp:50281
a=label:Audio
a=sendrecv
a=rtpmap:97 RED/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=rtpmap:13 CN/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=ptime:20
E..i5.@.@..T..# ..oF.........=..P.......SIP/2.0 401 Unauthorized
Via: SIP/2.0/TCP 192.168.111.70:53733;branch=z9hG4bK2b8b164;received=192.168.111.70
From: "User1"<sip:3098@domain.net;user=phone>;epid=2B225034A8;tag=55ca31813
To: <sip:2830@217.x.x.x;user=phone>;tag=as79b63806
Call-ID: 341c2324-c0d5-4d4b-85fa-2806a0878ffe
CSeq: 2708 INVITE
Server: Asterisk PBX2
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="domain.net", nonce="3da90575"
Content-Length: 0
context=incoming-reception-enoff
allowguest=no
allowoverlap=no
realm=domain.net
udpbindaddr=0.0.0.0
tcpenable=yes
tcpbindaddr=0.0.0.0
transport=udp,tcp
srvlookup=no
pedantic=no
vmexten=voicemail
disallow=all
allow=alaw,ulaw,gsm,ilbc,g723
allow=h264
language=ru
useragent=Asterisk PBX2
dtmfmode=rfc2833
videosupport=yes
maxcallbitrate=90000
callevents=yes
alwaysauthreject=yes
rtptimeout=60
rtpholdtimeout=300
rtpkeepalive=30
allowsubscribe=no
subscribecontext=office
notifyringing=yes
localnet=192.168.0.0/255.255.0.0
externaddr=217.x.x.x
nat=no
directmedia=no
directmediadeny=0.0.0.0/0
rtcachefriends=yes
[lync]
type=friend
qualify=yes
insecure=invite,port
host=192.168.111.70
port=5060
transport=tcp
context=fromlync
disallow=all
allow=alaw,ulaw
promiscredir=yes
canreivite=yes
fromdomain=domain.net
[general]
context=default
allowoverlap=no
udpbindaddr=0.0.0.0
tcpenable=yes
tcpbindaddr=0.0.0.0
srvlookup=yes
[from-lync]
type=friend
host=192.168.111.70
qualify=yes
transport=tcp
insecure=invite,port
canreinvite=yes
port=5060
context=fromlync
fromdomain=domain.net
[2021-08-04 18:53:12] DEBUG[123492]: chan_sip.c:3041 _sip_tcp_helper_thread: Starting thread for TCP server
[2021-08-04 18:53:12] DEBUG[123492]: acl.c:1045 ast_ouraddrfor: For destination '192.168.111.70', our source address is '217.x.x.x'.
[2021-08-04 18:53:12] DEBUG[123492]: chan_sip.c:3982 ast_sip_ouraddrfor: Setting AST_TRANSPORT_TCP with address 217.x.x.x:5060
[2021-08-04 18:53:12] DEBUG[123492]: netsock2.c:170 ast_sockaddr_split_hostport: Splitting '192.168.111.70:59975' into...
[2021-08-04 18:53:12] DEBUG[123492]: netsock2.c:224 ast_sockaddr_split_hostport: ...host '192.168.111.70' and port '59975'.
[2021-08-04 18:53:12] DEBUG[123492]: chan_sip.c:9098 __sip_alloc: Allocating new SIP dialog for a826490a-a1d7-4671-86be-247cf81dada3 - INVITE (No RTP)
[2021-08-04 18:53:12] DEBUG[123492][C-000003b6]: chan_sip.c:29183 handle_incoming: **** Received INVITE (5) - Command in SIP INVITE
[2021-08-04 18:53:12] DEBUG[123492][C-000003b6]: sip/reqresp_parser.c:1709 parse_sip_options: Begin: parsing SIP "Supported: 100rel"
[2021-08-04 18:53:12] DEBUG[123492][C-000003b6]: sip/reqresp_parser.c:1724 parse_sip_options: Found SIP option: -100rel-
[2021-08-04 18:53:12] DEBUG[123492][C-000003b6]: sip/reqresp_parser.c:1732 parse_sip_options: Matched SIP option: 100rel
[2021-08-04 18:53:12] DEBUG[123492][C-000003b6]: netsock2.c:170 ast_sockaddr_split_hostport: Splitting '192.168.111.70:59975' into...
[2021-08-04 18:53:12] DEBUG[123492][C-000003b6]: netsock2.c:224 ast_sockaddr_split_hostport: ...host '192.168.111.70' and port '59975'.
[2021-08-04 18:53:12] DEBUG[123492][C-000003b6]: netsock2.c:170 ast_sockaddr_split_hostport: Splitting 'domain.net' into...
[2021-08-04 18:53:12] DEBUG[123492][C-000003b6]: netsock2.c:224 ast_sockaddr_split_hostport: ...host 'domain.net' and port ''.
[2021-08-04 18:53:12] DEBUG[123492][C-000003b6]: chan_sip.c:3806 __sip_xmit: Trying to put 'SIP/2.0 401' onto TCP socket destined for 192.168.111.70:59975
далее реконнекты
[2021-08-04 18:50:41] DEBUG[123481]: chan_sip.c:3041 _sip_tcp_helper_thread: Starting thread for TCP server
[2021-08-04 18:50:41] DEBUG[123481]: acl.c:1045 ast_ouraddrfor: For destination '192.168.111.70', our source address is '217.x.x.x'.
[2021-08-04 18:50:41] DEBUG[123481]: chan_sip.c:3982 ast_sip_ouraddrfor: Setting AST_TRANSPORT_TCP with address 217.x.x.x:5060
[2021-08-04 18:50:41] DEBUG[123481]: netsock2.c:170 ast_sockaddr_split_hostport: Splitting '192.168.111.70:59944' into...
[2021-08-04 18:50:41] DEBUG[123481]: netsock2.c:224 ast_sockaddr_split_hostport: ...host '192.168.111.70' and port '59944'.
[2021-08-04 18:50:41] DEBUG[123481]: chan_sip.c:9098 __sip_alloc: Allocating new SIP dialog for d6116022-9eb9-43c8-8ba0-9963c0cdd65e - INVITE (No RTP)
[2021-08-04 18:50:41] DEBUG[123481][C-000003b5]: chan_sip.c:29183 handle_incoming: **** Received INVITE (5) - Command in SIP INVITE
[2021-08-04 18:50:41] DEBUG[123481][C-000003b5]: sip/reqresp_parser.c:1709 parse_sip_options: Begin: parsing SIP "Supported: 100rel"
[2021-08-04 18:50:41] DEBUG[123481][C-000003b5]: sip/reqresp_parser.c:1724 parse_sip_options: Found SIP option: -100rel-
[2021-08-04 18:50:41] DEBUG[123481][C-000003b5]: sip/reqresp_parser.c:1732 parse_sip_options: Matched SIP option: 100rel
[2021-08-04 18:50:41] DEBUG[123481][C-000003b5]: netsock2.c:170 ast_sockaddr_split_hostport: Splitting '192.168.111.70:59944' into...
[2021-08-04 18:50:41] DEBUG[123481][C-000003b5]: netsock2.c:224 ast_sockaddr_split_hostport: ...host '192.168.111.70' and port '59944'.
[2021-08-04 18:50:41] DEBUG[123481][C-000003b5]: netsock2.c:170 ast_sockaddr_split_hostport: Splitting 'domain.net' into...
[2021-08-04 18:50:41] DEBUG[123481][C-000003b5]: netsock2.c:224 ast_sockaddr_split_hostport: ...host 'domain.net' and port ''.
[2021-08-04 18:50:41] DEBUG[123481][C-000003b5]: res_config_mysql.c:1389 mysql_reconnect: MySQL RealTime: Connection okay.
далее вызов
Reliably Transmitting (no NAT) to 192.168.111.70:5060:
OPTIONS sip:192.168.111.70 SIP/2.0
Via: SIP/2.0/TCP 217.x.x.x:5060;branch=z9hG4bK6a6ea3b0
Max-Forwards: 70
From: "asterisk" <sip:asterisk@217.x.x.x>;tag=as143a10ff
To: <sip:192.168.111.70>
Contact: <sip:asterisk@217.x.x.x;transport=tcp>
Call-ID: 07b096b107ab747374ee7c1b4b24cc6f@217.x.x.x:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX2
Date: Thu, 05 Aug 2021 07:38:20 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0
---
<--- SIP read from TCP:192.168.111.70:5060 --->
SIP/2.0 200 OK
FROM: "asterisk"<sip:asterisk@217.x.x.x>;tag=as143a10ff
TO: <sip:192.168.111.70>;tag=b0ef6dc487
CSEQ: 102 OPTIONS
CALL-ID: 07b096b107ab747374ee7c1b4b24cc6f@217.x.x.x:5060
VIA: SIP/2.0/TCP 217.x.x.x:5060;branch=z9hG4bK6a6ea3b0
ACCEPT: application/sdp
CONTENT-LENGTH: 0
ACCEPT-ENCODING: gzip
ACCEPT-LANGUAGE: en
ALLOW: NOTIFY
ALLOW: BENOTIFY
SERVER: RTCC/7.0.0.0 MediationServer
<------------->
--- (13 headers 0 lines) ---
Really destroying SIP dialog '07b096b107ab747374ee7c1b4b24cc6f@217.x.x.x:5060' Method: OPTIONS
== Using SIP VIDEO CoS mark 6
== Using SIP RTP CoS mark 5
> 0x7f82bc01d680 -- Strict RTP learning after remote address set to: 192.168.111.70:52386
-- Executing [2830@fromlync:1] Dial("SIP/lync-0000011c", "SIP/2830") in new stack
== Using SIP VIDEO CoS mark 6
== Using SIP RTP CoS mark 5
-- Called SIP/2830
-- SIP/2830-0000011d is ringing
> 0x7f82c4026dc0 -- Strict RTP learning after remote address set to: 192.168.108.116:5148
-- SIP/2830-0000011d answered SIP/lync-0000011c
-- Channel SIP/2830-0000011d joined 'simple_bridge' basic-bridge <2903944d-8955-4fc6-b292-69cd22943c30>
-- Channel SIP/lync-0000011c joined 'simple_bridge' basic-bridge <2903944d-8955-4fc6-b292-69cd22943c30>
> Bridge 2903944d-8955-4fc6-b292-69cd22943c30: switching from simple_bridge technology to native_rtp
> Locally RTP bridged 'SIP/lync-0000011c' and 'SIP/2830-0000011d' in stack
> 0x7f82c4026dc0 -- Strict RTP switching to RTP target address 192.168.108.116:5148 as source
> 0x7f82bc01d680 -- Strict RTP switching to RTP target address 192.168.111.70:52386 as source
> 0x7f82bc01d680 -- Strict RTP learning complete - Locking on source address 192.168.111.70:52386
> 0x7f82c4026dc0 -- Strict RTP learning complete - Locking on source address 192.168.108.116:5148
-- Channel SIP/2830-0000011d left 'native_rtp' basic-bridge <2903944d-8955-4fc6-b292-69cd22943c30>
-- Channel SIP/lync-0000011c left 'native_rtp' basic-bridge <2903944d-8955-4fc6-b292-69cd22943c30>
== Spawn extension (fromlync, 2830, 1) exited non-zero on 'SIP/lync-0000011c'
Но мобилки же ходят. Значит на них настройки не работают? Или они как-то по другому работают? По дебагу и tcpdumpу я не вижу разницу, но у меня может быть и недостаточно знаний для его оценки