Hi
I am using Asterisk 13.1-cert1;
Until now I used SIP for my trunks .
I want set my asterisk behind NAT and for two different IP’s.
If I understand right, In SIP I can specify only one extenip (I need two externip).
So I am trying to use PJSIP.
For inbound calls it works OK, for outbound calls there is no RTP.
my server (with pjsip) is listening on 5065
my remote server (using sip) is listening on 5060
Following is my pjsip file config
I added under type=endpoint
rtp_symmetric=yes
force_rport =yes
still it is the same.
See my Sngrep below:
xINVITE sip:123@222.10.155.111:5060 SIP/2.0
203.0.113.1:5065 222.10.155.111:5060 192.0.2.1 xVia: SIP/2.0/UDP 203.0.113.1:5065;rport;branch=.......
qqqqqqqqqqwqqqqqqqqq qqqqqqqqqqwqqqqqqqqq qqqqqqqqqqwqqqqqqqqqxFrom: "CallerID_name" <sip:0512345678@192.0.2.1>;tag=....
x INVITE (SDP) x x xTo: <sip:123@222.10.155.111>
10:04:28.575726 x qqqqqqqqqqqqqqqqqqqqqqqqqq> x x xContact: <sip:c11606b3-eb4d-45a6-acb0-91564564c887@203.0.113.1:5065>
+0.000424 x 401 Unauthorized x x xCall-ID: d15663d6-a996-4e12-bb7c-540551835652
10:04:28.576150 x <qqqqqqqqqqqqqqqqqqqqqqqqqq x x xCSeq: 19771 INVITE
+0.000787 x ACK x x xAllow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, .......
10:04:28.576937 x qqqqqqqqqqqqqqqqqqqqqqqqqq> x x xSupported: 100rel, timer, replaces, norefersub
+0.000292 x INVITE (SDP) x x xSession-Expires: 1800
10:04:28.577229 x qqqqqqqqqqqqqqqqqqqqqqqqqq> x x xMin-SE: 90
+0.001209 x 100 Trying x x xContent-Type: application/sdp
10:04:28.578438 x <qqqqqqqqqqqqqqqqqqqqqqqqqq x x xContent-Length: 264
+0.001365 x 200 OK (SDP) x x x
10:04:28.579803 x <qqqqqqqqqqqqqqqqqqqqqqqqqq x x xv=0
+0.001008 x ACK x x xo=- 1212567274 1212567274 IN IP4 192.0.2.1
10:04:28.580811 x qqqqqqqqqqqqqqqqqqqqqqqqqq> x x xs=Asterisk
x x RTP (g711a) 1756 x xc=IN IP4 203.0.113.1
10:04:28.806832 x x13476 <qqqqqqqqqqqqqqqq 10224x xt=0 0
+35.977833 x BYE x x xm=audio 10224 RTP/AVP 8 0 101
10:05:04.558644 x qqqqqqqqqqqqqqqqqqqqqqqqqq> x x xa=rtpmap:8 PCMA/8000
+0.000678 x 200 OK x x xa=rtpmap:0 PCMU/8000
10:05:04.559322 x <qqqqqqqqqqqqqqqqqqqqqqqqqq x x xa=rtpmap:101 telephone-event/8000
x x x xa=fmtp:101 0-16
x x x xa=ptime:20
x x x xa=maxptime:150
x x x xa=sendrecv
The version of Asterisk you are using is quite old and may have bugs. Chasing down things that may already be fixed is never fun, so upgrading is wise. I do vaguely remember some NAT bugs then too.
Did you also ensure the transport options were actually set as @ambiorixg12 mentioned?
I upgraded to “Asterisk certified/13.21-cert3”
I have some progress, but now I get “403 Forbidden” on registration.
Following is my registration section in my pjsip.conf:
[mytrunk]
type=registration
outbound_auth=mytrunk
server_uri=sip:mytrunk@222.10.155.111:5060
client_uri=sip:mytrunk@203.0.113.1:5065