I’m looking at the AMI documentation here and I’m not sure if subscribing to events is additive (cumulative) or does each call to the event action REPLACE the events subscribed to?
For example is subscribing to event A and then subscribing to event B the same as subscribing to A,B ? (Or does the B subscription replace the A subscription)
Note: I was unable to post a link to https://docs. asterisk. org/Asterisk_20_Documentation/API_Documentation/AMI_Actions/Events/ for some reason.
I’m specifying OFF on login, but then want to use the “Events” AMI command to subscribe. The link I posted seems to say you can subscribe…or am I misreading that document?
Just to confirm the above, I had a look at the source code. The main part of AMI is in main/manager.c. In there is a routine action_events(), which is called to handle the “Events” command. That in turn calls another routine set_eventmask(). That uses strings_to_mask() to parse the event-mask string, and then replaces the value of the session->send_events field with the parsed value. So there is no provision for incremental modifications to the previous value.