root@ayaka:~# adb devices List of devices attached (no serial number) device
root@ayaka:~# aplay -L ...... hw:CARD=Android,DEV=0 Android, USB Audio Direct hardware device without any conversions plughw:CARD=Android,DEV=0 Android, USB Audio Hardware device with all software conversions default:CARD=Android Android, USB Audio Default Audio Device sysdefault:CARD=Android Android, USB Audio Default Audio Device front:CARD=Android,DEV=0 Android, USB Audio Front output / input surround21:CARD=Android,DEV=0 Android, USB Audio 2.1 Surround output to Front and Subwoofer speakers surround40:CARD=Android,DEV=0 Android, USB Audio 4.0 Surround output to Front and Rear speakers surround41:CARD=Android,DEV=0 Android, USB Audio 4.1 Surround output to Front, Rear and Subwoofer speakers surround50:CARD=Android,DEV=0 Android, USB Audio 5.0 Surround output to Front, Center and Rear speakers surround51:CARD=Android,DEV=0 Android, USB Audio 5.1 Surround output to Front, Center, Rear and Subwoofer speakers surround71:CARD=Android,DEV=0 Android, USB Audio 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers iec958:CARD=Android,DEV=0 Android, USB Audio IEC958 (S/PDIF) Digital Audio Output dmix:CARD=Android,DEV=0 Android, USB Audio Direct sample mixing device usbstream:CARD=Android Android USB Stream Output
git clone https://github.com/IchthysMaranatha/asterisk-chan-quectel cd asterisk-chan-quectel
./bootstrap ./configure --with-astversion=16 make make install
cp uac/quectel.conf /etc/asterisk
编辑 /etc/asterisk/quectel.conf,将最后四行的注释去掉:
1 2 3 4 5
[quectel0] audio=/dev/ttyUSB1 ; tty port for Audio, set as ttyUSB4 for Simcom if no other dev present data=/dev/ttyUSB2 ; tty port for AT commands;no default value quec_uac=1 ; Uncomment line if using UAC mode alsadev=hw:CARD=Android,DEV=0 ; Uncomment if using UAC, set device name or index as reqd
Trunk Name 随便填,Custom Dial String 填 Quectel/quectel0/$OUTNUM$,直接 Submit。
记得删掉除了刚刚添加的 Trunk 外其它自动生成的 Trunk。
添加响铃组
如果有多台设备,在呼入时要求所有设备同时响铃,其中一台设备接听后其它设备自动停止响铃,需要将这些设备加入 Ring Group。
Applications-Ring Groups 添加响铃组,Ring-Group Number 要独立于其它已添加的分机号,Group Description 随便填,Extension List 用换行符分隔,可以用 Extension Quick Pick 直接选择, Destination if no answer 可以选 Terminate Call 即挂断。
添加入站路由
Connectivity-Inbound Routes 添加入站路由。
Description 随便填,Set Destination 选择 Extension 或者 Ring Group,然后在下方的出口里选择刚添加的。
添加出站路由
Connectivity-Outbound Routes 添加出站路由。
Route Name 随便填,Trunk Sequence for Matched Routes 选刚刚添加的 Trunk,设置一个 X. 作为 Pattern 以匹配所有号码。