Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to click2dial? #67

Open
Primtek-Dev opened this issue Dec 10, 2019 · 1 comment
Open

How to click2dial? #67

Primtek-Dev opened this issue Dec 10, 2019 · 1 comment

Comments

@Primtek-Dev
Copy link

Primtek-Dev commented Dec 10, 2019

I need to have a click to dial in our Net Core app, I tried below:

var _leg1 = _ari.Channels.Originate("PJSIP/1234", "908171234566", "from-internal", 1, null, "AppDial", null, "1234", 30, null, null, null, null);

Bridge _br = await _ari.Bridges.CreateAsync();
await _ari.Bridges.AddChannelAsync(_br.Id, _leg1.Id, "member");

it calls 1234 but it does not call 908171234566

please help

@mehdiagharlou
Copy link

mehdiagharlou commented Jan 24, 2020

All you need to make a call using ARI is as below:

            ActionClient = new AriClient(
                new StasisEndpoint("server", port, "username", "password"),
                "HelloWorld",
                true);

            ActionClient.Connect();

            string FROM = "Device Extension Code"; // EX: 1234
            string TO = "External Number"; // EX: 08171234566
            ActionClient.Channels.Originate("SIP/" + FROM, "9" + TO, "from-internal-additional", 1, null, null, null, TO, null, null, null, null, null, null);

Originate method will make a bridge itself and use from and to as channels to make call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants