A little update on my PI adventures…
Since I’ve decided to use my router running Tomato firmware as a DLNA/Samba Server (extending the memory as a swap file partition to make it not hang), my PI has been unused for quite a while.
Since I have some use of IP communications (related to business calls), as well as calls from my family abroad (dad and some relatives who calls me on the phone as well) I decided to make this as an experiment of sorts.
I practically made my Raspberry PI into a small asterisk server.
As you can see (forgive the dust, I placed this in a place where it is not usually seen by guests and dust settles there quite often), the setup is made up of two 3G USB dongles, with sim lock disabled myself (the sim card on one of the modems when I bought it expired quite a while ago; i didn’t realize it until i opened the box and took the sim card out).
For the distribution I used Raspbx, which made things a whole lot easier. For the dongles, I ran the script:
and it set up the first dongle well(E173 Huawei Modem). As for the second dongle (which was a Huawei E303 4G modem), I had to find the ttyusb ports assigned to it by typing:
ls -l /dev/ttyUSB*
crw-rw-rwT 1 root dialout 188, 0 Jan 1 1970 /dev/ttyUSB0
crw-rw-rwT 1 root dialout 188, 1 Jun 9 17:49 /dev/ttyUSB1
crw-rw-rwT 1 root dialout 188, 2 Jun 9 21:29 /dev/ttyUSB2
crw-rw-rwT 1 root dialout 188, 3 Jun 9 16:48 /dev/ttyUSB3
crw-rw-rwT 1 root dialout 188, 4 Jun 9 16:48 /dev/ttyUSB4
crw-rw-rwT 1 root dialout 188, 5 Jun 9 21:29 /dev/ttyUSB5
Usually with Huawei modems, the second and third ports are the ones used for data and audio respectively. So I set up those here in /etc/asterisk/dongle.conf:
With this, I run the commands:
and I run the following command:
dongle show devices
And dongle0 and dongle1 shows itself as E173 and E303 respectively.
As a SIP phone I used my old nokia E51 phone which I haven’t used for a number of years. As for the setup, I made it in such a way that if I don’t answer on the SIP phone, the call is forwarded to my cellphone (this is the purpose of the 2 usb modems).
One of the modems is used as a landline, the other one is used to call me if I’m not around or using the SIP phone. I have also set up a DID number abroad for my relatives to call me as well (if I’m not around, the call is forwarded on my cellphone too).
Here’s a camera shot of the Nokia E51 receiving a call from skype calling the DID number abroad below:
And here’s a video shot of the call:
I’ve also set up dial plans to forward SMS received on one mobile number to my cellphone. I’m planning to set up an SMS answering system running php or bash code.
All in all, this comes in handy especially when traveling. Running processes when idle are only at 2% and rise up to no more than 4%. The PI is more than capable for my personal use.