Get caller id with Visual Basic

Hi all,

I do not know anything about call centers,
I 've made a program in VB (Visual Studio 2019) and my client wants to poopup a window each time he has an input call.

So, I have to somehow connect to his call center (it is a “Yeastar” with asterisk) and get the caller id.

I have never done this before and - as I said - I do not know anything about how to do that.

Is anyone familiar of how to do that?

I will appreciate if you can tell me specific what to do and what libraries I have to use and not answers like “connect there and get that”. I do not even know how to connect and how I can get something.


Please confirm that you are using VB.NET, not VB.

The standard way of doing this would be with AMI. I believe people have published class libraries for .NET (probably written in C#), but, if this is all you are doing, you may find it easier just to implement the protocol directly, yourself.

Most experience with AMI is probably with PHP, then probably Python or Java. There is very little use in the Microsoft ecosystem.

Please don’t ask for worked examples.

1 Like

There are 2 methods

  1. Send the CID information to your system using curl on the dial plan

  2. using a TCP connection with AMI and getting the CID from an event

1 Like

Thanks for the answer.

Because I 've never done this before, where can I find examples of how to use AMI (connect and get events) with

Google suggests that GitHub - AsterNET/AsterNET: AsterNET is an open source .NET framework for Asterisk AMI and FastAGI. AsterNET allows you to talk to Asterisk AMI from any .NET application and create FastAGI applications in any .NET language. might be a starting point, but the Microsoft world doesn’t interact much with the open source world so there is very little open source .net framework material around of any kind.

1 Like

For me the easy way to use AMI is PHP, but I dont know how to use .NET, but at the end if you can connect to a socket and get stream of data is all the same but with different methods

1 Like

If I connect to a socket, the socket must remain open and wait for a call?
How can I check when an incoming call takes place?

Στις Σάβ, 30 Οκτ 2021 στις 4:08 π.μ., ο/η ambiorixg12 via Asterisk Community <> έγραψε:

I don’t have idea using .NET, I made this code 6 years back on PHP

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.