I’m using this code from @lgaetz
Code already has line “if you want to block spying access to certain extensions you can do that with this line, one per ext”
I’m looking to add opposite flag, limit the extensions FROM which channels can be spied on.
For example we will allow only extensions 101,102,103 to spy on all extensions (excluding those excluded)
For a small number of permitted cases, just link the comparisons with “&” operators, and invert the test in the comparisons
For larger numbers you should do what I would probably have done even for the current implementation, although it may look strange to people used to more conventional programming languages, and repeated the priority with the test (use priority s for all but the last), giving an explicit extension number, for all but the last. For the only case, the last would be hangup, and the others Noop. For the all but case, the Noops and Hangups would be switched. For the same context and priority, Asterisk uses the most specific match on the extension, and patterns are less specific that exact matches.
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.