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
on the invite my server sends it’s LAN IP instead of the “external_signaling_address”
Make sure you fill the these 3 setting with the correct information, according to your network
also on the endpoint section enable the following
rtp_symmetric and force_rport options to help the far-end NAT/firewall
I added under type=endpoint
still it is the same.
See my Sngrep below:
xINVITE sip:firstname.lastname@example.org:5060 SIP/2.0
203.0.113.1:5065 188.8.131.52:5060 192.0.2.1 xVia: SIP/2.0/UDP 203.0.113.1:5065;rport;branch=.......
qqqqqqqqqqwqqqqqqqqq qqqqqqqqqqwqqqqqqqqq qqqqqqqqqqwqqqqqqqqqxFrom: "CallerID_name" <sip:email@example.com>;tag=....
x INVITE (SDP) x x xTo: <sip:firstname.lastname@example.org>
10:04:28.575726 x qqqqqqqqqqqqqqqqqqqqqqqqqq> x x xContact: <sip:email@example.com: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?
Yes I added the two options and it did not make any difference.
I will upgrade later on and will update.
Five options were given above and it is the first three that are the most important.
The first three are set, I replace my ip addresses and somehow they didn’t copy to my post.
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:
what is missing now ?
Back to square 1.
RTP is sent to LAN (same as before upgrade).
the problem was on firewall it did not translate the nat for RTP.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.