Please help

This has been bugging me for weeks and I can’t figure this out. I have followed just about everyone’s recommendations on here and everywhere else to no end.

Here is my issue, I have my FreePBX version 2.9.0.4 Running Asterisk version 1.6.2.11. I have SIPSTATION as my Trunks and a DID Supplied from Sipstation whom are porting over my phone number.

I am on DSL with a Dynamic IP at this time and I think this may have something to do with it… if you tell me this is the problem then I will get a business DSL and go Static.

I am using DDNS via DynDNS.org to keep my IP set in Asterisk and my settings in Asterisk for SIP is NAT = Never IP Config = Dynamic, Dynamic Hostname = myhostname with a 120 refresh which works quite well.

The problem is I am loosing inbound audio after a day or two, otherwise it works GREAT! A complete reboot brings everything back to normal.

My server is behind a router with the following ports forwarded to my server 5060 UDP - 192.168.0.4, 10001 - 20000 UDP - 192.168.0.4 no others as I am only using SIP.

All my phones are also not using NAT.

I am a bit of a newbie when it comes to Linux but I can get around as much as the next guy, if there is anything else you need to help me figure this thing out before my wife inserts my phones into… well you get the picture. I would be very grateful!!

Other information… Main phone is Cisco 7960 and a PAP2 at this time, maybe when its working I can buy some more but I need to figure this out first.

Many thanks.

externhost=mydomain.dyndns.org
externrefresh=120
localnet=your subnet/mask (ie 192.168.1.0/255.255.255.0)

and open UDP 5060-5061

Thanks for the quick reply… That is the settings I had until a different approach yesterday, the only difference is UDP 5060 is the only port open now. Before I had it just as you have above.

externhost=mydomain.dyndns.org
externrefresh=120
localnet=192.168.0.0/255.255.255.0)

UDP 5060

I will put it back to UDP 5060 - 5061 again but this is not going to work either, both ways fail.

Just for information purposes, I have reloaded from the DISTRO a few times and get the same problem, all Yum Updates done and still the same.

just remember this forum is only for trixbox not asterisk as I was informed by skyingoh when I have a issue.

Not trying to be a jerk anything but that is what I was informed by.

i guess you might have cross-posted to multiple forums then - scott’s right to ask you to post in one place and wait for a response. most people work on multiple forums and you will get a reply provided your question is sensible.

i’ve tried dyndns a couple of times but have always found it easier to get a static ip. if it’s not too expensive you might want to do that and save yourself a lot of trouble.

i take it you posted to the asterisknow forums too?

No, I have not posted to any other forums as of yet, thought I would start at the source first, there seems to be a lot of knowledgeable people using this forum.

So you think the dyndns update or should I say more like the dynamic IP that is causing this issue?

I can move to a business DSL but I have a great deal with my DSL provider due to some huge problems I had with them a while back, I kinda don’t want to make a change to the account if I can avoid it but I am also not trying to avoid the simple solution.

My concern is why would it cause this issue… I mean the settings in the software are there so they must work or they would have removed them right?

Well that has pissed on my fireworks! I used to have Verizon and they sold out, because I have Frontier now they do not provide Dry Loop of which I have so I would have to get a phone line and DSL which defeats the purpose and the price goes up to $90 a month which again defeats my purpose.
In other words I can’t get a static IP which is a bunch of horse poop!
So I have no choice but to work with what I have.

I am not sure why NWOHIOBB barged in, someone had cross posted and I had two windows open and made a quick mistake in my grammar.

WRT the topic at hand. Dynamic DNS works fine and by the fact that it works for awhile and the fails I would be looking at your firewall/router.

You can always do a ‘sip show settings’ in Asterisk to make sure that it is picking up the correct IP for the remote system. I would do this when the system is in an impaired and non-impaired state so you have a reference.

How are you actually getting dyndns to update when your public IP changes?

I thought SIP was on UDP and TCP port 5060, not just UDP.

SIP uses whatever you have configured in Asterisk. The default is UDP.

Unless you went in and changed to TCP it uses only port 5060.

RTP uses 10000-2000 UDP by default. You can change /etc/asterisk/rtp.conf and greatly lower the default setting.

Your firewall should also only allow inbound SIP from your carrier’s IP or you are going to have large security concerns.

Here is the results of sip show settings

Global Settings:

UDP SIP Port: 5060
UDP Bindaddress: 0.0.0.0
TCP SIP Port: Disabled
TLS SIP Port: Disabled
Videosupport: No
Textsupport: No
Ignore SDP sess. ver.: No
AutoCreate Peer: No
Match Auth Username: No
Allow unknown access: Yes
Allow subscriptions: Yes
Allow overlap dialing: Yes
Allow promsic. redir: No
Enable call counters: No
SIP domain support: No
Realm. auth: No
Our auth realm asterisk
Call to non-local dom.: Yes
URI user is phone no: No
Always auth rejects: Yes
Direct RTP setup: No
User Agent: FPBX-2.9.0(1.6.2.11)
SDP Session Name: Asterisk PBX 1.6.2.11
SDP Owner Name: root
Reg. context: (not set)
Regexten on Qualify: No
Caller ID: Unknown
From: Domain:
Record SIP history: Off
Call Events: Off
Auth. Failure Events: Off
T.38 support: No
T.38 EC mode: Unknown
T.38 MaxDtgrm: -1
SIP realtime: Disabled
Qualify Freq : 60000 ms

Network QoS Settings:

IP ToS SIP: CS3
IP ToS RTP audio: EF
IP ToS RTP video: AF41
IP ToS RTP text: CS0
802.1p CoS SIP: 4
802.1p CoS RTP audio: 5
802.1p CoS RTP video: 6
802.1p CoS RTP text: 5
Jitterbuffer enabled: No
Jitterbuffer forced: No
Jitterbuffer max size: -1
Jitterbuffer resync: -1
Jitterbuffer impl:
Jitterbuffer log: No

Network Settings:

SIP address remapping: Enabled using externhost
Externhost: mydomain.homeip.net <-- dyndns updated by router.
Externip: 184.13.139.***:5060 <-- *** on purpose.
Externrefresh: 120
Internal IP: 192.168.0.4:5060
Localnet: 192.168.0.0/255.255.255.0
STUN server: 0.0.0.0:0

Global Signalling Settings:

Codecs: 0xe (gsm|ulaw|alaw)
Codec Order: ulaw:20,alaw:20,gsm:20
Relax DTMF: No
RFC2833 Compensation: No
Compact SIP headers: No
RTP Keepalive: 0 (Disabled)
RTP Timeout: 30
RTP Hold Timeout: 300
MWI NOTIFY mime type: application/simple-message-summary
DNS SRV lookup: No
Pedantic SIP support: No
Reg. min duration 60 secs
Reg. max duration: 3600 secs
Reg. default duration: 120 secs
Outbound reg. timeout: 20 secs
Outbound reg. attempts: 0
Notify ringing state: Yes
Include CID: No
Notify hold state: Yes
SIP Transfer mode: open
Max Call Bitrate: 384 kbps
Auto-Framing: No
Outb. proxy:
Session Timers: Accept
Session Refresher: uas
Session Expires: 1800 secs
Session Min-SE: 90 secs
Timer T1: 500
Timer T1 minimum: 100
Timer B: 32000
No premature media: Yes

Default Settings:

Allowed transports: UDP
Outbound transport: UDP
Context: from-sip-external
Nat: No
DTMF: rfc2833
Qualify: 0
Use ClientCode: No
Progress inband: Never
Language:
MOH Interpret: default
MOH Suggest:
Voice Mail Extension: *97
Forward Detected Loops: Yes


One interesting point I should have mentioned is within the sipstation module it shows contact IP and network IP as undefined but has worked ok without it… well to an extent it has.
Also the reported IP address is correct in my router and in asterisk.

My Router has the ability to update DynDNS to reflect any IP address changes.

Reading this on my phone while I got a second, but why do you have NAT=never? Seems to me with the private IP range of 192.168.0.x and not having a bunch of IP’s on the WAN side mapped one-to-one to your LAN devices, you are in fact using NAT.

Maybe I am missing something? My server is behind my router as are the devices using it, they all go into a switch which is also connected to the server which is ported from my router.
Do you think enabling NAT on all my devices and on the server will fix the issue?

The only device that I have got ported through my router is my server, ports 5060 - 5061 UDP and 10001 - 20000 UDP to my server IP.
I was under the impression that devices do not need porting or more to the point you can’t port more then one device with a port #.

My DSL Modem/Router is in bridge mode, which disables the routing on it and I have 2 routers plugged into it, one router is used for my PBX so I don’t confuse ports with the rest of the devices. Now each router picks up its own IP from my ISP of which the server see’s and uses, DynDNS handles the updates and this is reflected in the server.

Right now again it is up and running and I have 2 way audio, but I am sure it will go out again as it has been doing for weeks now… Just waiting to see what it will do.

I guess I misread. I thought you had Nat=never in your SIP_nat.conf file which would not be correct. In your OP you have that setting listed with your SIP_nat.conf entries (hostname=, refresh rate, etc.)

How do you have the ISP modem bridged and then two routers (in parallel from your description)?

Modem is bridged internally (Bridge Mode) which wipes out the routing feature, Firewall and DHCP as it is now a direct connection to the internet. Each router (up to 4 ports) then connects via PPPoe and pulls its own IP address from the ISP.
The modem is/was a 4 port router too, but as mentioned above is disabled so its acting like a gateway as such or more like a peer.

I’ve never seen a “residential” service that allowed multiple PPPoE simultaneous sessions.

I have seen some weird things when multiple devices are fighting for a single PPPoE session and started to wonder if that might be causing you some grief.