Asterisk and Polycom using SIP through Vera's OpenWrt Firewall

Hi All,

This is my first post and I’m fast becoming a huge fan of Vera. The collection of scripts that they have put together are great. Here’s my current issue(s)…

I have a Polycom phone and I’m trying to get SIP to work through OpenWrt.

Question #1:

I can make phone calls out to my SIP server, but calls back to my phone do not work. I’ve opened up TCP ports 5060-5070 on the firewall and UDP ports 10000-20000 (for RTP as defined on my asterisk server), but phone calls can’t seem to “punch” through the firewall to my phone. Any ideas on how I can get phone calls to come through Vera’s OpenWrt firewall?

Question #2:

It seems that there is no space to install any additional builds (OpenWrt → Network → QoS). Do you have any recommendations for supporting QoS through the firewall?

Thank you in advance for your responses.

personally I use the vera as my firewall and router as I dont really have any fancy needs. But others seem to think that it’s crazy to use vera as a router and firewall.

maybe in a case where you need QOS and the like it would be best to have a standalone router/firewall and just hang the vera off of it?

Thanks for your reply, michaelk! :slight_smile:

OpenWrt is a great firewall. I’ve used it in other installations. I don’t see the need to have two firewall based appliance running and “waste” the electricity (and cost). Why even have it as a firewall if it shouldn’t be used as one.

According to OpenWrt, it seems the ‘nathelper’ utility utility might help:

https://forum.openwrt.org/viewtopic.php?id=18284

…it seems that micasaverde is locking down OpenWrt and the modules that you can install (understandably so for support). Any suggestions on how I can get SIP to work. I’m sure this is going to be more and more of an issue especially with people that use services such as Vonage.

Thanks again for the comments. :slight_smile:

ahh… I found part of the problem. The OpenWrt package repositories need to be updated. It seems now I can install the various OpenWrt packages by going under OpenWrt → System → Packages and deleting the two repositories there and adding these two instead:

snapshots http://downloads.openwrt.org/snapshots/trunk/brcm-2.4/packages
X-Wrt http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/brcm_2_4/packages

Now the packages are downloading, but it seems ipkg doesn’t work. :frowning:

Here’s the error message I get now when installing QoS:

[b][tt]Installing Nbd’s QoS scripts …

Installing qos-scripts (1.2.1-2) to root…
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/brcm_2_4/packages/Packages
Updated list of available packages in /usr/lib/ipkg/lists/X-Wrt
Downloading http://downloads.openwrt.org/snapshots/trunk/brcm-2.4/packages/Packages
Updated list of available packages in /usr/lib/ipkg/lists/snapshots
Done.
Installing qos-scripts (1.2.1-2) to root…

A compatible QOS package was not found to be installed.[/tt][/b]

Any thoughts on how this can be fixed without manually extracting everything?

[quote=“chrisvera, post:3, topic:165635”]Thanks for your reply, michaelk! :slight_smile:

OpenWrt is a great firewall. I’ve used it in other installations. I don’t see the need to have two firewall based appliance running and “waste” the electricity (and cost). Why even have it as a firewall if it shouldn’t be used as one.

Thanks again for the comments. :)[/quote]

pretty much i agree- but you basically hit on the problem in your next post. MCV has an older verstion of WRT in play and you need to fight it to do fancy stuff like you want.

Do a search on some of the term’s for the problems you have found- it’s all a bit over my head- but there’s a few threads discussing it and how to work your way around it.

In regards to installing additional OpenWrt packages on Vera, keep in mind that the Vera software is distributed as firmware for the device. Every time you upgrade to a new version of Vera, you will need to reinstall and reconfigure any packages you installed.

I gave up trying to get Vera to play nice with my Polycom phone and decided to stick with using my Dlink router and have Vera just bridged.
My Polycom phone is configured with 2 lines and SIP credentials from different providers and its a miracle that it works really. It took some work to figure out how to do it.

So are there any instructions for manually installing the ipkg packages since ipkg does not work. Or even better, what about fixing ipkg so it does work?

Thanks!

Check the OpenWrt page on the wiki. http://wiki.micasaverde.com

This is exactly what I’m looking for. Thanks, Mike!

So I follow those instructions, but it seems there is not enough storage to install ‘Nbd’s QoS Scripts (recommended)’

Here’s the output that I get:

Installing Nbd's QoS scripts ...

Installing qos-scripts (1.2.1-2) to jffs…
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages/qos-scripts_1.2.1-2_mipsel.ipk
Installing tc (2.6.25-1) to jffs…
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages/tc_2.6.25-1_mipsel.ipk
Installing kmod-sched (2.4.35.4-brcm-2.4-1) to jffs…
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages/kmod-sched_2.4.35.4-brcm-2.4-1_mipsel.ipk
Installing kernel (2.4.35.4-brcm-2.4-1) to jffs…
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages/kernel_2.4.35.4-brcm-2.4-1_mipsel.ipk
Installing iptables-mod-filter (1.3.8-4.1) to jffs…
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages/iptables-mod-filter_1.3.8-4.1_mipsel.ipk
Installing iptables (1.3.8-4.1) to jffs…
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages/iptables_1.3.8-4.1_mipsel.ipk
Installing kmod-ipt-core (2.4.35.4-brcm-2.4-1) to jffs…
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages/kmod-ipt-core_2.4.35.4-brcm-2.4-1_mipsel.ipk
Installing kmod-ipt-filter (2.4.35.4-brcm-2.4-1) to jffs…
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages/kmod-ipt-filter_2.4.35.4-brcm-2.4-1_mipsel.ipk
Installing iptables-mod-ipopt (1.3.8-4.1) to jffs…
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages/iptables-mod-ipopt_1.3.8-4.1_mipsel.ipk
Installing kmod-ipt-ipopt (2.4.35.4-brcm-2.4-1) to jffs…
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages/kmod-ipt-ipopt_2.4.35.4-brcm-2.4-1_mipsel.ipk
Installing iptables-mod-conntrack-extra (1.3.8-4.1) to jffs…
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages/iptables-mod-conntrack-extra_1.3.8-4.1_mipsel.ipk
Installing kmod-ipt-conntrack-extra (2.4.35.4-brcm-2.4-1) to jffs…
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages/kmod-ipt-conntrack-extra_2.4.35.4-brcm-2.4-1_mipsel.ipk
Installing kmod-ipt-conntrack (2.4.35.4-brcm-2.4-1) to jffs…
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages/kmod-ipt-conntrack_2.4.35.4-brcm-2.4-1_mipsel.ipk
Installing iptables-mod-imq (1.3.8-4.1) to jffs…
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages/iptables-mod-imq_1.3.8-4.1_mipsel.ipk
Installing kmod-ipt-imq (2.4.35.4-brcm-2.4-1) to jffs…
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages/kmod-ipt-imq_2.4.35.4-brcm-2.4-1_mipsel.ipk
Downloading http://downloads.openwrt.org/kamikaze/8.09.2/brcm-2.4/packages/Packages
Updated list of available packages in /usr/lib/ipkg/lists/snapshots
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages/Packages
Updated list of available packages in /usr/lib/ipkg/lists/X-Wrt
Done.
Installing qos-scripts (1.2.1-2) to jffs…
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages/qos-scripts_1.2.1-2_mipsel.ipk
Installing tc (2.6.25-1) to jffs…
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages/tc_2.6.25-1_mipsel.ipk
Installing kmod-sched (2.4.35.4-brcm-2.4-1) to jffs…
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages/kmod-sched_2.4.35.4-brcm-2.4-1_mipsel.ipk
Installing kernel (2.4.35.4-brcm-2.4-1) to jffs…
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages/kernel_2.4.35.4-brcm-2.4-1_mipsel.ipk
Installing iptables-mod-filter (1.3.8-4.1) to jffs…
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages/iptables-mod-filter_1.3.8-4.1_mipsel.ipk
Installing iptables (1.3.8-4.1) to jffs…
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages/iptables_1.3.8-4.1_mipsel.ipk
Installing kmod-ipt-core (2.4.35.4-brcm-2.4-1) to jffs…
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages/kmod-ipt-core_2.4.35.4-brcm-2.4-1_mipsel.ipk
Installing kmod-ipt-filter (2.4.35.4-brcm-2.4-1) to jffs…
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages/kmod-ipt-filter_2.4.35.4-brcm-2.4-1_mipsel.ipk
Installing iptables-mod-ipopt (1.3.8-4.1) to jffs…
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages/iptables-mod-ipopt_1.3.8-4.1_mipsel.ipk
Installing kmod-ipt-ipopt (2.4.35.4-brcm-2.4-1) to jffs…
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages/kmod-ipt-ipopt_2.4.35.4-brcm-2.4-1_mipsel.ipk
Installing iptables-mod-conntrack-extra (1.3.8-4.1) to jffs…
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages/iptables-mod-conntrack-extra_1.3.8-4.1_mipsel.ipk
Installing kmod-ipt-conntrack-extra (2.4.35.4-brcm-2.4-1) to jffs…
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages/kmod-ipt-conntrack-extra_2.4.35.4-brcm-2.4-1_mipsel.ipk
Installing kmod-ipt-conntrack (2.4.35.4-brcm-2.4-1) to jffs…
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages/kmod-ipt-conntrack_2.4.35.4-brcm-2.4-1_mipsel.ipk
Installing iptables-mod-imq (1.3.8-4.1) to jffs…
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages/iptables-mod-imq_1.3.8-4.1_mipsel.ipk
Installing kmod-ipt-imq (2.4.35.4-brcm-2.4-1) to jffs…
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages/kmod-ipt-imq_2.4.35.4-brcm-2.4-1_mipsel.ipk

A compatible QOS package was not found to be installed.

Any recommendations? Should I install a USB drive and mount /jffs to the USB drive so that packages can be quickly and easily installed in the future? If so, any recommendations on exactly how to do that?

Thank you in advance.

That sounds like a good plan to me. After a firmware update you should just have to re-setup the mounting of the USB drive and the mapping of jffs.

For everyone’s reference, this is what has finally worked for me with my VOIP phone to configure OpenWrt:

Open OpenWrt → Network → Firewall:

[tt]Protocol: udp
Destination Ports: 10000-20000 192.168.4.126

Protocol: tcp
Destination Ports: 5060-5070 192.168.4.126[/tt]

Phone calls are now routing perfectly to my phone from our asterisk server. :slight_smile:

Maybe I’m missing something but isn’t that what you did in your first post about opening those ports and it didn’t work. What did you change? Did you have the wrong ip address assigned to those ports?

TCP versus UDP and I didn’t open up 5060-5070. :slight_smile:

Oh okay you had them reversed. ;D

chris,

have you tinkered any further with the qos install. I’m thinking that’s what I need. During heavy load, my SQ puck gets kicked off the vera frequently. Sometimes the only fix is a reboot of vera.