遇到难题(如何用MODEM接收电话发出的按键值)(50分)

  • 主题发起人 主题发起人 hp_wang
  • 开始时间 开始时间
H

hp_wang

Unregistered / Unconfirmed
GUEST, unregistred user!
1。首先我用电话拨MODEM,结果MODEM响应了。
2。我想给MODEM发一个按键,然后MODEM接收的数据反映出该键的数值。
3。你说怎么办?
 
查找"按键"
 
Unimodem has called VCOMM to open the correct serial port for this modem, and set its default COM port settings.

11-08-1995 14:49:29.52 - Initializing modem.
11-08-1995 14:49:29.52 - Send: AT
11-08-1995 14:49:29.52 - Recv: AT
11-08-1995 14:49:29.67 - Recv: OK
11-08-1995 14:49:29.67 - Interpreted response: Ok
11-08-1995 14:49:29.67 - Send: AT &F E0 V1 &D2 &C1 W2 S95=47
11-08-1995 14:49:29.68 - Recv: AT &F E0 V1 &D2 &C1 W2 S95=47
11-08-1995 14:49:29.82 - Recv: OK
11-08-1995 14:49:29.82 - Interpreted response: Ok
11-08-1995 14:49:29.82 - Send: ATS7=60S30=0L1M1/N3%C3&K3B0 N1X4
11-08-1995 14:49:29.98 - Recv: OK
11-08-1995 14:49:29.98 - Interpreted response: Ok
11-08-1995 14:49:29.98 - Waiting for a call.

Normal data init process.

11-08-1995 14:49:29.98 - Send: at#cid=1
11-08-1995 14:49:30.14 - Recv: OK
11-08-1995 14:49:30.14 - Interpreted response: Ok

EnableCallerID commands sent to modem.

11-08-1995 14:49:30.14 - Send: at-sdr=7
11-08-1995 14:49:30.27 - Recv: OK
11-08-1995 14:49:30.27 - Interpreted response: Ok

EnableDistinctiveRing commands sent to modem.

11-08-1995 14:49:30.27 - Send: ATS0=0
11-08-1995 14:49:30.41 - Recv: OK
11-08-1995 14:49:30.41 - Interpreted response: Ok

Monitoring command sent to modem.

11-08-1995 14:49:44.25 - Recv: RING1
11-08-1995 14:49:44.25 - Interpreted response: Distinctive Ring A

Incoming ring. Since distinctive ringing is enabled, distinctive ring is reported.

11-08-1995 14:49:46.90 - Answering the voice call.
11-08-1995 14:49:46.90 - Send: at#cls=8
11-08-1995 14:49:47.16 - Recv: OK
11-08-1995 14:49:47.16 - Interpreted response: Ok
11-08-1995 14:49:47.16 - Send: at#vls=0
11-08-1995 14:49:47.31 - Recv: OK
11-08-1995 14:49:47.31 - Interpreted response: Ok
11-08-1995 14:49:47.31 - Send: at#vbt=1
11-08-1995 14:49:47.45 - Recv: OK
11-08-1995 14:49:47.45 - Interpreted response: Ok
11-08-1995 14:49:47.45 - Send: at#vsr=7200
11-08-1995 14:49:47.59 - Recv: OK
11-08-1995 14:49:47.59 - Interpreted response: Ok
11-08-1995 14:49:47.59 - Send: at#vbs=4
11-08-1995 14:49:47.73 - Recv: OK
11-08-1995 14:49:47.74 - Interpreted response: Ok
11-08-1995 14:49:47.74 - Send: ats30=60
11-08-1995 14:49:47.88 - Recv: OK
11-08-1995 14:49:47.88 - Interpreted response: Ok
11-08-1995 14:49:47.88 - Send: ata

VoiceAnswer commands sent to modem. This happens in response to the TAPI function lineAnswer.

11-08-1995 14:49:48.11 - Recv: VCON
11-08-1995 14:49:48.11 - Interpreted response: Ok

Voice connect response. The voice connect response is normally mapped to an OK response.

11-08-1995 14:49:48.11 - Issuing Speakerphone command.
11-08-1995 14:49:48.11 - Send: at#vls=6
11-08-1995 14:49:48.26 - Recv: OK
11-08-1995 14:49:48.26 - Interpreted response: Ok

SpeakerphoneEnable commands sent to modem.

