static char show_inuse_usage[] =
"Usage: sip show inuse\n"
-" List all users known to the SIP (Session Initiation Protocol) subsystem inUse counters and their incominglimit.\n";
+" List all users known to the SIP (Session Initiation Protocol) subsystem usage counters and limits.\n";
static char show_channels_usage[] =
"Usage: sip show channels\n"
@@ -4809,8 +4853,8 @@
if (!strlen(p->context))
strncpy(p->context, context, sizeof(p->context) - 1);
/* Check number of concurrent calls -vs- incoming limit HERE */
- ast_log(LOG_DEBUG, "Check for res\n");
- res = find_user(p,1);
+ ast_log(LOG_DEBUG, "Check for res for %s\n", p->username);
+ res = find_user(p,INC_IN_USE);
if (res) {
if (res < 0) {
ast_log(LOG_DEBUG, "Failed to place call for user %s, too many calls\n", p->username);
@@ -4827,10 +4871,10 @@
if (gotdest) {
if (gotdest < 0) {
transmit_response(p, "404 Not Found", req);
- find_user(p,0);
+ find_user(p,DEC_IN_USE);
} else {
transmit_response(p, "484 Address Incomplete", req);
- find_user(p,0);
+ find_user(p,DEC_IN_USE);
}
p->needdestroy = 1;
} else {
@@ -5492,6 +5536,7 @@
/* set the usage flag to a sane staring value*/
user->inUse = 0;
+ user->outUse = 0;
user->canreinvite = REINVITE_INVITE;
/* JK02: set default context */
@@ -5537,6 +5582,10 @@
user->incominglimit = atoi(v->value);
if (user->incominglimit < 0)
user->incominglimit = 0;
+ } else if (!strcasecmp(v->name, "outgoinglimit")) {
+ user->outgoinglimit = atoi(v->value);
+ if (user->outgoinglimit < 0)
+ user->outgoinglimit = 0;
} else if (!strcasecmp(v->name, "amaflags")) {
format = ast_cdr_amaflags2int(v->value);
if (format < 0) {
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum