I have a Asterisk SVR in my LAN and which is up & running. it is mapped to a public address by configuring a Static NAT in my Cisco 805 router.
All my sip phones in the LAN is working without aproblem within the LAN, voice quality is also good. But in the WAN (Beyond my router) the SIP phones are even registered with my Asterisk SVR without any problem, you can ring each other, But when you pick the phone there’s no voice is coming in both sides. Also the ring-back tone could only be only hear from the SIP phone side only.
Here’s my specific places of SIP.conf file.
Please help me to solve this problem.
[general]
context=sip_tute ;My Default context for incoming calls
port=5060
bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all)
srvlookup=yes
;When Asterisk is in behind a NAT
externip = xx.xx.xx.xx. ;//Our router’s serial interface
; Address that we’re going to put in outbound SIP messages
you are obviously tunneling the SIP packets (port 5060), but i’ll bet your forgot the RTP packets (10000-20000 or so?) udp. another reason why SIP sucks behind a firewall, compared to IAX…
Another problem you can have is where the internal IP address of your SIP phone is in the same subnet address range as the internal IP address of your Asterisk box.
As far as I can tell from debugging the SIP packets that get sent in this scenario, Asterisk sees the incoming packets labelled with what, to it, appear to be a local IP address, so it puts its local IP address in the outbound packets instead of the value of externalip. The symptoms exhibited in this scenario are SIP phones registering and then immediately being labelled UNREACHABLE because the SIP OPTIONS message being sent to the phone is being sent with the wrong IP address in the headers.
If you use nat=always, I believe this forces Asterisk to use the source IP address and port of the packets rather than the IP address and port in the SIP headers, although you may still find you have to put your SIP phone on a different subnet.
Yeah, I think i have the exact problem scenario you have mentioned. My SIP phones that are outside the LAN soon after registering, immediately being labelled UNREACHABLE.
My Sip phone and the Asterisk SVR are in different subnet ranges as well. And I have tried with nat=always, nat=yes, nat=route options one by one in my sip.conf but not succeeded anyway.
Following is my RTP entry in rtp.conf.
rtpstart=10000
rtpend=20000
Yes i have already put that properly. You can see my sip.conf at the begining of this forum question.
Yesterday I have tested with an IAX soft phone with Asterisk. That works fine in both LAN and WAN.
But I have to work with SIP phones, 'cos I have certain SIP phones that has to be configured with my Asterisk SVR in WAN. I hav no choice rather than working with SIP somehow. As IAX is workin…of course my SIP phones are working nicely in the LAN…I wonder my problem is with NAT… But i have even tried by port forwarding my SIP and RTP ports in my router… But it also didn’t help.
Pls help…
Do some one know any IAX hard phones that works on gsm or g729 for cheaper prices?
Yes… At last I’m able to fix this voice problem with your help.
Now my sip phones in the WAN are working cool, but there’s still a little noise in the Asterisk side FXS lines…sip phone side it is almost perfect…Now i’m trying to reduce this noise problem as well. If you have any idea please inform me.
What i had done was downloaded a new sip phone which has some additional features…i guess. This phone is known as “Express Talk”. In order to obtain this windows softphone you can download it for free from nch.com.au/talk/index.html.
And i have came to know that some devices can easily be configured with this NAT=allways option and some are NOT.