aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xchannels/chan_iax2.c4
-rwxr-xr-xmanager.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index a30403833..ada9fea1a 100755
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -73,7 +73,7 @@ static char context[80] = "default";
static int max_retries = 4;
static int ping_time = 20;
static int lagrq_time = 10;
-static int nextcallno = 0;
+static int nextcallno = 1;
static int maxjitterbuffer=3000;
static int iaxdefaultdpcache=10 * 60; /* Cache dialplan entries for 10 minutes by default */
@@ -846,7 +846,7 @@ static int find_callno(unsigned short callno, unsigned short dcallno, struct soc
ast_pthread_mutex_unlock(&iaxsl[x]);
}
}
- if ((res < 0) && (new >= NEW_ALLOW)) {
+ if ((res < 1) && (new >= NEW_ALLOW)) {
/* Create a new one */
start = nextcallno;
for (x = ((nextcallno + 1) % (AST_IAX2_MAX_CALLS - 1)) + 1; iaxs[x] && (x != start); x = (x + 1) % AST_IAX2_MAX_CALLS)
diff --git a/manager.c b/manager.c
index 0305c9f77..528828683 100755
--- a/manager.c
+++ b/manager.c
@@ -447,7 +447,7 @@ static int process_message(struct mansession *s, struct message *m)
snprintf(s->challenge, sizeof(s->challenge), "%d", rand());
ast_pthread_mutex_unlock(&s->lock);
}
- ast_cli(s->fd, "Challenge: %s\r\n\r\n", s->challenge);
+ ast_cli(s->fd, "Response: Success\r\nChallenge: %s\r\n\r\n", s->challenge);
return 0;
} else {
send_error(s, "Must specify AuthType");