Broadband-Hamnet™ Forum :: VoIP
Welcome Guest   [Register]  [Login]
«StartPrev12NextEnd»
 Subject :Asterisk Running Natively on HSMM-MESH Node.. 2012-09-16- 06:39:10 
Joined: 2024-12-01- 06:06:30
Posts: 0
Location

I have been able to successfully get Asterisk to run self-contained on an HSMM-MESH node.  I am now able to plug VoIP phones into wirelessly connected nodes and make phone calls to them through the NAT.  Instructions are attached.  It only takes 30 minutes for the initial setup.

NOTE:  This guide was written with the idea that the user is running Linux to complete the steps.  Instructions may vary slightly for windows users.

EDIT:  Windows version on page 2.



IP Logged
Last Edited On: 2013-11-19- 19:00:36 By KF5JIM for the Reason
 Subject :Re:Asterisk Running Natively on HSMM-MESH Node.. 2012-09-17- 05:01:28 
KJ4IZW
Member
Joined: 2012-09-02- 09:24:35
Posts: 8
Location: SC/EM93

Sounds like a neat application!  And the instructions look easy to follow and well written.

What kind of phones would be good for playing around with this?  Cheap, available, asterisk compatible, and 12V i think would be the criteria ...
From a couple quick searches, seems like maybe the polycom soundpoints (but wasn't sure of exact power reqs)?  Any one have experience with these or other models?

thanks,
--david
KJ4IZW
Aiken, SC

IP Logged
 Subject :Re:Asterisk Running Natively on HSMM-MESH Node.. 2012-09-17- 06:05:39 
Joined: 2024-12-01- 06:06:30
Posts: 0
Location

The phones I got working are the cheap VoIP Grandstream phones and Grandstream HT286 ATA adapters. However, any VoIP phone should be able to work just fine as long as you can configure it with the information specified in step 12.

Side Note: I think that it might be a good idea in a future HSMM-MESH firmware release to have the option to open up ports and poke a hole in the firewall for localnode to use vs. Port Forwarding (I tried it this way and it wouldn't work). This would nullify step 5 and make it's alternative easier.

IP Logged
Last Edited On: 2012-09-17- 08:27:46 By for the Reason
 Subject :Re:Asterisk Running Natively on HSMM-MESH Node.. 2012-09-23- 17:58:01 
Joined: 2024-12-01- 06:06:30
Posts: 0
Location

So here is an update I am pleased with:

In the photograph called "Asterisk1.jpg," you are looking at three con-current phone calls through 6 different phones with asterisk installed on an HSMM-MESH node (KF5JIM-WRT54GL-1B) (and me in the picture). They all stayed connected for an hour before we decided to hang up. Processor usage 0.30 to 0.45.

In another attempt, "Asterisk2.jpg," you are witnessing the routing table between nodes setup throughout hallways in a building with thick walls. In this particular scenerio, do not remove W5VUI-7. The nodes with VoIP phones attached are IOH-5, VUI-6, and 2 on KF5JIM-WRT54GL-1B.  IOH-5 and VUI-6 are each calling different phones on the 1B HSMM-MESH node.  The phones stayed connected for two hours with audio going though them before we decided to hang it up and "call" it a day.


NOTE: Once you open ports in /etc/config/firewall and decide to forward more ports afterwards on that particular node, you will loose the ports you opened on /etc/config/firewall.

Solution: Open the specified ports in the firewall config file and compile your own firmware.



IP Logged
Last Edited On: 2015-02-21- 02:41:15 By KF5JIM for the Reason Asterisk1.jpg removed
 Subject :Re:Asterisk Running Natively on HSMM-MESH Node.. 2012-10-11- 04:39:43 
KJ4IZW
Member
Joined: 2012-09-02- 09:24:35
Posts: 8
Location: SC/EM93

Having an issue installing the packages ...  I also have the "option force_space" line in /etc/ipkg.conf

root@KJ4IZW-1:~# ipkg -force_space install libopenssl_0.9.8i-3.2_mipsel.ipk
Installing libopenssl (0.9.8i-3.2) to root...
ipkg: //usr/lib/ipkg/info/libopenssl.control: No space left on device

root@KJ4IZW-1:~# df -h
Filesystem                Size      Used Available Use% Mounted on
none                      7.0M      2.5M      4.5M  36% /tmp
/dev/mtdblock/4           1.0M      1.0M         0 100% /jffs
mini_fo:/jffs             2.2M      2.2M         0 100% /

I was able to install the first 3 deps (libncurses, libpopt, zlib).

I see that /var is symlinked to /tmp ...    Can I put /usr (or a sub-dir of it) on /tmp as well?  Any recommendations?

Or am i doing something else wrong? Or is hardware insufficient?

This is on a WRT54GL v1.1 (S/N:CL7C) ....  I also have a WRT54G v2.0 (CDF5) mesh node.
Have a couple VOIP phones (PolyCom 501) arriving soon.

--david
KJ4IZW

IP Logged
 Subject :Re:Asterisk Running Natively on HSMM-MESH Node.. 2012-10-12- 05:38:54 
Joined: 2024-12-01- 06:06:30
Posts: 0
Location

The GL I have has been refurbished, and with that Linksys gave it more space. Though we used the force_space option, the router needs to have at least 1.5MB of extra flash memory available. Without this the installation will not complete. Therefore, I would recommend anyone doing this to use a WRT54GS v1-v4 (pref. v1-v3).

IP Logged
Last Edited On: 2012-10-15- 18:58:32 By for the Reason
 Subject :Re:Asterisk Running Natively on HSMM-MESH Node.. 2012-10-16- 16:46:09 
K4EK
Member
Joined: 2012-10-09- 12:57:22
Posts: 4
Location: Elizabethtown, KY

Very nice!  Gonna give this a try within the next couple days.  I have Asterisk running on a Raspberry Pi device now with decent success on the mesh.  Would be awesome to have it running natively on a WRT54G.  Thanks for the info.

73, Doug, K4EK

IP Logged
 Subject :Re:Asterisk Running Natively on HSMM-MESH Node.. 2012-10-16- 17:32:31 
KJ4IZW
Member
Joined: 2012-09-02- 09:24:35
Posts: 8
Location: SC/EM93
I was unable to install on a GL due to limited memory of 4M -- which is the same as the G's ... I have a GS (8M flash) en route that should arrive in next day or so, and will try to install on that and report back. So you will probably get a no-space-left error when installing the libopenssl dependency package...
IP Logged
 Subject :Re:Asterisk Running Natively on HSMM-MESH Node.. 2012-10-19- 04:51:15 
KJ4IZW
Member
Joined: 2012-09-02- 09:24:35
Posts: 8
Location: SC/EM93

I was able to follow the instructions and install on a WRT54GS (v1.1)!

The packages (deps + asterisk) require 2M free on /jffs partition ... So this effectively requires a WRT54GS (not G or GL).

The doc mentions that the custom /etc/config/firewall settings may disappear -- I found this to be the case whenever the mesh web UI was used to update ports/services.
However, I think you can just use the web UI to setup the ports for localnode, and then they will persist (and easier to see/self-documenting from that screen).  The web UI creates "forward" entries in /etc/config/firewall, not "accept" ...  This Was the cause of my one-way-audio issue in initial test.

Here's the setup i've tested with so far:
   VOIP Phone -> Mesh Node
   <mesh>
   Mesh Node:
       Asterisk
       WAN connected to home router (DLink DI-624) LAN port.
       OBI110 (ATA) connected to home router LAN port
           home phone (POTS) connected to OBI

BUT, I do have an issue with "one-way audio", which (from a quick google) seems to be a common problem due to the NAT'ing ... So I'll have to work on that -- probably an issue with going through my home router?? (but's all on internal LAN, so i'd expect it to be open)
Resolved!! See earlier edit in this post.

Waiting on a POE injector to come in the mail, then I can try with a second VOIP phone on a second mesh node ...  I suspect (hope!) that the one-way audio issue is not present with a totally intra-mesh setup.

--david
kj4izw

IP Logged
Last Edited On: 2012-10-22- 09:27:47 By KJ4IZW for the Reason
 Subject :Re:Asterisk Running Natively on HSMM-MESH Node.. 2012-10-19- 05:57:35 
Joined: 2024-12-01- 06:06:30
Posts: 0
Location

The doc mentions that the custom /etc/config/firewall settings may disappear.
That is why I built my own firmware to include the specified open ports. By doing it this way, I am able to get two-way audio.

So you need to open ports 5060, 5004, and 10000-20000 on the asterisk node and forward those ports to the IP address of an IP phone (if it's attached to a regular HSMM-MESH node). Opening the ports as specified in the instruction guide fixes the NAT'ing issue so you can make 2+ hour-long two-way phone calls over the HSMM-MESH network.


I'm glad you got it working!

IP Logged
Last Edited On: 2012-10-19- 06:02:30 By for the Reason
 Subject :Re:Asterisk Running Natively on HSMM-MESH Node.. 2012-10-19- 07:27:23 
K4EK
Member
Joined: 2012-10-09- 12:57:22
Posts: 4
Location: Elizabethtown, KY

Great info, guys.  Yup, you're right about the G and GL. . . not enough space.  Guess I'll have to look for a GS to play with now.  Thanks.

73, Doug, K4EK

IP Logged
 Subject :Re:Asterisk Running Natively on HSMM-MESH Node.. 2012-10-19- 07:57:57 
Joined: 2024-12-01- 06:06:30
Posts: 0
Location
The GS routers are by-far the best way to go. They have the most amount of RAM and flash space available.
IP Logged
 Subject :Re:Asterisk Running Natively on HSMM-MESH Node.. 2012-10-19- 08:29:18 
KJ4IZW
Member
Joined: 2012-09-02- 09:24:35
Posts: 8
Location: SC/EM93

The doc mentions warning that appears, and that it can be ignored:
  [Oct 19 19:17:47] WARNING[427]: db.c:57 dbinit: Unable to open Asterisk database '/var/lib/asterisk/astdb': No such file or directory


If you just do a:
   mkdir -p /var/lib/asterisk

Then that "astdb" starts getting created, and the warning goes away.   No clue what that files for (I'mbrand new to asterisk), and it's binary so nothing obvious from vi.   The code must not try to make the directory, which would yield the "unable to open" message.


73!
--david
kj4izw

IP Logged
 Subject :Re:Asterisk Running Natively on HSMM-MESH Node.. 2012-10-20- 15:31:07 
Joined: 2024-12-01- 06:06:30
Posts: 0
Location
That is correct, but once I restart the router, I have the message reappearing again. So that's why I ignore it.
IP Logged
 Subject :Re:Asterisk Running Natively on HSMM-MESH Node.. 2012-12-04- 08:59:23 
KK5IT
Member
Joined: 2011-06-11- 21:45:13
Posts: 4
Location: Royal Palm Beach, FL
I was able to successfully install the packages after getting the correct order for the depedencies. I have verified that the Asterisk is running on the node by using ps w and that the firewall rules are in place on both nodes per the documentation using vi over putty. When running asterisk -rvvv, I cannot see the phones register. Also, when I run sip show peers from the Asterisk CLI, it shows the 2 extensions that I created with a status of unknown. I am running a WRT54GSv2 with 0.4.3. The phone is a Polycom Soundpoint IP 550 running 3.2.l firmware. Any help or suggestions would be appreciated.
IP Logged
 Subject :Re:Asterisk Running Natively on HSMM-MESH Node.. 2012-12-06- 07:37:41 
Joined: 2024-12-01- 06:06:30
Posts: 0
Location
Two things can be causing the problem: The first is to check that /etc/conf/firewall still has the ports opened up. Did you forward ports on this particular router after editing the /etc/onf/firewall file? If so, there is no need to forward ports on this router since they have already been opened up. Secondly, from past experiences, I found that you have to turn on the asterisk node and let it start up, then plug the phones into the already on HSMM-MESH node with port forwarding (with the phones turned off) (or into the asterisk node (without port forwarding)), and then turn on the phones. Let me know if this help, and if not, e-mail me and we'll get this fixed and post the solution here.
IP Logged
 Subject :Re:Asterisk Running Natively on HSMM-MESH Node.. 2012-12-06- 07:50:48 
KK5IT
Member
Joined: 2011-06-11- 21:45:13
Posts: 4
Location: Royal Palm Beach, FL
Thanks for the reply. I did check the firewall to make sure that it still has the ports and was careful not to do any forwarding using the GUI after manually editing the file to keep from wiping it out as indicated on this site. If I understand the rest of your response then I should do the following. 1. Power on the node with Asterisk and let it sit a few minutes. 2. Plug a phone into the remote node with the forwarding enabled or into the Asterisk node, but without first applying power to the phone. If plugging into the Asterisk node, I will have to use the local LAN IP of the node for the SIP Server and Proxy in my phone. Otherwise, I will use the WiFi address of the Asterisk node for both of those settings as well. 3. My phone has a spot in the set that says NAT. I am guessing that I need to put the WiFi address of the none Asterisk node that I plug the phone into in order for the traffic to get back to me, but not sure. I am reviewing the admin guide for the phone right now. Question: You said above "or into the asterisk node (without port forwarding), and then turn on the phones. Does this mean that the asterisk node cannot have phones behind it while it hosting asterisk?
IP Logged
 Subject :Re:Asterisk Running Natively on HSMM-MESH Node.. 2012-12-06- 08:24:14 
Joined: 2024-12-01- 06:06:30
Posts: 0
Location

Does this mean that the asterisk node cannot have phones behind it while it hosting asterisk?

The asterisk node can have a phone behind it. Since we already opened up the ports on that node, it opened it up for all connected phones on that node.

If plugging into the Asterisk node, I will have to use the local LAN IP of the node for the SIP Server and Proxy in my phone.

On my end, I have put the WiFi address of the asterisk node in the SIP Server and Proxy field of my phone and it worked just fine. This allows you to unplug the phone and plug it into another node without having to change settings.

Lastly, I would leave all the NAT fields blank. I have checked my phone, and they do not have anything written in them. However, it would be intersting to know what happens when you change the parameters.

IP Logged
 Subject :Re:Asterisk Running Natively on HSMM-MESH Node.. 2012-12-29- 19:25:30 
K5KTF
Admin
Joined: 2010-01-18- 23:04:04
Posts: 266
Location: 5' from this webserver
  

Im playing with installing this right now.I already have a 3CX server running on a Windoze PC behind a node, but would like to get it directly on a node for events/deployment.

I am installing it on a G v2, but with the USB mod and a 40GB harddrive attached (see my posts under Developer Documentation on doing the USB mod and moving the OS/boot to the HDD).

For those that do this, there is a package called ZILE that if you install it and create a symbolic link in the path (/usr/bin will do) to the ZILE executable and name it EMACS, well... you will have EMACS instead of that dreaded VI :-) But you should be running on a harddrive (partition the HDD with a gig of swap for fun) to run this, as I doubt it would work on even a GS with the extra flash :-)

http://tunnel.hsmm-mesh.org to see what it looks like live. You will only be able to do stuff ON -USB, but links out to other nodes its meshed to wont work due to DNS/routing not propagating from the internet (on purpose). Make sure to note the STORAGE and MEMORY sizes of the customized main Status page ;-) ;-)

A couple notes, after reading your * install guide....

To keep the firewall from losing the settings on reboots, add the firewall additions to both the /etc/config/firewall as per your instructions, but ALSO to /etc/config.mesh/firewall. That second one is the file that creates the 'current' /etc/config files at boot time.

root@K5KTF-USB:~# emacs /etc/config/firewall
root@K5KTF-USB:~# emacs /etc/config.mesh/firewall

One more thing that may help this survive reboots is, once you have made the changes in the files, go to the web UI into Setup, change the channel to 2, save, then change back to 1 and save again BEFORE rebooting with it at 2. This will write the configs to the "special place" that makes the changes permanent. (You have to change SOMETHING for it to actually save, so I do the channel to 2 then back to 1, then reboot)

Also, I had a problem with it bitching about MD5 when I tried installing the packages I grabbed from the forum here.

Package XXXXX md5sum mismatch. Either the ipkg or the package index are corrupt. Try 'ipkg update'.

If you have internet accessibility at the node, you can go into the main web UI, Setup (with login),  Administration, then under Package Management click the REFRESH button next to the DOWNLOAD PACKAGE section, wait for it to grab all the possible packages, then you can install them from there individually.

One last item...
If you do this on a USB-harddrive node, after you get this all setup and working, you may need power off the node, unplug the drive, boot it up, edit the /etc/init.d/boot file on the internal flash, then power off, reattach the drive, and boot it normally. I have found that this needs to be done for it to actually start extra things at boot time.

Now to figure out how to install a voicemail system on here (3CX has it built in) :-)

73!
K5KTF

IP Logged
B-) Jim K5KTF EM10bm Cedar Park, TX :star:
 Subject :Re:Asterisk Running Natively on HSMM-MESH Node.. 2013-01-02- 21:05:11 
KF7LJH
Member
Joined: 2012-01-26- 14:21:48
Posts: 6
Location: Portland, OR

I just wanted to say thanks for the awesome writeup! You made the setup simple, took me about 15 min. 

While I don't have any other mesh-nodes connected, I figured I'd try to establish a connection with a ham friend who has a hardware voip phone, but we'd do it over the internet. With some natting on our home firewalls it worked - I called his ext from a sip client on my smartphone and we had great voice quality. All from the mesh router. Very cool.

I was going to put Asterisk on my HSMM-MESH RaspberryPi file/web/aprs server, but why bother, this works great. 


Thanks for taking the time to do the write up and provide the packages.


73 KF7LJH

IP Logged
«StartPrev12NextEnd»
Page # 


Powered by ccBoard


SPONSORED AD: