[asterisk-dev] chan_sip: call-limit inconsistency

Andras Meszaros andras.meszaros at eu-tel.hu
Mon Aug 14 04:49:44 MST 2006


Hi!

I am newbie about asterisk development;)
I found some inconsistent code/documentation about call-limit:
from chan_sip.c:2858
 * \return 0 if call is ok (no call limit, below treshold)
 *      -1 on rejection of call
 *
 */
static int update_call_counter(struct sip_pvt *fup, int event)
[...]
from chan_sip.c:15079
 else if (!strcasecmp(v->name, "call-limit")) {
                        user->call_limit = atoi(v->value);
                        if (user->call_limit < 0)
                                user->call_limit = 0;
[...]
from chan_sip.c:15333
                } else if (!strcasecmp(v->name, "call-limit") ||
!strcasecmp(v->name, "incominglimit")) {
                        peer->call_limit = atoi(v->value);
                        if (peer->call_limit < 0)
                                peer->call_limit = 0;

and
sip show inuse
don't display user/peers if actual call limit is 0


So
call-limit=0 == call-unlimit ? ;)
OR
call-limit=0 means all call denied for this channel?

Thx
-- 
Mészáros, András



More information about the asterisk-dev mailing list