1

I have a hardphone that register to asterisk 11.8. When someone call this phone, information about user input ivr and user phone number is inside asterisk, is it possible to expose these information to the outside app. For example, I have a webapp, that when the user type in the account number via ivr, the web app, can pull this information back to display the user information. I am a bit new to asterisk and was previously use Freeswitch.

I start reading something about Asterisk AMI, that there are manager event that sending from asterisk to AMI client. So can it be like this. When the phone rang, there will be an event that send to me web app, this event contain information about the phone number of the caller, and what he/she type in for IVR? Can AMI do something like that? I check asterisk AMI event documentation https://wiki.asterisk.org/wiki/display/AST/AMI+Event+Documentation, but I dont see any event like "calling"

Please guide me, you can just provide me high level general information and I can start looking further. THank you

Thang Pham
  • 38,125
  • 75
  • 201
  • 285
  • This is possible. Use asterisk AGI or java API to call webapp when you get INVITE incoming call . You will get CallId , caller/callee's number etc. refer asterisk php or pythog AGI. – kaushik parmar Apr 16 '14 at 11:48
  • Here is the answer http://stackoverflow.com/questions/23331978/when-a-non-web-non-jsf-event-invoke-need-to-update-data-on-the-browser – Thang Pham May 09 '14 at 08:02

1 Answers1

0

Yes. Asterisk does store that kind of information - the incoming number, the duration of the call etc. It is present in the form of a csv file that can be accessed at:

/var/log/asterisk/cdr-*

You can write code to access these logs and get needed information about them.

EDIT to answer comment:
While I am not sure if this information is stored after a call is disconnected, you can write a dialplan to get what you are doing. As soon as a call is received on the extension, the dialplan should:
- Get the incoming call number and send that to a webapp. I think this should be very easy.

Sriram
  • 10,298
  • 21
  • 83
  • 136
  • Thank you, a quick question, are these information available when the phone start ringing or when the conversation ended (hangup). I need it like a event that sent to my web app, when the phone first rang. Is it possible? – Thang Pham Apr 16 '14 at 08:08
  • I answered your question. Take a look. You should write a dialplan. That will answer all your queries. – Sriram Apr 16 '14 at 09:13
  • 2
    This doesn't really answer the OP's question at all. He was looking for the AMI event that conveys when a channel rings; you're referring to a CDR, which is hardly useful for realtime information or call control. AMI is the appropriate interface for external systems to hook into Asterisk, and will convey the state of channels to those systems in an asynchronous, event driven fashion. – Matt Jordan Apr 20 '14 at 12:41