[asterisk-users] Stopping chanspy followup
Anthony Francis
anthonyf at rockynet.com
Wed Feb 4 17:55:25 CST 2009
Jim Dickenson wrote:
> I am still trying to figure out a reasonable way to exit the chanspy
> application in a dialplan.
>
> For the most part I understand how things are working and there is one
> change I would like to propose.
>
> The way the 1.4.23.1 code seems to work is that if there are no channels
> that match the chanprefix argument the chanspy code stays in a loop waiting
> for a new channel to come into being that matches chanprefix and spying will
> start.
>
> I would like it if there are no channels to spy on that the chanspy
> application exit.
>
> This can be done by changing line 673 of chanspy.c in the following way
>
> Old:
> if (res == -1 || ast_check_hangup(chan))
>
>
> New:
> if (res == -1 || ast_check_hangup(chan) || !peer_chanspy_ds)
>
> Otherwise, as best I can tell, unless there is some error chanspy never
> exits unless the channel running the chanspy application hangs up, which I
> do not particularly want to do.
>
>
In the interim I would recommend you make chat change and recompile.
--
Thank you and have any kind of day you want,
Anthony Francis
More information about the asterisk-users
mailing list