[ug](!)
type = peer
host = 10.1.0.194
disallow = all
allow=alaw
nat = no
dtmfmode = rfc2833
insecure=invite
[318501](ug)
context=from-318501
secret=ххххх
fromuser = 318501
username = 318501
[318502](ug)
context=from-318502
secret=ххххх
fromuser = 318502
username = 318502
и т.д. 318503, 318504
Исходящие - отлично. По плану входящие звонки обрабатываются каждый в своем контексте.
Делаю вызов на 318502, попадаю на 318501, вызов на 318503 - попадаю снова на 318501. Какой бы из номеров я не вызывал - всегда попадаю на 318501.
Если закомментировать пира 318501, то, как и следовало ожидать, все звонки сыпятся на 318502 (т.е. на первый зарегистрированный пир).
sip set debug ip 10.1.0.194
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER:
<--- SIP read from UDP:10.1.0.194:5060 --->
INVITE sip:318506@192.168.3.6:5060 SIP/2.0
Via: SIP/2.0/UDP 10.1.0.194:5060;branch=z9hG4bK40928eee175314aaaf5ataN0
To: "xxxx318506"<sip:xxxx318506@10.1.0.194>
From: "8xxxxxxxxxx"<sip:xxxxxxxxxx@10.1.0.194;cpc-rus=1>;tag=a010049-7905
Call-ID: 5aac54b7-0003-0040@10.1.0.73
CSeq: 10885 INVITE
Max-Forwards: 8
Contact: <sip:xxxxxxxxxx@10.1.0.194>
Supported: 100rel
User-Agent: ZTE Softswitch/1.0.0
Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,INFO,REFER,NOTIFY,SUBSCRIBE,PRACK,UPDATE
Content-Type: application/sdp
Content-Length: 178
v=0
o=ZTE 52 4597 IN IP4 192.168.3.5
s=phone-call
c=IN IP4 192.168.3.5
t=0 0
m=audio 10746 RTP/AVP 8 18 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-11
a=ptime:20
<------------->
--- (13 headers 9 lines) ---
Sending to 10.1.0.194:5060 (no NAT)
Using INVITE request as basis request - 5aac54b7-0003-0040@10.1.0.73
Found peer '318501' for 'xxxxxxxxxx' from 10.1.0.194:5060
== Using SIP RTP CoS mark 5
Found RTP audio format 8
Found RTP audio format 18
Found RTP audio format 101
Found audio description format telephone-event for ID 101
Capabilities: us - (alaw), peer - audio=(alaw|g729)/video=(nothing)/text=(nothing), combined - (alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 192.168.3.5:10746
Looking for 318506 in from-318501 (domain 192.168.3.6)
<--- Reliably Transmitting (no NAT) to 10.1.0.194:5060 --->
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 10.1.0.194:5060;branch=z9hG4bK40928eee175314aaaf5ataN0;received=10.1.0.194
From: "xxxxxxxxxxx"<sip:xxxxxxxxxx@10.1.0.194;cpc-rus=1>;tag=a010049-7905
To: "xxxx318506"<sip:xxxx318506@10.1.0.194>;tag=as46bc63c7
Call-ID: 5aac54b7-0003-0040@10.1.0.73
CSeq: 10885 INVITE
Server: SU-967
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0
<------------>
[Feb 27 10:22:55] NOTICE[26869][C-000000a9]: chan_sip.c:25184 handle_request_invite: Call from '318501' (10.1.0.194:5060) to extension '318506' rejected because extension not found in context 'from-318501'.
Scheduling destruction of SIP dialog '5aac54b7-0003-0040@10.1.0.73' in 32000 ms (Method: INVITE)
<--- SIP read from UDP:10.1.0.194:5060 --->
ACK sip:318506@192.168.3.6:5060 SIP/2.0
Via: SIP/2.0/UDP 10.1.0.194:5060;branch=z9hG4bK40928eee175314aaaf5ataN0
To: "xxxx318506"<sip:xxxx318506@10.1.0.194>;tag=as46bc63c7
From: "xxxxxxxxxxx"<sip:xxxxxxxxxx@10.1.0.194;cpc-rus=1>;tag=a010049-7905
Call-ID: 5aac54b7-0003-0040@10.1.0.73
CSeq: 10885 ACK
Max-Forwards: 70
User-Agent: ZTE-SBC
Content-Length: 0
<------------->
--- (9 headers 0 lines) ---
Really destroying SIP dialog '5aac54b7-0003-0040@10.1.0.73' Method: ACK
INVITE sip:318506@192.168.3.6:5060 SIP/2.0
Via: SIP/2.0/UDP 10.1.0.194:5060;branch=z9hG4bK40928eee175314aaaf5ataN0
To: "xxxx318506"<sip:xxxx318506@10.1.0.194>
From: "8xxxxxxxxxx"<sip:xxxxxxxxxx@10.1.0.194;cpc-rus=1>;tag=a010049-7905
Call-ID: 5aac54b7-0003-0040@10.1.0.73
CSeq: 10885 INVITE
Max-Forwards: 8
Contact: <sip:xxxxxxxxxx@10.1.0.194>
Supported: 100rel
User-Agent: ZTE Softswitch/1.0.0
Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,INFO,REFER,NOTIFY,SUBSCRIBE,PRACK,UPDATE
Content-Type: application/sdp
Content-Length: 178
v=0
o=ZTE 52 4597 IN IP4 192.168.3.5
s=phone-call
c=IN IP4 192.168.3.5
t=0 0
m=audio 10746 RTP/AVP 8 18 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-11
a=ptime:20
<------------->
--- (13 headers 9 lines) ---
Sending to 10.1.0.194:5060 (no NAT)
Using INVITE request as basis request - 5aac54b7-0003-0040@10.1.0.73
Found peer '318501' for 'xxxxxxxxxx' from 10.1.0.194:5060
== Using SIP RTP CoS mark 5
Found RTP audio format 8
Found RTP audio format 18
Found RTP audio format 101
Found audio description format telephone-event for ID 101
Capabilities: us - (alaw), peer - audio=(alaw|g729)/video=(nothing)/text=(nothing), combined - (alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 192.168.3.5:10746
Looking for 318506 in from-318501 (domain 192.168.3.6)
<--- Reliably Transmitting (no NAT) to 10.1.0.194:5060 --->
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 10.1.0.194:5060;branch=z9hG4bK40928eee175314aaaf5ataN0;received=10.1.0.194
From: "xxxxxxxxxxx"<sip:xxxxxxxxxx@10.1.0.194;cpc-rus=1>;tag=a010049-7905
To: "xxxx318506"<sip:xxxx318506@10.1.0.194>;tag=as46bc63c7
Call-ID: 5aac54b7-0003-0040@10.1.0.73
CSeq: 10885 INVITE
Server: SU-967
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0
<------------>
[Feb 27 10:22:55] NOTICE[26869][C-000000a9]: chan_sip.c:25184 handle_request_invite: Call from '318501' (10.1.0.194:5060) to extension '318506' rejected because extension not found in context 'from-318501'.
Scheduling destruction of SIP dialog '5aac54b7-0003-0040@10.1.0.73' in 32000 ms (Method: INVITE)
<--- SIP read from UDP:10.1.0.194:5060 --->
ACK sip:318506@192.168.3.6:5060 SIP/2.0
Via: SIP/2.0/UDP 10.1.0.194:5060;branch=z9hG4bK40928eee175314aaaf5ataN0
To: "xxxx318506"<sip:xxxx318506@10.1.0.194>;tag=as46bc63c7
From: "xxxxxxxxxxx"<sip:xxxxxxxxxx@10.1.0.194;cpc-rus=1>;tag=a010049-7905
Call-ID: 5aac54b7-0003-0040@10.1.0.73
CSeq: 10885 ACK
Max-Forwards: 70
User-Agent: ZTE-SBC
Content-Length: 0
<------------->
--- (9 headers 0 lines) ---
Really destroying SIP dialog '5aac54b7-0003-0040@10.1.0.73' Method: ACK
и SIP/2.0 404 Not Found
Подскажите куда смотреть.