Coder Social home page Coder Social logo

How to make a phone Call? about atlib HOT 11 CLOSED

hbjorgo avatar hbjorgo commented on June 19, 2024
How to make a phone Call?

from atlib.

Comments (11)

hbjorgo avatar hbjorgo commented on June 19, 2024

Hi!
You want to make a call from this library to another device? That is currently not implemented, but if that's something you're interested in, I can implement it. Receiving a call through the library works fine.

from atlib.

thuyenvinh avatar thuyenvinh commented on June 19, 2024

yes! please implement it

from atlib.

hbjorgo avatar hbjorgo commented on June 19, 2024

Hi
Please check out the latest release:
https://github.com/hbjorgo/ATLib/releases/tag/3.0.0
I hope this is what you're looking for 😃 Please let me know if you experience any issues 👌🏼

from atlib.

hbjorgo avatar hbjorgo commented on June 19, 2024

Have you had a chance to try it out? Register on the OnCallEnded event and dial the number. In the event you'll get the call details which includes the call duration.

from atlib.

thuyenvinh avatar thuyenvinh commented on June 19, 2024

It would be good if you add Send USSD function!

from atlib.

hbjorgo avatar hbjorgo commented on June 19, 2024

Thank you, I'm looking into it!

from atlib.

thuyenvinh avatar thuyenvinh commented on June 19, 2024

here my function
public virtual async Task SendUSSDAsync(string ussdComand, string dcs = "15")
{
(AtError error, AtResponse response) = await channel.SendFullCommandAsync($"AT+CUSD=1,"{ussdComand}",{dcs}", AtCommandType.MULTILINE, "+CUSD:", null,TimeSpan.Zero);
if (error == AtError.NO_ERROR)
{
StringBuilder builder = new StringBuilder();
foreach (string line in response.Intermediates)
{
builder.AppendLine(line);
}
return builder.ToString();
}
return null;
}
thank you!

from atlib.

hbjorgo avatar hbjorgo commented on June 19, 2024

Thank you for your code example!

I'm trying to get USSD responses on my network, but it looks like they don't offer any. I only get negative responses. Could you provide me with some real request/responses?

Example:

Request:
AT+CUSD=1,"*100#",15
Response:
OK
+CUSD: 1,"Your balance is 100",15

Etc. Is +CUSD: response always a single line?

from atlib.

thuyenvinh avatar thuyenvinh commented on June 19, 2024

add this code
case ConsoleKey.U:
var rsUssd = await modem.SendUSSDAsync("*101#");
Console.WriteLine($"Ussd: {rsUssd}");
break;

here result...

Opening serial port...
Serialport opened
SIM Status: SIM_READY
Signal Strength: RSSI: 17, BER: 99
Battery Status: Charge Status: Powered by battery, Charge Level: 100%
Product Information:
Manufacturer: ZTE CORPORATION
Model: MF190
Revision: BD_MF190V1.0.0B02
IMEI: 863403019673989
+GCAP: +CGSM,+DS,+ES
Setting date and time: OK
Date and time:
Setting SMS text format: OK
Setting new SMS indication: OK
Single SMS:
Done. Press 'a' to answer call, 'd' to dial, 'h' to hang up, 's' to send SMS and 'q' to exit...
uUssd:
+CUSD: 0,"00560049004E00410043004100520044002E00200054004B0020006300680069006E0068003D0031003500300035003900200056004E0044002C0020004B004D003D003000200056004E0044002C0020004B004D0031003D003000200056004E0044002C0020004B004D0032003D003000200056004E0044002C0020004B004D0033003D003000200056004E0044002C00200044004B0032003D003000200056004E0044002E002000480061006E002000730075002000640075006E0067002000300038002F00300039002F0032003000320031",72

from atlib.

hbjorgo avatar hbjorgo commented on June 19, 2024

Thank you for your sample response.

Please check out the latest release: 3.1.0
Use the method "SendUssdAsync", and you'll get the response in the "UssdResponseReceived" event.
I also included a UCS2 decoder :)

from atlib.

thuyenvinh avatar thuyenvinh commented on June 19, 2024

thank you very much!

from atlib.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.