USB 3g modem dongle static port mapping How-to

Guys, I have FreePBX Stable-6.12.65, Release Date-2014, FreePBX 12, Centos 6.5 and
Asterisk 11.I Also have 4 identical USB 3G modems connected to an USB switch. I use them as 4 different trunks with chan_dongle.

Everything goes ok exept the part that every time my server reboots the order of the USB dongles changes on Centos for example:

Before reboot:

Dongle 1: ttyUSB0 / ttyUSB1
Dongle 2: ttyUSB2 / ttyUSB3
Dongle 3: ttyUSB4 / ttyUSB5
Dongle 4: ttyUSB6 / ttyUSB7

After reboot:
Dongle 1: ttyUSB6 / ttyUSB7
Dongle 2: ttyUSB4 / ttyUSB5
Dongle 3: ttyUSB2 / ttyUSB3
Dongle 4: ttyUSB0 / ttyUSB1

How can I keep the mapping fixed even after a reboot? The problem is that each USB modem connects to a different carrier for low cost routes and if they change I won´t be able to choose the correct trunk for dial out …

any ideas, please?

kind regards

I was told to find an unique value on each USB dongle such as vendor id or product id but since the devices are all the same this doesn´t help in my case.

I was also told to find the serial number of each donge in a way to identify them on linux with the command: # udevadm info -a -n /dev/ttyUSB1 | grep ‘{serial}’ | head -n1 but it seams that there is no serial parameter on there since the answer to this command is always empty.

This is the How-to that didn´t work for me:

Any ideas?

kind regards

See my example using IMEI:

; dongle required settings
;audio=/dev/ttyUSB1 ; tty port for audio connection; no default value
;data=/dev/ttyUSB2 ; tty port for AT commands; no default value

;audio=/dev/ttyUSB4 ; tty port for audio connection; no default value
;data=/dev/ttyUSB5 ; tty port for AT commands; no default value

Hi Dear Jerson

is it possible you give me a guide on how to install E160 USB Dongle on FreePBX Distro as an Step by Step as there is a lots of guide around but none of them worked.

Here is the scenario I have Installed FreePBX Distro successfully.

CentOS is fully updated.

I want to USE USB Dongle E160 as Trunk to Call in & Out as backup line.

Your help will be highly appreciated.

I used the following how to: Chan_dongle

1 Like

When I try to use the mapping via IMEI instead of audio/data pointers my dongles do not get online. Is there any additional config I should do besides setting the IMEI ?!

kind regards

any ideas on how to address that please?!