Chan_dongle

Guys, I have FreePBX 14, SangomaOS 7.3 and Asterisk 14.6.2. Is Chan_dongle installed by default or should I install it to be able to connect some GSM USB dongles? If there is the need to instalation is there any step by step procedure available?

It’s a purely Asterisk thing, so you’re going to be on your own.

Tell me where can I find the installation for this version

Try here:

I tried, but not found on my version of asterisk

[root@freepbx asterisk-chan-dongle-asterisk13]# make
gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DASTERISK_VERSION_NUM=140602 -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT app.o -MF .app.o.d -MP -o app.o -c app.c
In file included from app.c:18:0:
/usr/include/asterisk.h:301:2: error: #error “Externally compiled modules must declare AST_MODULE_SELF_SYM.”
#error “Externally compiled modules must declare AST_MODULE_SELF_SYM.”
^
app.c: In function ‘app_gsm_status_exec’:
app.c:112:6: warning: unused variable ‘stat’ [-Wunused-variable]
int stat;
^
make: *** [app.o] Error 1
[root@freepbx asterisk-chan-dongle-asterisk13]#

what das it meen?

Let´s Go:

First:
yum -y install tcl asterisk13-devel make automake binutils

cd /usr/src
git clone https://github.com/wdoekes/asterisk-chan-dongle.git
aclocal && autoconf && automake -a
./configure --with-astversion=13.X.X
make
make install
cp chan_dongle.so /usr/lib64/asterisk/modules/
cp etc/dongle.conf /etc/asterisk

vim /etc/udev/rules.d/92-dongle.rules and insert this => KERNEL==“ttyUSB*”, MODE=“0666”, OWNER=“asterisk”, GROUP=“uucp”

vim /etc/asterisk/asterisk.conf and insert this: rungroup = dialout

asterisk -vvvvvvvvr

git clone https://github.com/wdoekes/asterisk-chan-dongle.git
-bash: git: command not found

astversion=14.6.2

yum -y install tcl asterisk14-devel make automake binutils git

make install
strip chan_dongle.so
/usr/bin/install -c -m 755 chan_dongle.so
/usr/bin/install: missing destination file operand after ‘chan_dongle.so’
Try ‘/usr/bin/install --help’ for more information.
make: *** [install] Error 1
[root@freepbx asterisk-chan-dongle-master]#

1 Like

cp chan_dongle.so /usr/lib64/asterisk/modules/

freepbx*CLI> module load chan_dongle.so
Loaded chan_dongle.so
== Parsing ‘/etc/asterisk/dongle.conf’: Found
[2017-10-28 14:40:17] WARNING[6933]: config.c:2018 process_text_line: No ‘=’ (equal sign) in line 46 of /etc/asterisk/dongle.conf
[2017-10-28 14:40:17] WARNING[6933]: config.c:2018 process_text_line: No ‘=’ (equal sign) in line 50 of /etc/asterisk/dongle.conf
[2017-10-28 14:40:17] NOTICE[6933]: chan_dongle.c:1588 reload_config: [dongle0] Loaded device
== Registered channel type ‘Dongle’ (Huawei 3G Dongle Channel Driver)
– [dongle0] Trying to connect on /dev/ttyUSB2…

[2017-10-28 14:40:17] ERROR[7059]: chan_dongle.c:137 lock_create: open(’/var/lock/LCK…ttyUSB2’) failed: Permission denied

[2017-10-28 14:40:17] ERROR[7059]: chan_dongle.c:137 lock_create: open(’/var/lock/LCK…ttyUSB1’) failed: Permission denied

== Registered application ‘DongleStatus’
== Registered application ‘DongleSendSMS’
== Registered application ‘DongleSendUSSD’
== Manager registered action DongleShowDevices
== Manager registered action DongleSendUSSD
== Manager registered action DongleSendSMS
== Manager registered action DongleSendPDU
== Manager registered action DongleSetCCWA
== Manager registered action DongleReset
== Manager registered action DongleRestart
== Manager registered action DongleStop
== Manager registered action DongleStart
== Manager registered action DongleRemove
== Manager registered action DongleReload
Loaded chan_dongle.so => (Huawei 3G Dongle Channel Driver)
– [dongle0] Dongle has connected, initializing…
– [dongle0] Dongle initialized and ready
[2017-10-28 14:40:22] NOTICE[7060]: at_response.c:1079 at_response_ccwa: Call waiting is disabled on device dongle0
freepbx*CLI>

Thank you very much for the help for me, all works!!! Thank you great guru!!!

chmod 777 /dev/ttyUSB*

vim /etc/udev/rules.d/92-dongle.rules and insert this => KERNEL==“ttyUSB*”, MODE=“0666”, OWNER=“asterisk”, GROUP=“uucp”

vim /etc/asterisk/asterisk.conf and insert this: rungroup = dialout

module load chan_dongle.so
Unable to load module chan_dongle.so
Command ‘module load chan_dongle.so’ failed.
[2017-12-02 16:28:30] WARNING[5898]: loader.c:964 inspect_module: Module ‘chan_dongle.so’ was not compiled with the same compile-time options as this version of Asterisk.
[2017-12-02 16:28:30] WARNING[5898]: loader.c:965 inspect_module: Module ‘chan_dongle.so’ will not be initialized as it may cause instability.
[2017-12-02 16:28:30] WARNING[5898]: loader.c:1055 load_resource: Module ‘chan_dongle.so’ could not be loaded.

what does it mean

Problems of time machine, verify date of your machine!

Thank alot the step by step worked like a charm!I run 64 bit i just had to add this line when configure the module
DESTDIR="/usr/lib64/asterisk/modules.

how do you set inbound route?? i put my mobile number and still not working