SV: [Asterisk-Dev] Realtime call controll
Kaloyan Kovachev
kkovachev at varna.net
Thu Dec 29 08:52:16 MST 2005
Thanks,
so the channel unlock is now moved just before the return of the thread as:
if (ch)
ast_mutex_unlock(&ch->lock);
About the LIMIT_RECHECK_INTERVAL my idea was that it will allways be less than
the warningtime, so won't change the timeleft after the warning, but you are
right as there may not be warning time at all. Will make some more checks then.
On Thu, 29 Dec 2005 16:31:57 +0100, Hеkon Nessjшen wrote
> Hi,
>
> I see that you haven't changed the timing-code since the last time.
> I used parts of your code. And I noticed that if you have a long
> LIMIT_RECHECK_INTERVAL, your code will set nexteventts to your interval
> value, even if there is less time to the next warning/hangup event.
>
> I'm no guru in Asterisk, but it seems to me that your
> 'recheckthread' locks the channel, and only unlocks it if all of the
> whole if expression is true:
>
> if (res && (ch = ast_get_channel_by_name_locked(chan0_name)) &&
> (ch->_bridge) && ch->_bridge->name == chan1_name) {
>
> So if ch->_bridge->name is not the same pointer as chan1_name, you have
> locked chan0, but you never unlock it.
>
> Hеkon
>
> -----Opprinnelig melding-----
> Fra: asterisk-dev-bounces at lists.digium.com
> [mailto:asterisk-dev-bounces at lists.digium.com] Pе vegne av Kaloyan Kovachev
> Sendt: 29. desember 2005 15:57
> Til: Asterisk Developers Mailing List
> Emne: [Asterisk-Dev] Realtime call controll
>
> Hi,
> many times similar requests where posted here, so i hope it will be
> useful patch, but i am newbie in C and not sure if it is properly
> coded. Any critics, successful tests or suggestions are welcome.
> Also i have a question about the possibility to run AGI via this script.
> Should i just pass the current timelimit as additional AGI parameter
> (if LIMIT_RECHECK_APP is set as AGI(script_name^options) only) from
> within the thread function or it is better to leave it as is and to
> require a wrapper function which passes the parameters one may need.
>
> Thanks
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Dev mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev
More information about the asterisk-dev
mailing list