[Home]

Summary:ASTERISK-15175: [patch] Support for disabling automon selectively per peer
Reporter:fhackenberger (fhackenberger)Labels:
Date Opened:2009-11-19 06:24:25.000-0600Date Closed:2011-06-07 14:08:20
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_mixmonitor
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) automon-sip-device-restriction
( 1) automon-sip-device-restriction_2
Description:chan_sip.c states:
OEJ: I think this should be something that is enabled/disabled
per device. I don't want incoming callers to record calls in my
pbx.

I propose the attached implementation. It adds a new channel option AST_OPTION_ALLOW_AUTOMON. Every channel can then respond to a query for that option. As an example, I implemented support for an allowautomon setting for sip peers.

Would that be a viable way to implement the tweak?
Comments:By: Leif Madsen (lmadsen) 2009-11-19 09:36:27.000-0600

Confirming this issue. You may wish to ask for a review of your approach on the asterisk-dev mailing list. Thanks for the contribution!

By: fhackenberger (fhackenberger) 2009-12-07 11:31:38.000-0600

New patch which fixes two bugs.

* I used the wrong channel to check for the AUTOMON flag
* I returned -1 in case the monitoring was forbidden, which hung up the channel

BTW the documentation of the builtin_automonitor function seems to be wrong. It states:

* \brief Monitor a channel by DTMF
* \param chan channel requesting monitor
* \param peer channel to be monitored

Scenario: 3951 calls 3950, 3950 hits *1
chan: SIP/3951-b3f134c0



By: Russell Bryant (russell) 2009-12-08 10:39:14.000-0600

Thank you very much for the contribution.

However, I do not think this patch is necessary.  There are already tools in place to allow this.  Specifically, chan_sip allows variables to be set on channels from your configuration.  (The setvar option in sip.conf).

From there, you can check that variable in your dialplan and optionally enable or disable the automon permission.