diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-06-26 15:28:53 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-06-26 15:28:53 +0000 |
commit | ac3b35dcc792329046ec2532ff204962c895ee98 (patch) | |
tree | a28e9113cf1daf97e45a8fc6d41a52c76ac69836 /channels/chan_local.c | |
parent | d13a40e1cfe5f54bfb4d1aacd2c63e7859e010bc (diff) |
Merge the new Channel Event Logging (CEL) subsystem.
CEL is the new system for logging channel events. This was inspired after
facing many problems trying to represent what is possible to happen to a call
in Asterisk using CDR records. For more information on CEL, see the built in
HTML or PDF documentation generated from the files in doc/tex/.
Many thanks to Steve Murphy (murf) and Brian Degenhardt (bmd) for their hard
work developing this code. Also, thanks to Matt Nicholson (mnicholson) and
Sean Bright (seanbright) for their assistance in the final push to get this
code ready for Asterisk trunk.
Review: https://reviewboard.asterisk.org/r/239/
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@203638 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_local.c')
-rw-r--r-- | channels/chan_local.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/channels/chan_local.c b/channels/chan_local.c index 329b9828e..df1a2c454 100644 --- a/channels/chan_local.c +++ b/channels/chan_local.c @@ -60,7 +60,7 @@ static struct ast_jb_conf g_jb_conf = { .impl = "", }; -static struct ast_channel *local_request(const char *type, int format, void *data, int *cause); +static struct ast_channel *local_request(const char *type, int format, const struct ast_channel *requestor, void *data, int *cause); static int local_digit_begin(struct ast_channel *ast, char digit); static int local_digit_end(struct ast_channel *ast, char digit, unsigned int duration); static int local_call(struct ast_channel *ast, char *dest, int timeout); @@ -780,7 +780,7 @@ static struct local_pvt *local_alloc(const char *data, int format) } /*! \brief Start new local channel */ -static struct ast_channel *local_new(struct local_pvt *p, int state) +static struct ast_channel *local_new(struct local_pvt *p, int state, const char *linkedid) { struct ast_channel *tmp = NULL, *tmp2 = NULL; int randnum = ast_random() & 0xffff, fmt = 0; @@ -798,8 +798,8 @@ static struct ast_channel *local_new(struct local_pvt *p, int state) ama = p->owner->amaflags; else ama = 0; - if (!(tmp = ast_channel_alloc(1, state, 0, 0, t, p->exten, p->context, ama, "Local/%s@%s-%04x;1", p->exten, p->context, randnum)) - || !(tmp2 = ast_channel_alloc(1, AST_STATE_RING, 0, 0, t, p->exten, p->context, ama, "Local/%s@%s-%04x;2", p->exten, p->context, randnum))) { + if (!(tmp = ast_channel_alloc(1, state, 0, 0, t, p->exten, p->context, linkedid, ama, "Local/%s@%s-%04x;1", p->exten, p->context, randnum)) + || !(tmp2 = ast_channel_alloc(1, AST_STATE_RING, 0, 0, t, p->exten, p->context, linkedid, ama, "Local/%s@%s-%04x;2", p->exten, p->context, randnum))) { if (tmp) { tmp = ast_channel_release(tmp); } @@ -843,14 +843,14 @@ static struct ast_channel *local_new(struct local_pvt *p, int state) } /*! \brief Part of PBX interface */ -static struct ast_channel *local_request(const char *type, int format, void *data, int *cause) +static struct ast_channel *local_request(const char *type, int format, const struct ast_channel *requestor, void *data, int *cause) { struct local_pvt *p = NULL; struct ast_channel *chan = NULL; /* Allocate a new private structure and then Asterisk channel */ if ((p = local_alloc(data, format))) { - if (!(chan = local_new(p, AST_STATE_DOWN))) { + if (!(chan = local_new(p, AST_STATE_DOWN, requestor ? requestor->linkedid : NULL))) { AST_LIST_LOCK(&locals); AST_LIST_REMOVE(&locals, p, list); AST_LIST_UNLOCK(&locals); |