What is the event if I will answer the chanspy

Hi can I ask some help, I am using node.js when executing the action to chanspy to other phone, now I want to know what is the name of the event so that I will know there is chanspy. , I tried newstate but I think this not the correct event for the chanspy.

Thank you in advance.

There is a specific event for when ChanSpy is started on a channel[1]. If this does not fit your needs you will need to explain in further detail exactly what you are seeking.

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+ManagerEvent_ChanSpyStart?src=search

Thank you for the quick reply… is this “ChanSpyStart” will trigger if I will Pick up the phone or answer it ?.

If this does not fit your needs you will need to explain in further detail exactly what you are seeking.

I hope I can explain it will…here is the scenario . phone A will chanspy to Phone B…now when the Phone B will ring I want to know what event for the chanspy should I will listen if I will pick up the Phone B. I think “ChanSpyStart” will help me…I will try this one.

Thank you in advance

It triggers when ChanSpy is started. It doesn’t know if a phone is picked up or answered, just that ChanSpy is started on a channel.

Okay…so is there no events to listen if Phone B will pick up ?

Thank you in advance.

There’s tons of events in AMI, including when state changes occur on channels for when they pick up. They’re all documented on the wiki[1]. I can’t say specifically what you’ll see or what will happen because I don’t know how you are doing things.

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+AMI+Events

1 Like

Thank you I will try to look at in the documentation…