Steve, Good point my man...You drinking yet? LOL...I had forgotten about the GROUP and GROUP_COUNT functions, that is a much better way (in that it already existed and doesn't require me to write more code :] )
Slainte! On Fri, Aug 20, 2010 at 7:37 PM, Steve Edwards <[email protected]> wrote: > On Fri, 20 Aug 2010, Sherwood McGowan wrote: > >> 1. Set up a Global Variable that will store that kit's current number of >> calls >> 2. Check that variable when a call starts (but before you dial out) >> 3. If the number of calls is <49 (since the current call will make >> 50), use codec A via the CHANNEL() function, otherwise use codec B >> using the same function. >> 4. Increment the variable >> 5. place call >> 6., upon hangup, decrement the variable > > Not really paying close attention to what you're trying to do, but... > > The GROUP() and GROUP_COUNT() functions automagically take care of the > increment and decrement cruft in a "race condition free" sort of way. > > Both methods still leave a small "window of opportunity" in comparing the > count with the threshold. > > -- > Thanks in advance, > ------------------------------------------------------------------------- > Steve Edwards [email protected] Voice: +1-760-468-3867 PST > Newline Fax: +1-760-731-3000 > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
