V
V
veitmen2015-04-16 18:28:31
Asterisk
veitmen, 2015-04-16 18:28:31

How to correctly catch call event in Asterisk?

Hello.
There is Asterisk. There are users. The task is to write a desktop application that will show an alert for incoming and outgoing calls to the user. At the same time, I need to know the phone\username of who is calling\who is calling.
Actually how to do it right?
1. Write a client for SIP (however, will it work if the user calls through a physical phone, i.e. there will be two connections of one user)? It seems that I will have to catch the incoming one, but the outgoing one?
2. Write a client to the Asterisk Manager Interface, which will subscribe to some events and I will catch the information that the user is calling / he is being called.
3. More like that.
Thank you, I will be grateful for the info and docks.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Pisarenko, 2015-04-17
@veitmen

I think AMI is the best option. Subsequently, if desired, it will be possible to increase the functionality of the application.
A quick googling on the topic yielded this:
https://asternet.codeplex.com/releases/view/134917

V
Vladimir, 2015-04-16
@rostel

AJAM2 or AMI interfaces - the easiest way to get everything you need
and without processing events through AMI get
ask (Action: Command)
core show channels
find the desired extension channel in the output
then
core show channel channel_name
in the output there will be a bunch of fields, in including the "Connected Line ID"
works longer, but quite a workable way
from bicycles: XMPP, sending a specially crafted UDP or TCP packet to a specific address and port

F
falsebyte, 2015-04-16
@falsebyte

Why a client, set up jabber and let asterisk send notifications using jabbersend

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question