SV: [Asterisk-Dev] Realtime call controll

Kaloyan Kovachev kkovachev at varna.net
Thu Dec 29 10:30:05 MST 2005


Well, here are the changes.
By the way the current code also have similar problem - if the timelimit is
less than the warningtime the nexteventts is set to the warningtime (well the
call will still be dropped from chan->whentohangup), which is also fixed now,
but there will be no warning at all even if there is more time than warning_freq.
Is it reasonable to fix this too?

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: realtime_call_controll.patch
Type: text/x-patch
Size: 8576 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20051229/063682c8/realtime_call_controll.bin


More information about the asterisk-dev mailing list