summaryrefslogtreecommitdiff
path: root/channels/chan_mgcp.c
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2004-10-26 22:25:43 +0000
committerMark Spencer <markster@digium.com>2004-10-26 22:25:43 +0000
commit8a13712e45e41c4d413200e38a96898a4f1a79ab (patch)
tree8cc9a36b9066a72d36a623a08bb8779286caedf2 /channels/chan_mgcp.c
parent9efbc4630131838017b80d407fab2c3594c0a924 (diff)
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
Diffstat (limited to 'channels/chan_mgcp.c')
-rwxr-xr-xchannels/chan_mgcp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c
index a66fb6d8d..0b1fafd83 100755
--- a/channels/chan_mgcp.c
+++ b/channels/chan_mgcp.c
@@ -72,6 +72,7 @@
#include <asterisk/app.h>
#include <asterisk/musiconhold.h>
#include <asterisk/utils.h>
+#include <asterisk/causes.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <net/if.h>
@@ -3342,7 +3343,7 @@ static int restart_monitor(void)
return 0;
}
-static struct ast_channel *mgcp_request(const char *type, int format, void *data)
+static struct ast_channel *mgcp_request(const char *type, int format, void *data, int *cause)
{
int oldformat;
struct mgcp_subchannel *sub;
@@ -3364,6 +3365,7 @@ static struct ast_channel *mgcp_request(const char *type, int format, void *data
sub = find_subchannel(tmp, 0, NULL);
if (!sub) {
ast_log(LOG_WARNING, "Unable to find MGCP endpoint '%s'\n", tmp);
+ *cause = AST_CAUSE_UNREGISTERED;
return NULL;
}
@@ -3383,6 +3385,7 @@ static struct ast_channel *mgcp_request(const char *type, int format, void *data
transmit_notify_request(sub,"L/vmwi(-)");
}
}
+ *cause = AST_CAUSE_BUSY;
return NULL;
}
tmpc = mgcp_new(sub->owner ? sub->next : sub, AST_STATE_DOWN);