Simple test bed set-up #13
IchthysMaranatha
started this conversation in
Show and tell
Replies: 1 comment
-
When installing asterisk, if it takes too much time downloading stuff from the slow asterisk.org server in make install step, you can interrupt with ctrl-c and run |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Please do not create new post/discussion citing issues without first having run this test bed on vm with PC/laptop. Note for those using a Pi and having problems; it is almost certainly due to pi usb power issues.
This is a guide for a simple test bed set-up using an Ubuntu 18.04 vm on a PC/laptop with the modem connected to a USB 3 port. This uses insecure settings and must not be used as final production set up. I would greatly advocate using this if you face any issues in your own set-up of a different kind so that you do not waste time in isolating the cause of trouble. Adhere to test bed in every way and after a successful run, start deviating gradually towards your own desired set-up and settings (hardware, os, asterisk version, dialplan etc) so that you will know which deviation causes an issue and resolve it accordingly.
If using a pi after test run and especially a device older than Pi4, you will invariably have problems of various kinds if powering the modem using a Pi usb port due to the current limiting circuit (600ma - 1.2A). Even with a Pi 4, you will not be able to stably handle modem devices with a larger power draw (>2.1A) than that of the waveshare sim7600 dongle. You will need to provide independent power to the modem without using the Pi usb port which must only be used for data communication. If the modem device is a Pi HAT, you can provide power by stacking and using a beefy power supply. chan_quectel has been successfully tested on a Pi4 and sim7600 dongle with an Ubuntu server 18.04 image.
If you wish to use the serial audio port of a Quectel device, please ensure that gps messaging is disabled as mentioned here
One can use Oracle virtualbox for setting up the vm https://www.virtualbox.org/wiki/Downloads Please remember to download and install Extension Pack too for enabling USB 3 controller. Please use an Ubuntu 18.04 server image iso to setup the vm. In settings make sure network is set to bridged adapter and in USB settings make sure USB 3.0 controller is selected. This guide assumes set up has been done in a Windows host.
After vm is up and running, one can use putty and Winscp to pass commands and edit or copy files. The vm should have obtained its own ip from your home router, if you correctly set bridged adapter for networking.
Enable passwordless sudo for your user following this https://www.cyberciti.biz/faq/linux-unix-running-sudo-command-without-a-password/
Connect to vm using putty. Run foll commands
Disable ipv6 to keep things simple
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1
sudo apt update
sudo apt install unzip
sudo apt install gcc
sudo apt install alsa-base
Download and install stable asterisk 16
wget https://github.com/asterisk/asterisk/archive/refs/heads/16.23.zip
unzip 16.23.zip
cd asterisk-16.23
When running command below, it may prompt for country tel code, you can provide what you wish
sudo contrib/scripts/install_prereq install
sudo ./configure
sudo make
sudo make install
sudo make config
sudo cp configs/samples/*.* /etc/asterisk
cd /etc/asterisk
sudo find . -name "*.sample" -exec sh -c 'mv "$1" "${1%.sample}"' _ {} \;
Now set up chan_quectel
cd
wget https://github.com/IchthysMaranatha/asterisk-chan-quectel/archive/refs/heads/master.zip
unzip master.zip
cd asterisk-chan-quectel-master
./bootstrap
sudo ./configure --with-astversion=16.23
sudo make
sudo make install
Now use winscp to copy quectel.conf to /etc/asterisk (In advanced site settings for winscp use sudo -s for scp/shell, passwordless sudo must be enabled as mentioned earlier) Make sure audio port is correctly set for your device in quectel.conf
Download attached zip file with this post and extract sip.conf and extensions.conf
sipext.zip
In sip.conf, under section [70] change host ip address to the ip address of your PC/laptop on your home network. Then copy both files to /etc/asterisk
Now connect modem to a USB 3 port of PC/laptop and in the virtualbox terminal for the vm click on usb icon at the bottom and select the modem to connect it to vm
Then in putty run
sudo systemctl start asterisk
Connect to asterisk cli
sudo asterisk -rvvv
Check connected status
quectel show devices
Now on your PC download microsip (lite and portable will do) from here https://www.microsip.org/downloads
Grant permission to microsip for access through firewall and in microsip settings, just check Enable Local Account, put in 5060 as source port (you can specify another port but it should match the port under [70] in sip.conf) and in enabled codecs you could put alaw, ulaw and lpcm 16khz. There is no need to add any sip account or to edit local account settings.
Check if everything has been set up correctly by passing this command in asterisk cli
originate sip/70 extension 100
This should cause microsip to alert you with a ring.
Now you can test incoming and outgoing calls with a mobile phone. If you try incoming, microsip should start ringing and to place an outgoing call, if for eg ip address of vm is 192.168.2.106 and the no you wish to call is 9999999 then dial out
[email protected]:46000 on microsip
Beta Was this translation helpful? Give feedback.
All reactions