Re: общий нумерной план CUCM <=> ASTERISK
Добавлено: 05 авг 2020, 21:54
Последние куски кода как Вы брали ? Почему такая каша из разных файлов ?
Русский форум Asterisk сообщества
https://forum.asterisk.ru/
Извиняюсь, немного не туда код вставил.zzuz писал(а):Последние куски кода как Вы брали ? Почему такая каша из разных файлов ?
Код: Выделить всё
core set verbose 19
Zavr2008 писал(а):Не видно иначе выхлопа Астера.Код: Выделить всё
core set verbose 19
Код: Выделить всё
<--- SIP read from UDP:192.168.224.2:5060 --->
INVITE sip:3155@192.168.2.160:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.224.2:5060;branch=z9hG4bK504034335e4af
From: "Gluschenko Roman" <sip:1151@192.168.224.2>;tag=32390182~fd2bd050-fb1b-43ae-9365-67438b5d6423-42515974
To: <sip:3155@192.168.2.160>
Date: Thu, 06 Aug 2020 14:12:35 GMT
Call-ID: deded100-f2c10fd3-1819a2-2e0a8c0@192.168.224.2
Supported: timer,resource-priority,replaces
Min-SE: 1800
User-Agent: Cisco-CUCM11.5
Allow: INVITE, OPTIONS, INFO, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY
CSeq: 101 INVITE
Expires: 180
Allow-Events: presence, kpml
Supported: X-cisco-srtp-fallback,X-cisco-original-called
Call-Info: <sip:192.168.224.2:5060>;method="NOTIFY;Event=telephone-event;Duration=500"
Session-ID: 4b39b7dc00105000a0000c75bd44c0f2;remote=00000000000000000000000000000000
Cisco-Guid: 3739144448-0000065536-0000127975-0048277696
Session-Expires: 1800
P-Asserted-Identity: "Gluschenko Roman" <sip:1151@192.168.224.2>
Remote-Party-ID: "Gluschenko Roman" <sip:1151@192.168.224.2>;party=calling;screen=yes;privacy=off
Contact: <sip:1151@192.168.224.2:5060>;+u.sip!devicename.ccm.cisco.com="SEP0C75BD44C0F2"
Max-Forwards: 13
Content-Type: application/sdp
Content-Length: 206
v=0
o=CiscoSystemsCCM-SIP 32390182 1 IN IP4 192.168.224.2
s=SIP Call
c=IN IP4 192.168.224.1
t=0 0
m=audio 30048 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
<------------->
--- (24 headers 9 lines) ---
Sending to 192.168.224.2:5060 (no NAT)
Sending to 192.168.224.2:5060 (no NAT)
Using INVITE request as basis request - deded100-f2c10fd3-1819a2-2e0a8c0@192.168.224.2
Found peer 'trunk-cucm2' for '1151' from 192.168.224.2:5060
Got SDP version 1 and unique parts [CiscoSystemsCCM-SIP 32390182 IN IP4 192.168.224.2]
Found RTP audio format 0
Found RTP audio format 101
Found audio description format PCMU for ID 0
Found audio description format telephone-event for ID 101
Capabilities: us - (ulaw), peer - audio=(ulaw)/video=(nothing)/text=(nothing), combined - (ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 192.168.224.1:30048
Looking for 3155 in call-in (domain 192.168.2.160)
<--- Reliably Transmitting (NAT) to 192.168.224.2:5060 --->
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 192.168.224.2:5060;branch=z9hG4bK504034335e4af;received=192.168.224.2;rport=5060
From: "Gluschenko Roman" <sip:1151@192.168.224.2>;tag=32390182~fd2bd050-fb1b-43ae-9365-67438b5d6423-42515974
To: <sip:3155@192.168.2.160>;tag=as6afa77cd
Call-ID: deded100-f2c10fd3-1819a2-2e0a8c0@192.168.224.2
CSeq: 101 INVITE
Server: Asterisk PBX 16.12.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0
<------------>
[Aug 6 17:12:35] NOTICE[1191][C-0000005b]: chan_sip.c:26818 handle_request_invite: Call from 'trunk-cucm2' (192.168.224.2:5060) to extension '3155' rejected because extension not found in context 'call-in'.
Scheduling destruction of SIP dialog 'deded100-f2c10fd3-1819a2-2e0a8c0@192.168.224.2' in 6400 ms (Method: INVITE)
<--- SIP read from UDP:192.168.224.2:5060 --->
ACK sip:3155@192.168.2.160:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.224.2:5060;branch=z9hG4bK504034335e4af
From: "Gluschenko Roman" <sip:1151@192.168.224.2>;tag=32390182~fd2bd050-fb1b-43ae-9365-67438b5d6423-42515974
To: <sip:3155@192.168.2.160>;tag=as6afa77cd
Date: Thu, 06 Aug 2020 14:12:35 GMT
Call-ID: deded100-f2c10fd3-1819a2-2e0a8c0@192.168.224.2
User-Agent: Cisco-CUCM11.5
Max-Forwards: 70
CSeq: 101 ACK
Allow-Events: presence, kpml
Content-Length: 0
<------------->
--- (11 headers 0 lines) ---
Really destroying SIP dialog 'deded100-f2c10fd3-1819a2-2e0a8c0@192.168.224.2' Method: ACK
r0*CLI>
Эту ошибку я раньше видел, но не понял, из-за чего она, т.к. в сall-in прописано это:Call from 'trunk-cucm2' (192.168.224.2:5060) to extension '3155' rejected because extension not found in context 'call-in'.
Код: Выделить всё
[call-in]
exten => trunk-cucm1,1,Dial(SIP/3155)
exten => trunk-cucm2,1,Dial(SIP/3155)
1151 - c этого номера звоню из CUCM.ded писал(а):У вас прописаны пиры [trunk-cucm1] и [trunk-cucm2], но Астериск ассоциирует входящий инвайт с каким-то 1151.
Sending to 192.168.224.2:5060 (no NAT)
Sending to 192.168.224.2:5060 (no NAT)
Using INVITE request as basis request - 1c325880-f2a1d67e-17f24a-2e0a8c0@192.168.224.2
Found peer '1151' for '1151' from 192.168.224.2:5060
Поэтому говорит - unauthorized.
Уберите пока 1151.
Код: Выделить всё
[general]
externaddr=192.168.2.160:5060
language=ru
context=default
allowoverlap=no
udpbindaddr=0.0.0.0
tcpenable=no
tcpbindaddr=0.0.0.0
transport=udp
srvlookup=yes
allowguest=no
limitonpeers=yes
[authentication]
[IT](!)
type=friend
context=call-out
secret=135129
host=dynamic
nat=no
qualify=yes
canreinvite=no
callgroup=1
pickupgroup=1
call-limit=1
dtmfmode=auto
disallow=all
allow=alaw
allow=ulaw
allow=g729
allow=g723
allow=g722
[3155](IT)
callerid="test mac" <3155>
[trunk-cucm1]
type=peer
context=call-in
host=192.168.224.1
port=5060
insecure=port,invite
nat=yes
disallow=all
allow=allaw,ulaw
qualify=yes
[trunk-cucm2]
type=peer
context=call-in
host=192.168.224.2
port=5060
insecure=port,invite
nat=yes
disallow=all
allow=allaw,ulaw
qualify=yes
Код: Выделить всё
[general]
static=yes
writeprotect=no
[globals]
[default]
[handup-sip]
exten => _X!,1,HangUp()
[call-out]
exten => _XXXX,1,Dial(SIP/${EXTEN}&SIP/${EXTEN}@trunk-cucm1)
exten => _XXXX.,1,Dial(SIP/0${EXTEN}@trunk-cucm1)
include => handup-sip
[call-in]
exten => trunk-cucm1,1,Dial(SIP/3155)
exten => trunk-cucm2,1,Dial(SIP/3155)
Код: Выделить всё
[call-in]
exten => _XXXX,1,Dial(SIP/3155)
exten => _XXXX.,1,Dial(SIP/3155)
Код: Выделить всё
[call-in]
exten => _XXXX,1,Dial(SIP/3155)
Код: Выделить всё
exten => _XXXX.,1,Dial(SIP/3155)
Согласно вашим планам надоMrRomka писал(а):1151 - c этого номера звоню из CUCM.
Там у нас по плану 1xxx и 2xxx. Здесь планирую 3ххх.