11-08-1995 14:49:48.26 - Send: at#vls=6
11-08-1995 14:49:48.41 - Recv: OK
11-08-1995 14:49:48.41 - Interpreted response: Ok
11-08-1995 14:49:48.41 - Send: at#spk=0,,,
11-08-1995 14:49:48.55 - Recv: OK
11-08-1995 14:49:48.55 - Interpreted response: Ok

SpeakerphoneMute commands sent to modem.

11-08-1995 14:49:48.55 - Send: at#vls=6
11-08-1995 14:49:48.69 - Recv: OK
11-08-1995 14:49:48.69 - Interpreted response: Ok
11-08-1995 14:49:48.69 - Send: at#spk=,0,3
11-08-1995 14:49:48.84 - Recv: OK
11-08-1995 14:49:48.84 - Interpreted response: Ok

SpeakerphoneSetVolumeGain commands sent to modem

The preceding commands (SpeakerphoneEnable, SpeakerphoneMute, and SpeakerphoneSetVolumeGain) are sent in response to the TAPI call phoneSetHookSwitch(hPhone, PHONESHOOKSWITCHDEV_SPEAKER, PHONEHOOKSWITCHMODE_SPEAKER), which takes the speakerphone off hook, and mutes it.

11-08-1995 14:49:48.84 - Voice Modem Wave Open.

waveOutOpen/waveInOpen called

11-08-1995 14:49:48.85 - Setting wave format.
11-08-1995 14:49:48.85 - Send: at#vls=0
11-08-1995 14:49:48.99 - Recv: OK
11-08-1995 14:49:48.99 - Interpreted response: Ok

LineSetPlayFormat commands sent to modem.

11-08-1995 14:49:48.99 - Starting wave play/record.
11-08-1995 14:49:48.99 - Send: at#vtx
11-08-1995 14:49:49.17 - Recv: CONNECT
11-08-1995 14:49:49.17 - Interpreted response: Connect

StartPlay commands sent to modem.

11-08-1995 14:49:49.40 - Received DLE Raw=117, Translated=255.

DLE received from modem. The Raw value is the actual value received, and the Translated value is the value Unimodem has mapped it to. See the DLE translation table in Interpreting Modem Event Logs. In this example, the DLE is translated to 255, which means that Unimodem/V ignores this DLE.

11-08-1995 14:49:54.78 - Ending wave play/record.
11-08-1995 14:49:54.78 - Voice Modem Wave Close.

waveInClose/waveOutClose has been called.

.
.
.
11-08-1995 14:50:41.48 - Received DLE Raw=49, Translated=1.

DLE received from modem. This is translated to the DTMF digit 1.

11-08-1995 14:50:41.51 - Ending wave play/record.
11-08-1995 14:50:41.51 - Voice Modem Wave Close.

waveInClose/waveOutClose has been called.

11-08-1995 14:50:41.94 - Received DLE Raw=35, Translated=15.

DLE received from modem. This is translated to the DTMF digit #.
Interpreting Modem Event Logs
Two sample modem event logs produced by LOGWIN.EXE are shown in the following, one for a data modem session and the other for a voice modem session. In order to interpret the event logs, you need to understand the following about how LOGWIN.EXE and Unimodem/V work together to produce the logs.

When Unimodem/V receives a DLE from the modem, the DLE is translated to a standard event. Following is the table that maps the translated value to the event. The modem log displays the actual DLE received and it's translated value.

Translated DLE value Description
0 DTMF 0
1 DTMF 1
2 DTMF 2
3 DTMF 3
4 DTMF 4
5 DTMF 5
6 DTMF 6
7 DTMF 7
8 DTMF 8
9 DTMF 9
10 DTMF A
11 DTMF B
12 DTMF C
13 DTMF D
14 DTMF *
15 DTMF #
16 DTMF Start
17 DTMF End
32 End of Transmit
33 Handset off hook
34 Handset onhook
35 Ring
36 Ringback
37 Answer tone (CCITT - V.25/T.30 2100 Hz)
38 Busy
39 Fax CNG Tone
40 Dialtone
41 Silence
42 Quiet
43 Data calling tone (V.25 1300 Hz tone)
44 Bell answer tone (2225 Hz tone)
255 Don't care - Unimodem ignores DLE



 
设置Modem的应答方式为语音应答就行乐
然后直接从串口收取信息
 
多人接受答案了。
 
后退
顶部