aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_phone.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/chan_phone.c')
-rwxr-xr-xchannels/chan_phone.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/channels/chan_phone.c b/channels/chan_phone.c
index b91b3657f..b81c5b04d 100755
--- a/channels/chan_phone.c
+++ b/channels/chan_phone.c
@@ -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;
}