How to get a phonenumber from asterisk PBX server


#1

I have a .NET C# web application in which I have included voip call using asterisk PBX server and X-lite softphone.
I can make call and recive call but when I recive calls i can see the number on X-lite so my question is:
" How can I get that number from X-lite to my .NET C# web application because I should be able to see if that number is registred on my project database and to know who is that (name, surname, phonenumber)."
So When I answer that call I can call him/her by name (i.e “Hello Jane”, “HI Mr. Jack”).

Thanks


#2

The most obvious approach is to use Asterisk Manager Interface (AMI), but there are many ways of passing callerID to external applications, e.g. you could also call Curl, or System, from the dialplan.


#3

Thanks
Do you know which file calls the “incoming call configuration”?


#4

I don’t know what you mean by “calls the incoming call configuration”, but the fact that you need to ask makes me think you are using a GUI. This forum does not support FreePBX and other GUIs as they generally have very complex an impenetrable dialplans, and otherwise restrict the ability to freely configure Asterisk.


#5

Hello thank you for your fast reply

I want to Detect the incoming caller id that hits the asterisk and catch that incoming number and search to my Database with that number if i have customer with that caller Id

We have clients that we call and they dont usually answer but when they have time they call bacck to our asterisk server .

can you suggest me what configuration files should i edit to do that

Thank you For Your time


#6

There is nothing built in out of the box to do that. Asterisk is a toolkit - it can be used to do lots of things but it’s up to you to take the parts and make something out of it. In this case you’d probably either use AMI or some dialplan logic with an AGI to communicate to something external (outside of Asterisk) that does it.


#7

i have never used the AMI can you show me where should i configure that ,


#8

There’s a thread directly below this one on the main page with information. AMI itself just provides events and information, like I said before it’s up to you to use it to do what you want. You will need to look up documentation yourself, search around, etc. It’s unlikely anyone on here would guide you step by step and provide all the code to implement what you want.