How FreePBX allocates dynamic SIP ports as want to develop QoS policy for Trunk

Hi,

my FreePBX system is connected to ‘Freecall’ as outbound SIP provider however, being on a DSL line I am limited in bandwidth to process information especially when line usage is high.

Currently I have migrated away from an ill performing Cisco 1801 WAN gateway to an old Sun Netra T105 SPARC server running OpenBSD as main gateway/router/firewall/NAT solution.

It has been a recurring problem that voice quality gets affected by high bandwidth on my network over the WAN link and now sitting down and trying to do something about it I find myself slightly lost…

To describe this question is quite tough but basically my FreePBX is being used as SIP server and Proxy at present and is connected via SIP trunk to the ‘Freecall’ provider on port 5060 (standard SIP port).

The issue I have arises when I try to make an outbound call…

The SIP Voice channels seem to get allocated dynamically on the server and don’t have any static destication either (I am guessing as Freecall is connected to many providers).

Is there a way or a set of predefined ports that Asterisk (FreePBX) uses to allocate for SIP Voice communication or how are these ports defined?

I have been reading about using a STUN server, but it seems that it really is only necessary if people have problems in getting UDP packets through NAT (traversal) and I’m not sure if it would sort my issue.

My aim really is to achieve port based traffic prioritization within my network but how to do so if destination IP addresses and both source and destination ports keep changing?

Can anyone help me understand this better and hopefully suggest a plausible solution??

Many thanks!

There was nothing wrong with your 1801, you don’t understand QOS.

QoS will do nothing if you are saturating your download speed.

It sounds like you are trying to prioritize your upload speed.

You need to set the DSCP/ToS bit on the Asterisk server then build a priority map in the router based on the value.

You did not provide any Asterisk version or FreePBX info.

Lastly FreePBX does not do call setup Asterisk does.

My 1801 kept crashing and claiming “out of memory errors” - NAT table had over 7000 entries. The Sun Netra has cleared that up now as I can still have all those entries and the server won’t crash, but it is true I am still learning QoS and many other network/server related concepts which are more advanced then basic setups or training will give.

This I understand, however say if something of low priority was set to use 6kbps via QoS but ‘borrow’ bandwidth if needed, wouldn’t say Voice with assured 200kbps be quarenteed that amount as the lower priority stuff would either get queued or rejected?

Yep that is what I am trying to do as unfortunately ADSL 2+ Annex A only provides up to >1Mbs upstream meaning that I need prioritize traffic flow so that the Voice gets an assured 200kbps (FreePBX is reporting I/O speeds on interface at round 15kB/s).

Aha something I need to learn how to do…

Sorry, didn’t think was relevant at the initial phase of the question as no configuration was being done but more needing to grab the basics…

FreePBX version is 2.10.0.8 with Asterisk version: asterisk18-core-1.8.12.0-32_centos5

Maybe a bit behind with what is current version as haven’t done a “yum update” in a while…

FreePBX is just the web-ui for Asterisk - however I kind of state it like this as I view FreePBX as a sort-of self contained OS… based on CentOS5.x

FreePBX is a GUI that you use to configure Asterisk and to enable PBX features.

If you are talking about the FreePBX distro that’s a different subject.

Still, QoS differv marking is way out of scope of either as it uses iptables fuctionality.

You also don’t reserve bandwidth, you prioritize packets.

I was actually talking about the distro which I am running ever since you suggested I should move away from Trixbox…

Ok, I thought that it would be in the scope of the FreePBX distro but guess I was wrong…

Uh, perhaps I am looking at things from a network point of view or simply just getting myself confused.

My aim was really to prioritize the VoIP traffic over all others so that the Voice data gets first dibs at the line, even if conjested.

Anyway, thanks for the clarification and patience while I strive to learn further :slight_smile:

By the way Scott, if you ever come across the Atlantic over to the UK make sure you ping me as I would be delighted to buy you a beer or whatever your preference to sincerely say thankyou for all your help over time!

I know I’m probably not one of the most gifted engineers and sometimes take a long time to learn things but it is a pleasure when people like yourself are so eager to help and dedicate their knowledge and time…

I don’t know what to do to get better at things, but I keep plugging in the hope that one day I will get it :slight_smile:

You once told me “Scott is always right”… I concur…!!!

If I said “Scott is always right” I must have been trying to be funny. I am not always right.

My UK POP is in Basingstoke and I usually stay up at the Holiday Inn when I am in town.

I have not been in about 5 years. Always enjoy my visits.

So I will append an :stuck_out_tongue: to the end of the sentence… you did also quote to tell your wife too btw :slight_smile:

Hmm… I always thought you were in the US for some funny reason…

If I’m ever up there I will make the effort to at least get someone (Inn Keeper) to pass on a PM if can’t find you in person! (am in London btw, so I guess jump on a train and head towards Reading then check the map ask someone for directions and if I still don’t get lost might be able to contact the Inn Keeper)

I do really mean the thanks and appreciation, just wish I had your level of knowledge and experience. (Note to self keep typing, keeping plugging and keep hacking and maybe you will get there!)

Ok now to continue plugging away at my QoS knowledge and hopefully get OpenBSD’s Packet Filter setup to accomodate the VoIP ‘tagged’ traffic.

My web traffic and misc is doing fine it seems - though what would now completely be off-topic :slight_smile:

I am in the US. Our POP is in a shared data center. We have one in Hong Kong and Australia also. The data center is in Chineham technology park if you know where that is.

Need some International Transit bandwidth or a nice managed eVPN? Imagine trunks from UK to US with QoS and a meaningful SLA.

Lot’s of interesting services.

That sounds really cool!

If were offering a higher b/w based internet connection technology I would go for it!!!

There is one company here in the UK which gives residences fiber of up to 1Gbps (try routing at 1Gbps on a Cisco ISR router - max Cisco claim is 75Mbps for the 29xx range).

Anyhow, would love to go for that then yeah maybe create a few VPN’s to the US as I badly need a US based web proxy. Currently the only way I get to watch the Indycar races off the Youtube channel is if a friend downloads them then I FTP to his system and pull it in to mine from there…

At home I’m running a 72" Sun Microsystems Rack cabinet filled with a few old SPARC servers and some newer x64 Quad Core and ATOM boxes all coupled with some Cisco 29xx series switches, a Cisco 1801W router and now a Sun Netra T105 running as gateway/NAT/firewall linked to a Cisco 877W being used as a dumn modem (ATM bridge mode).

It’s awsome stuff to play around with and lean - which is what I really need to do most since at work where I’m surpposed to be the VoIP guy I can take a lot of the concepts and start implementing them - although we do run Cisco CUCM over there coupled with Juniper firewall/router solutions and Cisco L3 switches and Cisco IP phones as oposed to my Polycom IP 601’s. Lot’s of fun playing around too, but just need to get the more advances LAN network stuff learned like QoS. Though I did managed to learn 802.1q tagging and use of LACP on multiple switchport links quick easily, even when coupled to OpenBSD as routing solution (though of course was lab as we wouldn’t run something like that).

Actually something I really would love to see if possible is the integration between the Polycom Phone Book directory and Asterisk. Though it is possible to build a phone book on the handsets using an XML file with the MAC address, but I was interested to see if one could get CUCM style integration of phone book services, by inputting into the FreePBX GUI and doing away with the XML or having a script that would build the XML file from Asterisk…

Well am going to build jnettop on my Netra now which should take a few hours (on a 400MHz system) so take care and have a good evening (afternoon) and thanks again for the help and assistance!!!