Hello everyone, So I’m very new to asterisk servers and I have a beginner question please.
I have 2 asterisk servers each one has its pjsip extensions and i would like to connect both servers so extension 1 from server 1 can call and receive calls from extension 2 in server 2.
I read so many articles about pjsip trunks, pjsip channels IAX and i’m totally lost, i tried some solutions but i was not able to connect the 2 servers. For more information about my network, both servers are in a local network and have a static IP, IP-Server1=192.168.1.X , IP-Server2=192.168.1.Y
;[mytrunk]
;type=endpoint
;transport=transport-udp
;context=from-external
;disallow=all
;allow=ulaw
;aors=mytrunk
; ;A few NAT relevant options that may come in handy.
;force_rport=yes ;It's a good idea to read the configuration help for each
;direct_media=no ;of these options.
;ice_support=yes
;[mytrunk]
;type=aor
;contact=sip:198.51.100.1:5060
;[mytrunk]
;type=identify
;endpoint=mytrunk
;match=198.51.100.1
Hello, thanks for your reply, those configuration should be made on both ends? what i meaning to say is should i create the same thing on both servers and only change the IPs?
I’m sorry for posing simple questions but those configuration are only to make the trunk connection?
and if so, regarding the contact number and extension what should i do?
I was expecting you will be able to create a simple dial plan for inbound and outbound calls on /etc/asterisk/extensions.conf, If this is not the case http://www.asteriskdocs.org/
You need to provide the contact address in the AOR section, so it knows where Joe is. I pointed out the right part of the sample configuration file, for an example, only yesterday.
For a trunk, you would normally dial ${EXTEN}@Joe.