pipobscure / NodeJS-AsteriskManager

NodeJS Asterisk Manager API
Other
249 stars 103 forks source link

.on event with subevent type #68

Open pilotkid opened 4 years ago

pilotkid commented 4 years ago

Hello all, I am writing a script to listen to dial events. This requires a subevent of either begin or end. How do I use the .on() callback to listen to an event with a sub-event?

micodix commented 2 years ago

You just have to listen for a managerevent whose event property has the value Dial and additionally has the property subevent with the value Begin / End.

Since Asterisk version 12 the two events DialBegin and DialEnd are thrown instead.