Dongle0.
*CLI> -- [dongle0] Trying to connect on /dev/ttyUSB2...
插拔dongle
[Jan 13 23:42:20] WARNING[3443]: chan_dongle.c:215 opentty: unable to open /dev/ttyUSB2: No such file or directory
-- [dongle0] Trying to connect on /dev/ttyUSB2...
[Jan 13 23:42:35] WARNING[3443]: chan_dongle.c:215 opentty: unable to open /dev/ttyUSB2: No such file or directory
dongle show devices
ID Group State RSSI Mode Submode Provider Name Model Firmware IMEI IMSI Number
dongle0 0 Not connec 0 0 0 NONE Unknown
*CLI> -- [dongle0] Trying to connect on /dev/ttyUSB2...
[Jan 13 23:42:50] WARNING[3443]: chan_dongle.c:215 opentty: unable to open /dev/ttyUSB2: No such file or directory
-- [dongle0] Trying to connect on /dev/ttyUSB2...
-- [dongle0] Dongle has connected, initializing...
[Jan 13 23:43:06] WARNING[3591]: at_response.c:384 at_response_error: [dongle0] Error checking subscriber phone number
-- [dongle0] Dongle needs to be reinitialized. The SIM card is not ready yet
-- [dongle0] Error initializing Dongle
-- [dongle0] Dongle has disconnected
-- [dongle0] Trying to connect on /dev/ttyUSB2...
-- [dongle0] Dongle has connected, initializing...
-- [dongle0] Dongle initialized and ready
dongle show devices
*CLI> dongle show devices
ID Group State RSSI Mode Submode Provider Name Model Firmware IMEI IMSI Number
dongle0 0 Free 31 3 2 SmarToneVodafo E1750 11.126.13.00.157 354818044123401 460020108953736 Unknown
*CLI> dongle sms dongle0 《电话号码》 test
[dongle0] SMS queued for send with id 0x2881970
*CLI> -- [dongle0] Successfully sent SMS message 0x2881970
[Jan 13 23:48:36] NOTICE[3602]: at_response.c:257 at_response_ok: [dongle0] Successfully sent SMS message 0x2881970
dongle show device settings dongle0
------------- Settings ------------
Device : dongle0
Audio : /dev/ttyUSB1
Data : /dev/ttyUSB2
IMEI : 123456789012345
IMSI : 123456789012345
Channel Language : en
Context : default
Exten : +1234567890
Group : 0
RX gain : 0
TX gain : 0
U2Diag : -1
Use CallingPres : Yes
Default CallingPres : Presentation Allowed, Passed Screen
Auto delete SMS : Yes
Disable SMS : No
Reset Dongle : Yes
SMS PDU : Yes
Call Waiting : auto
DTMF : relax
Minimal DTMF Gap : 45
Minimal DTMF Duration : 80
Minimal DTMF Interval : 200
Initial device state : start
自动接听电话
*CLI> == Starting Dongle/dongle0-0100000000 at default,+1234567890,1 failed so falling back to exten 's'
-- Executing [s@default:1] Wait("Dongle/dongle0-0100000000", "1") in new stack
-- Executing [s@default:2] Answer("Dongle/dongle0-0100000000", "") in new stack
-- Executing [s@default:3] Set("Dongle/dongle0-0100000000", "TIMEOUT(digit)=5") in new stack
-- Digit timeout set to 5.000
-- Executing [s@default:4] Set("Dongle/dongle0-0100000000", "TIMEOUT(response)=10") in new stack
-- Response timeout set to 10.000
-- Executing [s@default:5] BackGround("Dongle/dongle0-0100000000", "demo-congrats") in new stack
-- <Dongle/dongle0-0100000000> Playing 'demo-congrats.gsm' (language 'en')
== Spawn extension (default, s, 5) exited non-zero on 'Dongle/dongle0-0100000000'
dongle show device state dongle0
-------------- Status -------------
Device : dongle0
State : Free
Audio : /dev/ttyUSB1
Data : /dev/ttyUSB2
Voice : Yes
SMS : Yes
Manufacturer : huawei
Model : E1750
Firmware : 11.126.13.00.157
IMEI : 354818044123401
IMSI : 460020108953736
GSM Registration Status : Registered, roaming
RSSI : 14, -85 dBm
Mode : WCDMA
Submode : WCDMA
Provider Name : SmarToneVodafone
Location area code : 1F4A
Cell ID : 657CCC
Subscriber Number : Unknown
SMS Service Center : +8613800755500
Use UCS-2 encoding : Yes
USSD use 7 bit encoding : Yes
USSD use UCS-2 decoding : No
Tasks in queue : 0
Commands in queue : 0
Call Waiting : Disabled
Current device state : start
Desired device state : start
When change state : now
Calls/Channels : 0
Active : 0
Held : 0
Dialing : 0
Alerting : 0
Incoming : 0
Waiting : 0
Releasing : 0
Initializing : 0
*CLI> dongle cmd dongle0 AT
[dongle0] 'AT' Command queued for execute
*CLI> [dongle0] Got Response for user's command:'OK'
[Jan 13 23:56:02] NOTICE[3602]: at_response.c:1716 at_response: [dongle0] Got Response for user's command:'OK'
接受短信测试
*CLI> [dongle0] Got SMS from xxxx: 'hello'
== Starting Local/sms@default-5cb3;1 at default,sms,1 failed so falling back to exten 's'
-- Executing [s@default:1] Wait("Local/sms@default-5cb3;1", "1") in new stack
-- Executing [s@default:2] Answer("Local/sms@default-5cb3;1", "") in new stack
-- Executing [s@default:3] Set("Local/sms@default-5cb3;1", "TIMEOUT(digit)=5") in new stack
-- Digit timeout set to 5.000
-- Executing [s@default:4] Set("Local/sms@default-5cb3;1", "TIMEOUT(response)=10") in new stack
-- Response timeout set to 10.000
-- Executing [s@default:5] BackGround("Local/sms@default-5cb3;1", "demo-congrats") in new stack
[Jan 13 23:57:08] WARNING[3639]: channel.c:3895 set_format: Unable to find a codec translation path from 0x1 (g723) to 0x2 (gsm)
[Jan 13 23:57:08] WARNING[3639]: file.c:953 ast_streamfile: Unable to open demo-congrats (format 0x1 (g723)): No such file or directory
[Jan 13 23:57:08] WARNING[3639]: pbx.c:8866 pbx_builtin_background: ast_streamfile failed on Local/sms@default-5cb3;1 for demo-congrats
-- Executing [s@default:6] BackGround("Local/sms@default-5cb3;1", "demo-instruct") in new stack
[Jan 13 23:57:08] WARNING[3639]: channel.c:3895 set_format: Unable to find a codec translation path from 0x1 (g723) to 0x2 (gsm)
[Jan 13 23:57:08] WARNING[3639]: file.c:953 ast_streamfile: Unable to open demo-instruct (format 0x1 (g723)): No such file or directory
[Jan 13 23:57:08] WARNING[3639]: pbx.c:8866 pbx_builtin_background: ast_streamfile failed on Local/sms@default-5cb3;1 for demo-instruct
-- Executing [s@default:7] WaitExten("Local/sms@default-5cb3;1", "") in new stack
-- Timeout on Local/sms@default-5cb3;1, going to 't'
-- Executing [t@default:1] Goto("Local/sms@default-5cb3;1", "#,1") in new stack
-- Goto (default,#,1)
-- Executing [#@default:1] Playback("Local/sms@default-5cb3;1", "demo-thanks") in new stack
[Jan 13 23:57:18] WARNING[3639]: channel.c:3895 set_format: Unable to find a codec translation path from 0x1 (g723) to 0x2 (gsm)
[Jan 13 23:57:18] WARNING[3639]: file.c:953 ast_streamfile: Unable to open demo-thanks (format 0x1 (g723)): No such file or directory
[Jan 13 23:57:18] WARNING[3639]: app_playback.c:471 playback_exec: ast_streamfile failed on Local/sms@default-5cb3;1 for demo-thanks
-- Executing [#@default:2] Hangup("Local/sms@default-5cb3;1", "") in new stack
== Spawn extension (default, #, 2) exited non-zero on 'Local/sms@default-5cb3;1'
*CLI>
http show status
HTTP Server Status:
Prefix: /asterisk
Server Enabled and Bound to 127.0.0.1:8088
Enabled URI's:
/asterisk/httpstatus => Asterisk HTTP General Status
/asterisk/phoneprov/... => Asterisk HTTP Phone Provisioning Tool
/asterisk/manager => HTML Manager Event Interface
/asterisk/rawman => Raw HTTP Manager Event Interface
/asterisk/static/... => Asterisk HTTP Static Delivery
/asterisk/mxml => XML Manager Event Interface
http://127.0.0.1:8088/asterisk/manager?action=listcommands&action=&command=&username=admin&secret=hjs
Manager Tester
Action: or
CLI Command
user pass
Response Success
WaitEvent Wait for an event to occur (Priv: <none>)
DongleReload Reload a module configuration. (Priv: system,config,all)
DongleRemove Remove a dongle. (Priv: system,config,all)
DongleStart Start a dongle. (Priv: system,config,all)
DongleStop Stop a dongle. (Priv: system,config,all)
DongleRestart Restart a dongle. (Priv: system,config,all)
DongleReset Reset a dongle. (Priv: system,config,all)
DongleSetCCWA Enable/Disabled Call-Waiting on a dongle. (Priv: config,all)
DongleSendPDU Send a PDU of message. (Priv: call,all)
DongleSendSMS Send a SMS message. (Priv: call,all)
DongleSendUSSD Send a ussd command to the dongle. (Priv: call,all)
DongleShowDevices List Dongle devices (Priv: system,reporting,all)
PlayDTMF Play DTMF signal on a specific channel. (Priv: call,all)
SIPnotify Send a SIP notify (Priv: system,all)
SIPshowregistry Show SIP registrations (text format) (Priv: system,reporting,all)
SIPqualifypeer Show SIP peer (text format) (Priv: system,reporting,all)
SIPshowpeer Show SIP peer (text format) (Priv: system,reporting,all)
SIPpeers List SIP peers (text format) (Priv: system,reporting,all)
QueueReset Reset queue statistics (Priv: <none>)
QueueReload Reload a queue, queues, or any sub-section of a queue or queues (Priv: <none>)
QueueRule Queue Rules (Priv: <none>)
QueuePenalty Set the penalty for a queue member (Priv: agent,all)
QueueLog Adds custom entry in queue_log (Priv: agent,all)
QueuePause Makes a queue member temporarily unavailable (Priv: agent,all)
QueueRemove Remove interface from queue. (Priv: agent,all)
QueueAdd Add interface to queue. (Priv: agent,all)
QueueSummary Queue Summary (Priv: <none>)
QueueStatus Queue Status (Priv: <none>)
Queues Queues (Priv: <none>)
IAXregistry Show IAX registrations (Priv: system,reporting,all)
IAXnetstats Show IAX Netstats (Priv: system,reporting,all)
IAXpeerlist List IAX Peers (Priv: system,reporting,all)
IAXpeers List IAX Peers (Priv: system,reporting,all)
SKINNYshowline Show SKINNY line (text format) (Priv: system,reporting,all)
SKINNYlines List SKINNY lines (text format) (Priv: system,reporting,all)
SKINNYshowdevice Show SKINNY device (text format) (Priv: system,reporting,all)
SKINNYdevices List SKINNY devices (text format) (Priv: system,reporting,all)
AgentLogoff Sets an agent as no longer logged in (Priv: agent,all)
Agents Lists agents and their status (Priv: agent,all)
VoicemailUsersList List All Voicemail User Information (Priv: call,reporting,all)
UnpauseMonitor Unpause monitoring of a channel (Priv: call,all)
PauseMonitor Pause monitoring of a channel (Priv: call,all)
ChangeMonitor Change monitoring filename of a channel (Priv: call,all)
StopMonitor Stop monitoring a channel (Priv: call,all)
Monitor Monitor a channel (Priv: call,all)
DBDelTree Delete DB Tree (Priv: system,all)
DBDel Delete DB Entry (Priv: system,all)
DBPut Put DB Entry (Priv: system,all)
DBGet Get DB Entry (Priv: system,reporting,all)
Bridge Bridge two channels already in the PBX (Priv: call,all)
Park Park a channel (Priv: call,all)
ParkedCalls List parked calls (Priv: <none>)
ShowDialPlan List dialplan (Priv: config,reporting,all)
ModuleCheck Check if module is loaded (Priv: system,all)
ModuleLoad Module management (Priv: system,all)
CoreShowChannels List currently active channels (Priv: system,reporting,all)
Reload Send a reload event (Priv: system,config,all)
CoreStatus Show PBX core status variables (Priv: system,reporting,all)
CoreSettings Show PBX core settings (version etc) (Priv: system,reporting,all)
UpdateConfig Update basic configuration (Priv: config,all)
SendText Send text message to channel (Priv: call,all)
ListCommands List available manager commands (Priv: <none>)
MailboxCount Check Mailbox Message Count (Priv: call,reporting,all)
MailboxStatus Check Mailbox (Priv: call,reporting,all)
AbsoluteTimeout Set Absolute Timeout (Priv: system,call,all)
ExtensionState Check Extension Status (Priv: call,reporting,all)
Command Execute Asterisk CLI Command (Priv: command,all)
Originate Originate Call (Priv: originate,all)
Atxfer Attended transfer (Priv: call,all)
Redirect Redirect (transfer) a call (Priv: call,all)
ListCategories List categories in configuration file (Priv: config,all)
CreateConfig Creates an empty file in the configuration directory (Priv: config,all)
Status Lists channel status (Priv: system,call,reporting,all)
GetConfigJSON Retrieve configuration (JSON format) (Priv: system,config,all)
GetConfig Retrieve configuration (Priv: system,config,all)
Getvar Gets a Channel Variable (Priv: call,reporting,all)
Setvar Set Channel Variable (Priv: call,all)
Ping Keepalive command (Priv: <none>)
Hangup Hangup Channel (Priv: system,call,all)
Challenge Generate Challenge for MD5 Auth (Priv: <none>)
Login Login Manager (Priv: <none>)
Logoff Logoff Manager (Priv: <none>)
Events Control Event Flow (Priv: <none>)