[asterisk-dev] Reverse decrement of call counter

Rizwan Hisham rizwanhasham at gmail.com
Thu Nov 15 03:56:26 CST 2007


I want to rephrase my question here.

As you can see in the code which i mentioned in my last email that for
decrementing the call-limit value they are actually incrementing it, and
some how it is called reverse decrementing. I need to know What is the
reason for doing that. Under what circumstances this IF condition gets
executed?

Since nobody has answered my questions lately, i need to know y. Am i asking
too difficult questions or too vague questions?

On Nov 13, 2007 8:23 PM, Rizwan Hisham <rizwanhasham at gmail.com> wrote:

> Hi all,
> im stuck in a problem where the call counter is not decremented for
> sip-peers after the call is hungup in certain cases. I have found out where
> the problem lies in the code. if i comment that part of the code then the
> call is decremented fine. But i have no idea what side-effects will be
> created by commenting that code. So i need to understand the NEED for that
> code
>
> from function sip_hangup (chan_sip.c line 3378)
>
> if ( p->initid != -1 ) {
> /* channel still up - reverse dec of inUse counter
> only if the channel is not auto-congested */
> update_call_counter(p, INC_CALL_LIMIT);    //commenting this line resolves
> the problem
> }
>
> i dont believe what the comments say in this peice of code. I need to know
> when and why do we use this so called reverse decrementing technique. Can
> anybody help?
>
>
> --
> Best Regards
> Rizwan Hisham
> Software Engineer
> Axvoice Inc.
> www.axvoice.com




-- 
Best Regards
Rizwan Hisham
Software Engineer
Axvoice Inc.
www.axvoice.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20071115/1a8d1849/attachment.htm 


More information about the asterisk-dev mailing list