Pass concept of status back, permit "leaveempty" to work with static agents who are not loggedon (bug #2719)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4106 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2004-10-26 22:25:43 +00:00
parent 9efbc46301
commit 8a13712e45
21 changed files with 208 additions and 83 deletions

View File

@@ -23,6 +23,7 @@
#include <asterisk/options.h>
#include <asterisk/utils.h>
#include <asterisk/callerid.h>
#include <asterisk/causes.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <errno.h>
@@ -1023,7 +1024,7 @@ static struct phone_pvt *mkif(char *iface, int mode, int txgain, int rxgain)
return tmp;
}
static struct ast_channel *phone_request(const char *type, int format, void *data)
static struct ast_channel *phone_request(const char *type, int format, void *data, int *cause)
{
int oldformat;
struct phone_pvt *p;
@@ -1047,7 +1048,8 @@ static struct ast_channel *phone_request(const char *type, int format, void *dat
if (!p->owner) {
tmp = phone_new(p, AST_STATE_DOWN, p->context);
break;
}
} else
*cause = AST_CAUSE_BUSY;
}
p = p->next;
}