Search code examples
c#-4.0twiliophone-calltapiozeki

How to make outgoing calls in c#


I am trying to make outgoing call from C#.net 4.0, with pre-recorded message.I have

hiro usb modem h50113

already in the system to detect caller id. I tried googling and found out few links
1.OZEKI
2.TWILIO
3. TAPI

in OZEKI I need to get SIP account not sure where to get that, and I am guessing that would cost me. Twilio seems to be cheap but not sure how to use as there are codes like :

using System;
using Twilio;
class Example 
{
    static void Main(string[] args) 
    {
        // Find your Account Sid and Auth Token at twilio.com/user/account
        string AccountSid = "AC8ca11aff9660bdf011958a5718df9633";
        string AuthToken = "{{ auth_token }}";
        var twilio = new TwilioRestClient(AccountSid, AuthToken);

        var options = new CallOptions();
        options.Url = "http://demo.twilio.com/docs/voice.xml";
        options.To = "+14155551212";
        options.From = "+14158675309";
        var call = twilio.InitiateOutboundCall(options);

        Console.WriteLine(call.Sid);
    }
}

Not sure where to write this code. Also I think I can put use to usb-modem to make calls . So please advice what is the best possible way to achieve this and if possible in no cost.

Thanks


Solution

  • I am able to solve the issue . As I already had

    hiro usb modem h50113

    so i just used AT Command

    ATDT (Phone number)

    here is the code :

    this.sp.WriteLine("ATDT 1234567890" + System.Environment.NewLine);
    

    However , only it can ring , theirs no voice . Working on it as soon as I get it will post.

    one can refer my old question for better understanding How to make caller id in c#.net