[asterisk-dev] [Code Review] New AMI Command LocalOptimizeAway

tim.ringenbach at gmail.com tim.ringenbach at gmail.com
Wed Jun 23 12:17:32 CDT 2010

This is an automatically generated e-mail. To reply, visit:

(Updated 2010-06-23 12:17:32.383496)

Review request for Asterisk Developers.


I reworked this a bit to avoid needing to do deadlock avoidance. Since I have the channel name I'm looking for I used ast_channel_get_by_name() and then just loop through to make sure the tech_pvt really belongs to chan_local. I think I like this better, but if you all don't, I can always go back to what I had and add the deadlock avoidance.


Adds a new manager command LocalOptimizeAway. It clears the flag on a local channel that says not to optimize it away.

General use case: You need the behavior of "/n" for a while, but then something else happens (typically a transfer) and you no longer desire that behavior.

Specific Use case: Using local channels as queue members without stateinterface, using /n to keep the local channel up so the agent doesn't get another call, then on transfer issuing this manager command so the local channel goes away and the agent can get another call.

Diffs (updated)

  http://svn.asterisk.org/svn/asterisk/trunk/channels/chan_local.c 272083 

Diff: https://reviewboard.asterisk.org/r/732/diff


We have the 1.4 version of the patch in production at several sites. The trunk version actually submitted here has only minimal testing: I logged into the manager once and issued the command and observed that it worked as expected.



More information about the asterisk-dev mailing list