简体   繁体   中英

detect answer on call at command and voice modem

i write small app via C# that can call to number and play any voice i want without any problem.. my big issue is that i cant detect when other side answer my call... i can detect busy , no carrier and silence ... but how i detect when other side answer my call that after i play voice ... ... this is my at command i used for my operation ...

ate0 //for disable echo
at+fclass=8 //for switch to voice mode
at+vsm=4 // for select my wave voice compression format
atd!MYPHONENUMBER //for dial my number
> // after that modem respond OK and other side ringing ...
after OK appear > at+vtx
and write byte[] wave to serialport ... 

after that i cant detect when other side answer my call if other side wont answer and ringing modem report 'r' char ... if other side reject my call modem status report 'b' char ... if other side answer and hangup my call modem report 'b' char ... if other side answer and dont speak for 5 sec modem report 'q' char ...

my modem is DELL USB and is use this reference guided

edit 1 : i have byte array from serialport ... can i analyze these byte array and detect witch byte for ring tone and witch for human speak ?

To query the status of the outgoing call, use the 'AT+CLCC' command. If there are no outgoing calls, the 'AT+CLCC' command will respond with 'OK'.

If there is an outgoing call active the command will respond using the following format:

+CLCC: ,,,,[,,] id Call Identification dir Direction of the call, 0 = outgoing, 1 = incoming call. stat State of the call. Can be one of the following values:

0 - Active, 1 - Held, 2 - Dialling, 3 - Alerting, 4 - Incoming, 5 - Waiting, mode Type of call. Possible values are:

0 - Voice, 1 - Data, 2 - Fax, mpty Indicates if this is a multiparty call or not number Number to dial type Type of number

Below you can find examples of some 'AT+CLCC' responses during a call setup:

+CLCC: 1,0,2,0,0,"0742781722",129 Line 1 is dialing a number in voice mode (Dialling)

+CLCC: 1,0,3,0,0,"0742781722",129 The phone is ringing at the remote party (Alerting)

+CLCC: 1,0,0,0,0,"0742781722",129 The remote party picked up the phone (Active)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM