corpse писал(а):Еще момент в INVITE на Elastix, шлюз передает Remote-Party-ID, но он содержит номер звонящего, а не номер на который приходит звонок. Я не понимаю как это должно помочь Asterisk-у разрулить пир?
ИМХО. В меру моего понимания.
Несколько транков с одним IP регистрируются на сервере.
Насколько понимаю, входящие вызовы падают в последний контекст, потому, что с этого транка
последней (с этого IP) пришла регистрация.
Разруливается тем, что на
каждый входящий инвайт с этого IP астериск требует авторизацию. И этот пир становится последним авторизованным. Пока следующий инвайт (с другой симки) не сделает последним авторизованным другой транк и контекст этого транка не станет последним/текущим.
insecure нужно убрать.
Как оно работает?
Возможно он видит в инвайте различающиеся поля
Код: Выделить всё
From: "3003" <sip:3003@10.10.1.5:5060;user=phone>;tag=482222396
Remote-Party-ID: "380967910442" <sip:380967910442@10.10.1.5>;party=calling;screen=no;privacy=off
и поэтому требует авторизацию. ХЗ, я еще пока не "настоящий сварщик".
Выглядит так:
Код: Выделить всё
[2019-01-31 08:13:19] VERBOSE[2944] chan_sip.c:
<--- SIP read from UDP:10.10.1.6:5060 --->
INVITE sip:3003@10.10.1.5:5060;transport=udp SIP/2.0
Via: SIP/2.0/UDP 10.10.1.6:5060;rport;branch=z9hG4bK1113603027
From: "3003" <sip:3003@10.10.1.5:5060;user=phone>;tag=482222396
To: <sip:3003@10.10.1.5>
Call-ID: 617011065@10.10.1.6
CSeq: 12 INVITE
Contact: <sip:3003@10.10.1.6:5060>
Max-Forwards: 30
User-Agent: dble
Remote-Party-ID: "380967910442" <sip:380967910442@10.10.1.5>;party=calling;screen=no;privacy=off
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REFER, REGISTER, MESSAGE, INFO, SUBSCRIBE
Content-Type: application/sdp
Content-Length: 276
v=0
o=dble 1548915198 1548915198 IN IP4 10.10.1.6
s=dble
c=IN IP4 10.10.1.6
t=0 0
m=audio 10000 RTP/AVP 8 0 18 4 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=rtpmap:4 G723/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
<------------->
[2019-01-31 08:13:19] VERBOSE[2944] chan_sip.c: --- (13 headers 13 lines) ---
[2019-01-31 08:13:19] VERBOSE[2944] chan_sip.c: Sending to 10.10.1.6:5060 (NAT)
[2019-01-31 08:13:19] VERBOSE[2944][C-00002010] chan_sip.c: Sending to 10.10.1.6:5060 (NAT)
[2019-01-31 08:13:19] VERBOSE[2944][C-00002010] chan_sip.c: Using INVITE request as basis request - 617011065@10.10.1.6
[2019-01-31 08:13:19] VERBOSE[2944][C-00002010] chan_sip.c: Found peer '3003' for '3003' from 10.10.1.6:5060
[2019-01-31 08:13:19] VERBOSE[2944][C-00002010] chan_sip.c:
<--- Reliably Transmitting (NAT) to 10.10.1.6:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.10.1.6:5060;branch=z9hG4bK1113603027;received=10.10.1.6;rport=5060
From: "3003" <sip:3003@10.10.1.5:5060;user=phone>;tag=482222396
To: <sip:3003@10.10.1.5>;tag=as365c3e62
Call-ID: 617011065@10.10.1.6
CSeq: 12 INVITE
Server: FPBX-2.11.0(11.25.3)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="6d717867"
Content-Length: 0
<------------>
[2019-01-31 08:13:19] VERBOSE[2944][C-00002010] chan_sip.c: Scheduling destruction of SIP dialog '617011065@10.10.1.6' in 6400 ms (Method: INVITE)
[2019-01-31 08:13:19] VERBOSE[2944] chan_sip.c:
<--- SIP read from UDP:10.10.1.6:5060 --->
ACK sip:3003@10.10.1.5:5060;transport=udp SIP/2.0
Via: SIP/2.0/UDP 10.10.1.6:5060;rport;branch=z9hG4bK1113603027
From: "3003" <sip:3003@10.10.1.5:5060;user=phone>;tag=482222396
To: <sip:3003@10.10.1.5>;tag=as365c3e62
Call-ID: 617011065@10.10.1.6
CSeq: 12 ACK
Content-Length: 0
<------------->
[2019-01-31 08:13:19] VERBOSE[2944] chan_sip.c: --- (7 headers 0 lines) ---
[2019-01-31 08:13:19] VERBOSE[2944] chan_sip.c:
<--- SIP read from UDP:10.10.1.6:5060 --->
INVITE sip:3003@10.10.1.5:5060;transport=udp SIP/2.0
Via: SIP/2.0/UDP 10.10.1.6:5060;rport;branch=z9hG4bK2070689832
From: "3003" <sip:3003@10.10.1.5:5060;user=phone>;tag=482222396
To: <sip:3003@10.10.1.5>
Call-ID: 617011065@10.10.1.6
CSeq: 13 INVITE
Contact: <sip:3003@10.10.1.6:5060>
Authorization: Digest username="3003", realm="asterisk", nonce="6d717867", uri="sip:3003@10.10.1.5", response="260071fa4b7e3664851dd4a921510cf9", algorithm=MD5
Max-Forwards: 30
User-Agent: dble
Remote-Party-ID: "380967910442" <sip:380967910442@10.10.1.5>;party=calling;screen=no;privacy=off
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REFER, REGISTER, MESSAGE, INFO, SUBSCRIBE
Content-Type: application/sdp
Content-Length: 276
v=0
o=dble 1548915198 1548915198 IN IP4 10.10.1.6
s=dble
c=IN IP4 10.10.1.6
t=0 0
m=audio 10000 RTP/AVP 8 0 18 4 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=rtpmap:4 G723/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
<------------->
[2019-01-31 08:13:19] VERBOSE[2944] chan_sip.c: --- (14 headers 13 lines) ---
[2019-01-31 08:13:19] VERBOSE[2944][C-00002010] chan_sip.c: Sending to 10.10.1.6:5060 (NAT)
[2019-01-31 08:13:19] VERBOSE[2944][C-00002010] chan_sip.c: Using INVITE request as basis request - 617011065@10.10.1.6
[2019-01-31 08:13:19] VERBOSE[2944][C-00002010] chan_sip.c: Found peer '3003' for '3003' from 10.10.1.6:5060
[2019-01-31 08:13:19] VERBOSE[2944][C-00002010] netsock2.c: == Using SIP RTP TOS bits 184
[2019-01-31 08:13:19] VERBOSE[2944][C-00002010] netsock2.c: == Using SIP RTP CoS mark 5
[2019-01-31 08:13:19] VERBOSE[2944][C-00002010] chan_sip.c: Found RTP audio format 8
[2019-01-31 08:13:19] VERBOSE[2944][C-00002010] chan_sip.c: Found RTP audio format 0
[2019-01-31 08:13:19] VERBOSE[2944][C-00002010] chan_sip.c: Found RTP audio format 18
[2019-01-31 08:13:19] VERBOSE[2944][C-00002010] chan_sip.c: Found RTP audio format 4
[2019-01-31 08:13:19] VERBOSE[2944][C-00002010] chan_sip.c: Found RTP audio format 101
[2019-01-31 08:13:19] VERBOSE[2944][C-00002010] chan_sip.c: Found audio description format PCMA for ID 8
[2019-01-31 08:13:19] VERBOSE[2944][C-00002010] chan_sip.c: Found audio description format PCMU for ID 0
[2019-01-31 08:13:19] VERBOSE[2944][C-00002010] chan_sip.c: Found audio description format G729 for ID 18
[2019-01-31 08:13:19] VERBOSE[2944][C-00002010] chan_sip.c: Found audio description format G723 for ID 4
[2019-01-31 08:13:19] VERBOSE[2944][C-00002010] chan_sip.c: Found audio description format telephone-event for ID 101
[2019-01-31 08:13:19] VERBOSE[2944][C-00002010] chan_sip.c: Capabilities: us - (alaw), peer - audio=(g723|ulaw|alaw|g729)/video=(nothing)/text=(nothing), combined - (alaw)
[2019-01-31 08:13:19] VERBOSE[2944][C-00002010] chan_sip.c: Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
[2019-01-31 08:13:19] VERBOSE[2944][C-00002010] chan_sip.c: Peer audio RTP is at port 10.10.1.6:10000
[2019-01-31 08:13:19] VERBOSE[2944][C-00002010] chan_sip.c: Peer doesn't provide T.140
[2019-01-31 08:13:19] VERBOSE[2944][C-00002010] chan_sip.c: Looking for 3003 in from-trunk-sip-3003 (domain 10.10.1.5)
[2019-01-31 08:13:19] VERBOSE[2944][C-00002010] chan_sip.c: list_route: hop: <sip:3003@10.10.1.6:5060>
[2019-01-31 08:13:19] VERBOSE[2944][C-00002010] chan_sip.c:
<--- Transmitting (NAT) to 10.10.1.6:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.10.1.6:5060;branch=z9hG4bK2070689832;received=10.10.1.6;rport=5060
From: "3003" <sip:3003@10.10.1.5:5060;user=phone>;tag=482222396
To: <sip:3003@10.10.1.5>
Call-ID: 617011065@10.10.1.6
CSeq: 13 INVITE
Server: FPBX-2.11.0(11.25.3)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:3003@10.10.1.5:5060>
Content-Length: 0
[2019-01-31 08:13:20] VERBOSE[30258][C-00002010] chan_sip.c:
<--- Transmitting (NAT) to 10.10.1.6:5060 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 10.10.1.6:5060;branch=z9hG4bK2070689832;received=10.10.1.6;rport=5060
From: "3003" <sip:3003@10.10.1.5:5060;user=phone>;tag=482222396
To: <sip:3003@10.10.1.5>;tag=as02c3fff4
Call-ID: 617011065@10.10.1.6
CSeq: 13 INVITE
Server: FPBX-2.11.0(11.25.3)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:3003@10.10.1.5:5060>
Content-Length: 0
[2019-01-31 08:13:21] VERBOSE[30258][C-00002010] chan_sip.c:
<--- Transmitting (NAT) to 10.10.1.6:5060 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 10.10.1.6:5060;branch=z9hG4bK2070689832;received=10.10.1.6;rport=5060
From: "3003" <sip:3003@10.10.1.5:5060;user=phone>;tag=482222396
To: <sip:3003@10.10.1.5>;tag=as02c3fff4
Call-ID: 617011065@10.10.1.6
CSeq: 13 INVITE
Server: FPBX-2.11.0(11.25.3)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:3003@10.10.1.5:5060>
Content-Length: 0
[2019-01-31 08:13:24] VERBOSE[30258][C-00002010] chan_sip.c: Audio is at 13962
[2019-01-31 08:13:24] VERBOSE[30258][C-00002010] chan_sip.c: Adding codec 100004 (alaw) to SDP
[2019-01-31 08:13:24] VERBOSE[30258][C-00002010] chan_sip.c: Adding non-codec 0x1 (telephone-event) to SDP
[2019-01-31 08:13:24] VERBOSE[30258][C-00002010] chan_sip.c:
<--- Reliably Transmitting (NAT) to 10.10.1.6:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.10.1.6:5060;branch=z9hG4bK2070689832;received=10.10.1.6;rport=5060
From: "3003" <sip:3003@10.10.1.5:5060;user=phone>;tag=482222396
To: <sip:3003@10.10.1.5>;tag=as02c3fff4
Call-ID: 617011065@10.10.1.6
CSeq: 13 INVITE
Server: FPBX-2.11.0(11.25.3)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:3003@10.10.1.5:5060>
Content-Type: application/sdp
Content-Length: 230
v=0
o=root 1369098520 1369098520 IN IP4 10.10.1.5
s=Asterisk PBX 11.25.3
c=IN IP4 10.10.1.5
t=0 0
m=audio 13962 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv
<------------>
[2019-01-31 08:13:24] VERBOSE[2944] chan_sip.c:
<--- SIP read from UDP:10.10.1.6:5060 --->
ACK sip:3003@10.10.1.5:5060 SIP/2.0
Via: SIP/2.0/UDP 10.10.1.6:5060;rport;branch=z9hG4bK745423644
From: "3003" <sip:3003@10.10.1.5:5060;user=phone>;tag=482222396
To: <sip:3003@10.10.1.5>;tag=as02c3fff4
Call-ID: 617011065@10.10.1.6
CSeq: 13 ACK
Contact: <sip:3003@10.10.1.6:5060>
Max-Forwards: 30
User-Agent: dble
Content-Length: 0
[2019-01-31 08:13:47] VERBOSE[2944] chan_sip.c:
<--- SIP read from UDP:10.10.1.6:5060 --->
BYE sip:3003@10.10.1.5:5060 SIP/2.0
Via: SIP/2.0/UDP 10.10.1.6:5060;branch=z9hG4bK553005757
From: "3003" <sip:3003@10.10.1.5:5060;user=phone>;tag=482222396
To: <sip:3003@10.10.1.5>;tag=as02c3fff4
Call-ID: 617011065@10.10.1.6
CSeq: 14 BYE
Contact: <sip:3003@10.10.1.6:5060>
Authorization: Digest username="3003", realm="asterisk", nonce="6d717867", uri="sip:3003@10.10.1.5", response="260071fa4b7e3664851dd4a921510cf9", algorithm=MD5
Max-Forwards: 30
User-Agent: dble
Content-Length: 0
[2019-01-31 08:13:47] VERBOSE[2944][C-00002010] chan_sip.c:
<--- Transmitting (NAT) to 10.10.1.6:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.10.1.6:5060;branch=z9hG4bK553005757;received=10.10.1.6;rport=5060
From: "3003" <sip:3003@10.10.1.5:5060;user=phone>;tag=482222396
To: <sip:3003@10.10.1.5>;tag=as02c3fff4
Call-ID: 617011065@10.10.1.6
CSeq: 14 BYE
Server: FPBX-2.11.0(11.25.3)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0