Hi,
Sorry for the silly question, but I can’t seem to properly set up a SIP trunk between 2 Asterisk servers in the same LAN. I’ve done this with IAX2 which is really simple.
I require that one peer is an Asterisk 16 with PJSIP, and the other peer is an Asterisk 1.4 with chan_sip. I dont’ care for user authentication as this is a LAN, and I only want endpoints on each system to access both dialplans.
So, here’s what I’ve tried on the “new” Asterisk PJSIP side:
In pjsip_wizard.conf:
[trunk_defaults](!)
type = wizard
transport = transport-udp
endpoint/allow_subscribe = no
endpoint/allow = !all,alaw,ulaw,opus,gsm,vp8,h264
aor/qualify_frequency = 30
registration/expiration = 1800
[meetbox](trunk_defaults)
sends_auth = no
accepts_auth = no
sends_registrations = no
accepts_registrations = no
remote_hosts = 10.215.147.112:5060
endpoint/context = custom-newsystem
where 10.215.147.112 is the IP addr. of the “old” Asterisk system.
Also, I have this in pjsip.conf:
[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0:5060
In my extensions.conf I have the following:
exten => _XXXX,1,NoOp(${CALLERID(all)} is dialing ${EXTEN} through trunk)
same => n,Dial(PJSIP/meetbox/sip:${EXTEN}@10.215.147.112,300,tTWg)
same => n,Hangup()
I’m expecting at the very least to let endpoints from the “new” system dial extensions on the “old” system.
Finally, on the “old” Asterisk system, I have this in sip.conf:
[meetbox]
deny=all
allow=ulaw
allow=alaw
allow=gsm
allow=opus
allow=vp8
allow=h264
context=custom-newsystem
type=peer
qualify=yes
host=10.215.144.92
videosupport=yes
insecure=no
where 10.215.144.92 is the IP addr. of the “new” system.
Now, on the old system I ran this:
# asterisk -rx "sip show peer meetbox" | grep Status
Status : OK (1 ms)
And on the new Asterisk system pjsip shows me this:
Endpoint: meetbox Not in use 0 of inf
Aor: meetbox 0
Contact: meetbox/sip:10.215.147.112:5060 029c19e659 Avail 2.629
Transport: transport-udp udp 0 0 0.0.0.0:5060
Identify: meetbox-identify/meetbox
Match: 10.215.147.112/32
However, when I make a call from the new ssystem to the old one, I get this on the CLI:
[Sep 26 10:07:14] NOTICE[17773]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request 'OPTIONS' from '"Unknown" <sip:Unknown@10.215.147.115>' failed for '10.215.147.115:5060' (callid: 6538ce441eb7dbda381626e1227a9c19@10.215.147.115) - No matching endpoint found
== Setting global variable 'SIPDOMAIN' to 'sip.mydomain.org'
-- Executing [7000@default:1] NoOp("PJSIP/4053-00000002", ""test me" <4053> is dialing 7000 through trunk") in new stack
-- Executing [7000@default:2] Dial("PJSIP/4053-00000002", "PJSIP/meetbox/sip:7000@10.215.147.112,300,tTWg") in new stack
-- Called PJSIP/meetbox/sip:7000@10.215.147.112
[Sep 26 10:07:27] WARNING[17773]: res_pjsip_outbound_authenticator_digest.c:178 digest_create_request_with_auth: Endpoint: 'meetbox': Unable to create request with auth. No auth credentials for realm(s) 'asterisk' in challenge.
== Everyone is busy/congested at this time (1:0/0/1)
-- Executing [7000@default:3] Hangup("PJSIP/4053-00000002", "") in new stack
== Spawn extension (default, 7000, 3) exited non-zero on 'PJSIP/4053-00000002'
Nothing shows up in the old system’s CLI, and the callee does not ring, of course.
What am I missing?