Есть железка Eltex TAU-32M.ip, на нём подключены fxo порты (Важно! На них включен CallerID) и прописаны следующим образом на астериске:
sip.conf
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER:
[tau](!)
canreinvite=no
disallow=all
allow=alaw
allow=g729
allow=ulaw
type=friend
host=dynamic
qualify=yes
nat=no
call-limit=1
busylevel=1
rtpkeepalive=5
[414743](tau)
context=context_in_414743
secret=414743
[414800](tau)
context=context_in_414800
secret=414800
[413850](tau)
context=context_in_413850
secret=413850
canreinvite=no
disallow=all
allow=alaw
allow=g729
allow=ulaw
type=friend
host=dynamic
qualify=yes
nat=no
call-limit=1
busylevel=1
rtpkeepalive=5
[414743](tau)
context=context_in_414743
secret=414743
[414800](tau)
context=context_in_414800
secret=414800
[413850](tau)
context=context_in_413850
secret=413850
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER:
<--- SIP read from UDP:192.168.9.198:5060 --->
INVITE sip:414743@192.168.1.110 SIP/2.0
Via: SIP/2.0/UDP 192.168.9.198;rport;branch=z9hG4bKBNH7HN2Fp717S
Max-Forwards: 70
From: <sip:хххххххххх@192.168.1.110>;tag=9vrNp7Zycyv6p
To: <sip:414743@192.168.1.110>
Call-ID: 81e53e88-7a41-1232-94be-a8f94b090ec0
CSeq: 132377 INVITE
Contact: <sip:414743@192.168.9.198>
User-Agent: TAU-72 build 2.10.0 sofia-sip/1.12.10
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE, INFO
Supported: timer, 100rel, replaces
Min-SE: 120
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 267
v=0
o=- 458104687391175711 6984362307843495196 IN IP4 192.168.9.198
s=Session SDP
c=IN IP4 192.168.9.198
t=0 0
m=audio 35154 RTP/AVP 8 0 96
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-16
a=silenceSupp:off - - - -
<------------->
--- (15 headers 11 lines) ---
Sending to 192.168.9.198:5060 (no NAT)
Sending to 192.168.9.198:5060 (no NAT)
Using INVITE request as basis request - 81e53e88-7a41-1232-94be-a8f94b090ec0
Found peer '414743' for 'хххххххххх' from 192.168.9.198:5060
INVITE sip:414743@192.168.1.110 SIP/2.0
Via: SIP/2.0/UDP 192.168.9.198;rport;branch=z9hG4bKBNH7HN2Fp717S
Max-Forwards: 70
From: <sip:хххххххххх@192.168.1.110>;tag=9vrNp7Zycyv6p
To: <sip:414743@192.168.1.110>
Call-ID: 81e53e88-7a41-1232-94be-a8f94b090ec0
CSeq: 132377 INVITE
Contact: <sip:414743@192.168.9.198>
User-Agent: TAU-72 build 2.10.0 sofia-sip/1.12.10
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE, INFO
Supported: timer, 100rel, replaces
Min-SE: 120
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 267
v=0
o=- 458104687391175711 6984362307843495196 IN IP4 192.168.9.198
s=Session SDP
c=IN IP4 192.168.9.198
t=0 0
m=audio 35154 RTP/AVP 8 0 96
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-16
a=silenceSupp:off - - - -
<------------->
--- (15 headers 11 lines) ---
Sending to 192.168.9.198:5060 (no NAT)
Sending to 192.168.9.198:5060 (no NAT)
Using INVITE request as basis request - 81e53e88-7a41-1232-94be-a8f94b090ec0
Found peer '414743' for 'хххххххххх' from 192.168.9.198:5060
[Jun 29 15:05:56] WARNING[1693][C-00005f02]: chan_sip.c:16444 check_auth: username mismatch, have <414743>, digest has <414800>
[Jun 29 15:05:56] NOTICE[1693][C-00005f02]: chan_sip.c:25533 handle_request_invite: Failed to authenticate device <sip:хххххххххх@192.168.1.110>;tag=D26HpNyX4yy7Q
sip debug 2
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER:
<--- SIP read from UDP:192.168.9.198:5060 --->
INVITE sip:414800@192.168.1.110 SIP/2.0
Via: SIP/2.0/UDP 192.168.9.198;rport;branch=z9hG4bKNKj46aQp7m4Ur
Max-Forwards: 70
From: <sip:хххххххххх@192.168.1.110>;tag=tHt5H3r1t77Xm
To: <sip:414800@192.168.1.110>
Call-ID: 113f1391-7a47-1232-94be-a8f94b090ec0
CSeq: 133571 INVITE
Contact: <sip:414800@192.168.9.198>
User-Agent: TAU-72 build 2.10.0 sofia-sip/1.12.10
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE, INFO
Supported: timer, 100rel, replaces
Min-SE: 120
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 268
v=0
o=- 5989584948980890382 7510513151740641081 IN IP4 192.168.9.198
s=Session SDP
c=IN IP4 192.168.9.198
t=0 0
m=audio 35210 RTP/AVP 8 0 96
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-16
a=silenceSupp:off - - - -
<------------->
--- (15 headers 11 lines) ---
Sending to 192.168.9.198:5060 (no NAT)
Sending to 192.168.9.198:5060 (no NAT)
Using INVITE request as basis request - 113f1391-7a47-1232-94be-a8f94b090ec0
Found peer '414743' for 'хххххххххх' from 192.168.9.198:5060
INVITE sip:414800@192.168.1.110 SIP/2.0
Via: SIP/2.0/UDP 192.168.9.198;rport;branch=z9hG4bKNKj46aQp7m4Ur
Max-Forwards: 70
From: <sip:хххххххххх@192.168.1.110>;tag=tHt5H3r1t77Xm
To: <sip:414800@192.168.1.110>
Call-ID: 113f1391-7a47-1232-94be-a8f94b090ec0
CSeq: 133571 INVITE
Contact: <sip:414800@192.168.9.198>
User-Agent: TAU-72 build 2.10.0 sofia-sip/1.12.10
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE, INFO
Supported: timer, 100rel, replaces
Min-SE: 120
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 268
v=0
o=- 5989584948980890382 7510513151740641081 IN IP4 192.168.9.198
s=Session SDP
c=IN IP4 192.168.9.198
t=0 0
m=audio 35210 RTP/AVP 8 0 96
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-16
a=silenceSupp:off - - - -
<------------->
--- (15 headers 11 lines) ---
Sending to 192.168.9.198:5060 (no NAT)
Sending to 192.168.9.198:5060 (no NAT)
Using INVITE request as basis request - 113f1391-7a47-1232-94be-a8f94b090ec0
Found peer '414743' for 'хххххххххх' from 192.168.9.198:5060
Звоним на третий номер (413850) и наблюдаем картину как со вторым вызовом, только с некоторыми отличиями
[Jun 29 15:46:29] WARNING[1693][C-00005f13]: chan_sip.c:16444 check_auth: username mismatch, have <414743>, digest has <413850>
[Jun 29 15:46:29] NOTICE[1693][C-00005f13]: chan_sip.c:25533 handle_request_invite: Failed to authenticate device <sip:хххххххххх@192.168.1.110>;tag=BcH48gjeDvBjc
sip debug 3
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER:
<--- SIP read from UDP:192.168.9.198:5060 --->
INVITE sip:413850@192.168.1.110 SIP/2.0
Via: SIP/2.0/UDP 192.168.9.198;rport;branch=z9hG4bKXUvaN3XjgvpHN
Max-Forwards: 70
From: <sip:хххххххххх@192.168.1.110>;tag=BcH48gjeDvBjc
To: <sip:413850@192.168.1.110>
Call-ID: 60879a28-7a47-1232-94be-a8f94b090ec0
CSeq: 133638 INVITE
Contact: <sip:413850@192.168.9.198>
User-Agent: TAU-72 build 2.10.0 sofia-sip/1.12.10
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE, INFO
Supported: timer, 100rel, replaces
Min-SE: 120
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 268
v=0
o=- 5515060651421494058 7646957626905733616 IN IP4 192.168.9.198
s=Session SDP
c=IN IP4 192.168.9.198
t=0 0
m=audio 35214 RTP/AVP 8 0 96
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-16
a=silenceSupp:off - - - -
<------------->
--- (15 headers 11 lines) ---
Sending to 192.168.9.198:5060 (no NAT)
Sending to 192.168.9.198:5060 (no NAT)
Using INVITE request as basis request - 60879a28-7a47-1232-94be-a8f94b090ec0
Found peer '414743' for 'хххххххххх' from 192.168.9.198:5060
INVITE sip:413850@192.168.1.110 SIP/2.0
Via: SIP/2.0/UDP 192.168.9.198;rport;branch=z9hG4bKXUvaN3XjgvpHN
Max-Forwards: 70
From: <sip:хххххххххх@192.168.1.110>;tag=BcH48gjeDvBjc
To: <sip:413850@192.168.1.110>
Call-ID: 60879a28-7a47-1232-94be-a8f94b090ec0
CSeq: 133638 INVITE
Contact: <sip:413850@192.168.9.198>
User-Agent: TAU-72 build 2.10.0 sofia-sip/1.12.10
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE, INFO
Supported: timer, 100rel, replaces
Min-SE: 120
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 268
v=0
o=- 5515060651421494058 7646957626905733616 IN IP4 192.168.9.198
s=Session SDP
c=IN IP4 192.168.9.198
t=0 0
m=audio 35214 RTP/AVP 8 0 96
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-16
a=silenceSupp:off - - - -
<------------->
--- (15 headers 11 lines) ---
Sending to 192.168.9.198:5060 (no NAT)
Sending to 192.168.9.198:5060 (no NAT)
Using INVITE request as basis request - 60879a28-7a47-1232-94be-a8f94b090ec0
Found peer '414743' for 'хххххххххх' from 192.168.9.198:5060
Делаем следующий шаг меняем очередность пиров на следующую - последний становится первым в списке
[413850](tau)
[414743](tau)
[414800](tau)
И получаем картинку:
Первый звонок - всё хорошо
-- Executing [413850@context_in_413850:1] Set("SIP/413850-000107d2", "CALLERID(num)=8хххххххххх") in new stack
Второй - не проходит
[Jun 29 15:51:10] WARNING[1693][C-00005f17]: chan_sip.c:16444 check_auth: username mismatch, have <413850>, digest has <414743>
[Jun 29 15:51:10] NOTICE[1693][C-00005f17]: chan_sip.c:25533 handle_request_invite: Failed to authenticate device <sip:хххххххххх@192.168.1.110>;tag=m0FF39t0X3eXc
Третий - не проходит
[Jun 29 15:51:30] WARNING[1693][C-00005f18]: chan_sip.c:16444 check_auth: username mismatch, have <413850>, digest has <414800>
[Jun 29 15:51:30] NOTICE[1693][C-00005f18]: chan_sip.c:25533 handle_request_invite: Failed to authenticate device <sip:хххххххххх@192.168.1.110>;tag=XHKeKXj03KQ5m
Промежуточный вывод - успешен звонок только на пира, записанного первым в sip.conf
Может кто что-нибудь подсказать ?
P.S. Если на fxo-портах отключить callerid - всё бегает нормально.