AMI and Dialend

Hello,

I don’t know AMI but I’m trying to do the following.
We want to detect when a user has picked up his phone.

We did this with the dialend messages.
We got multiple messages with event: dialend.
A few with channelstatedesc: ring and at the end with channelstatedesc: up.
This was with asterisk 16.15.1

We have now done a test with another installation, but this isn’t working anymore.
We don’t see the dialend with channelstatedesc: up every time the phone is picked up.
This is on asterisk 16.24.1

What is the correct way to detect when a user has picked up his phone to answer a call?

I presume you mean picked up in the loose sense of answered, as you can physically pick up some ringing phones (actually most mobile phones) without answering the call.

You’d use the newstate event, on the called party, and I think you would be looking for a value of “up”. However DialEnd shuld also work.

You can also look at the caller channel, but that will only work if it hadn’t already been answered by the dialplan.

Hello David

The dialend event is working with ring groups, queues and transfers, but it doesn’t work with direct calls. The dialend gives us channelstatedesc ring and DialStatus answer.
Is it correct that we don’t see channelstatedesc: up when we do a direct call.

With the newstate event direct calls, ring groups and queues work, but when we do a attended transfer we only see the initial call between the two internal devices before transferd.

So, caller A is external, caller B is the first internal device and caller C is the second internal device.
Caller A is calling caller B and the newstate event detects this.
Caller B is starting an attended transfer to caller C, this is also detected with the newstate event.
When caller B confirms the transfer caller A is transferd to caller C, but we do not see this with the newstate event.

We are looking for 1 method that complies for all the different possibilities to detect an external call (attended transfer, ring group, queues, pick up groups and direct calls)

What exactly to you mean by “ring group”? What type of transfer?

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